This was part of a college assignment where we implemented AStar and GreedyBestFirstSearch algorithms.
This is the program looks like with a grid drawn in it:
There are 5 different tiles that can be used:
- Start tile - Green
- End tile - Red
- Water tile (acts like a wall) - Blue
- Fast road tile (costs 1 to travel through) - Yellow
- Slow road tile (costs 4 to travel through) - Orange
You can switch between the different tiles by clicking/dragging across the grid.
There can only be 1 start tile and 1 end tile.
- Load - Loads a saved grid (from "input.txt").
- Save - Saves the currently displayed grid and its algorithm (into "input.txt").
- Reset - Resets the board, changing all the tiles to Fast road tiles (yellow).
- Algorithm - A drop down menu that allows you to choose what algorithm you want to use (default is A*).
- Run - Runs the selected algorithm, and draws the path):