1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
//! Multi-player Snake environment
//!
//! A competitive N-player snake game where agents compete for food.
//! - Grid-based world
//! - Each snake grows when eating food
//! - Game ends when all snakes die (collision with wall/self/others)
//! - Rewards: +1 for food, -1 for death, small time penalty to encourage
//! efficiency
// TODO: Fix multi-agent implementation - temporarily disabled
// #[cfg(feature = "training")]
// use crate::multi_agent::environment::{MultiAgentEnvironment,
// MultiAgentResult};
pub use SnakeEnv;
pub use ;
// Re-export main components
pub use ;
// TODO: Re-enable after fixing multi-agent code
// #[cfg(feature = "training")]
// pub use multi_agent::MultiAgentSnakeEnv;
// Submodules
// The `snake` submodule holds the core `Snake`/`Food` types; renaming it to
// avoid the same-name parent module would churn every re-export for no benefit.
// TODO: Re-enable after fixing multi-agent code
// #[cfg(feature = "training")]
// mod multi_agent;
// Legacy aliases for backward compatibility
/// Backward-compatible alias for [`SnakeEnv`]; kept so older training scripts
/// that imported `SnakeEnvSingle` continue to compile. Prefer `SnakeEnv` in new
/// code.
pub type SnakeEnvSingle = SnakeEnv;
// TODO: Re-enable after fixing multi-agent code
// #[cfg(feature = "training")]
// pub type SnakeEnvMulti = MultiAgentSnakeEnv;
/// Create single-agent snake environment
// TODO: Re-enable multi-agent snake environment after fixing multi-agent code
// #[cfg(feature = "training")]
// pub fn make_multi_snake_env(width: i32, height: i32, num_agents: usize) ->
// MultiAgentSnakeEnv { MultiAgentSnakeEnv::new(width, height, num_agents)
// }