Simple Python GUI application to demonstrate the usage of different algorithms for finding the shortest path in a 2D maze.
- install python, version > 3.7.0
- create a new python virtual environment. guide
- in the terminal with the activated venv:
pip install -r requirements.txt
- clone the repository to your venv
- execute script from application entry point:
python -m gui.main
The config.yml can be freely edited to change the appearance, maze size and more. If you want to restore to default configuration values, simply delete the config.yml and run the application
- border_size - pixel width of the border surrounding the maze
- box_size - width/height of the maze box/tiles. Use this to edit the number of tiles in your maze.
- pax_x/pad_y - determine how much padding should be between gui components in the x and y direction.
- tick - number of updates per second. Mostly used for debugging purposes, recommended to keep at 60.
As long as no current maze operation is running, you can freely edit the maze however you like. To place a new wall
tile, simply press left mouse button
, to remove a wall tile, press the right mouse button
. The start and end tiles
are not editable.
You may draw lines by holding down the left/right mouse button and dragging the mouse across the screen.
Press c
to clear the maze.
Press shift
to draw straight lines.
NOTE: this works better if you place a tile first, press
shift
and then move in the direction you want to draw.
to adjust the iteration speed, simply drag the circle in the slider to increase/decrease the simulation speed. This can be done whenever, regardless of weather an active simulation is happening or not.