from dataclasses import dataclass @dataclass class MazeConfig: # Maze geometry maze_cols: int = 15 maze_rows: int = 15 cell_size: int = 36 wall_width: int = 2 # GA / Training population: int = 100 max_steps: int = 150 elite_frac: float = 0.30 n_elite: int = 3 # few elites → maintains population diversity mutation_std: float = 0.08 mutation_rate: float = 0.35 temperature: float = 0.7 # softmax sampling temperature (lower = more greedy) # Neural net — 14 inputs: 4 walls + 2 goal dir + 2 pos + 4 last-action + 1 blocked + 1 revisit n_inputs: int = 14 n_hidden: int = 16 n_outputs: int = 4 # Fitness goal_bonus: float = 1000.0 step_penalty: float = 0.01 # Rendering fps: int = 60 trail_decay: float = 0.88 window_title: str = "Maze ML — GA Visualizer" hud_font_size: int = 18