How marriam00/traffic_escape works
Traffic Escape is a playable vehicle-clearance puzzle with search-based solvers and a comparison interface. In the main workflow, a player selects a solver in the GUI; the solver explores game states under the level’s blocking rules and returns a move sequence and statistics, which the GUI plays and displays. A command-line entry point also runs the solvers and prints their results. The excerpts show the solver dispatch and core rules; unsampled GUI code and other implementation details are not inferred.
Main entry points: gui.py Game GUI · main.py CLI Runner · game.py Game Rules · best_first.py Best-First Engine
Components 11
Interfaces
- Game GUI
gui.py - CLI Runner
main.py
Puzzle Domain
- Game Rules
game.py - Level Layout
level.py
Search Algorithms
- Depth-First Search
algorithms/dfs.py - Uniform-Cost Search
algorithms/ucs.py - Greedy Search
algorithms/greedy.py - A-Star Search
algorithms/astar.py - Genetic Search
algorithms/genetic.py
Shared Search
- Best-First Engine
algorithms/best_first.py
Other components
- Player
Connections 20
- Player → Game GUI: plays
gui.py - Game GUI → Game Rules: resets and checks
gui.py - Game GUI → Level Layout: reads layout
gui.py - Game GUI → Depth-First Search: dispatches
gui.py - Game GUI → Uniform-Cost Search: dispatches
gui.py - Game GUI → Greedy Search: dispatches
gui.py - Game GUI → A-Star Search: dispatches
gui.py - Game GUI → Genetic Search: dispatches
gui.py - CLI Runner → Depth-First Search: runs
main.py - CLI Runner → Uniform-Cost Search: runs
main.py - CLI Runner → Greedy Search: runs
main.py - CLI Runner → A-Star Search: runs
main.py - CLI Runner → Genetic Search: runs
main.py - Game Rules → Level Layout: loads layout
game.py - Depth-First Search → Game Rules: expands states
algorithms/dfs.py - Uniform-Cost Search → Best-First Engine: delegates
algorithms/ucs.py - Greedy Search → Best-First Engine: delegates
algorithms/greedy.py - A-Star Search → Best-First Engine: delegates
algorithms/astar.py - Best-First Engine → Game Rules: expands states
algorithms/best_first.py - Genetic Search → Game Rules: simulates moves
algorithms/genetic.py