32 lines
652 B
Python
32 lines
652 B
Python
from dataclasses import dataclass
|
|
|
|
@dataclass
|
|
class MazeConfig:
|
|
# Maze geometry
|
|
maze_cols: int = 25
|
|
maze_rows: int = 25
|
|
cell_size: int = 24
|
|
wall_width: int = 2
|
|
|
|
# GA / Training
|
|
population: int = 100
|
|
max_steps: int = 300
|
|
elite_frac: float = 0.30
|
|
mutation_std: float = 0.05
|
|
mutation_rate: float = 0.20
|
|
|
|
# Neural net
|
|
n_inputs: int = 8
|
|
n_hidden: int = 12
|
|
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
|