Core Module
The core module contains the main simulation orchestration and world management.
Simulation
- class simulation_framework.src.core.simulation.Simulation(config: SimulationConfig)[source]
Bases:
object
Main simulation orchestrator that manages the game loop and all systems
- initialize_simulation(name: str, description: str = '') None [source]
Initialize a new simulation run in the database
- run_until(condition: Callable[[Simulation], bool]) None [source]
Run the simulation until a condition is met
World
Configuration
- class simulation_framework.src.core.config.SimulationConfig(world_width: int = 50, world_height: int = 50, world_seed: int = 42, max_ticks: int = 10000, tick_rate: float = 0.0, database_path: str = <factory>, save_interval: int = 100, analytics_interval: int = 50, max_agents: int = 100, default_agent_vision_range: int = 5, default_agent_stamina: int = 100, default_agent_health: int = 100, max_npcs: int = 100, npc_respawn_enabled: bool = True, starting_gold: int = 100, trade_cooldown: int = 10, enable_pathfinding_cache: bool = True, max_pathfinding_distance: int = 50, fog_of_war_enabled: bool = True, enable_visualizer: bool = False, visualizer_width: int = 1024, visualizer_height: int = 768, visualizer_tile_size: int = 20, log_level: str = 'INFO', debug_mode: bool = False, log_actions: bool = True, log_file: str | None = None, custom_params: ~typing.Dict[str, ~typing.Any] = <factory>)[source]
Bases:
object
Configuration for simulation parameters
- copy() SimulationConfig [source]
Create a copy of this configuration
- classmethod from_dict(data: Dict[str, Any]) SimulationConfig [source]
Create configuration from dictionary
- classmethod from_file(config_path: str) SimulationConfig [source]
Load configuration from JSON file