https://github.com/tekian/path-finder
Visualization tool to demonstrate how different search algorithms work.
https://github.com/tekian/path-finder
artificial-intelligence astar-algorithm dijkstra-algorithm kivy kivy-framework pathfinder pathfinding python python3 tekian-ai
Last synced: 6 months ago
JSON representation
Visualization tool to demonstrate how different search algorithms work.
- Host: GitHub
- URL: https://github.com/tekian/path-finder
- Owner: tekian
- License: gpl-3.0
- Created: 2018-08-02T16:02:49.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-08-06T20:31:22.000Z (about 7 years ago)
- Last Synced: 2025-03-26T04:35:00.201Z (7 months ago)
- Topics: artificial-intelligence, astar-algorithm, dijkstra-algorithm, kivy, kivy-framework, pathfinder, pathfinding, python, python3, tekian-ai
- Language: Python
- Homepage:
- Size: 603 KB
- Stars: 6
- Watchers: 0
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Path Finder
Path Finder is a visualization tool to demonstrate how different search algorithms work. I've created it while studying course _Intro to Artificial Intelligence_ (https://classroom.udacity.com/courses/cs271). UI is built on Kivy framework (https://kivy.org/#home).
## Installation
Install in two steps. Clone the repository and run provided script:
```
git clone https://github.com/tekian/path-finder.git
cd path-finder
.\pathfinder.bat (Windows)
./pathfinder.sh (Linux)
```Provided scripts execute following steps:
- Checks you have Python 3 installed (searches in `PATH`)
- Installs required dependencies (from [requirements.txt](./requirements.txt))
- Starts the application (by running [src/pathfinder.py](./src/pathfinder.py))(Nothing else. No need to be paranoid. Read sources [here](./pathfinder.bat) and [here](./pathfinder.sh).)
## Running
Run `pathfinder.sh` or `pathfinder.bat` depending on your platform. See [Installation](#installation).

## Features
Application supports two modes of map generation:
- **Grid Map** – You can provide `X`, `Y` and optionally how much `% Edges to keep` (edge cost equals 1)
- **File Spring Map** – Red from file ([example](./src/romania.json)) & positions generated by [Fruchterman-Reingold algorithm](https://networkx.github.io/documentation/networkx-1.9/reference/generated/networkx.drawing.layout.spring_layout.html) (Spring)It supports following search algorithms:
- [A* Search Algorithm](https://en.wikipedia.org/wiki/A*_search_algorithm) – Implementation at [a_star_finder.py](./src/pathfinding/algorithms/a_star_finder.py)
- [Greedy First Search](https://en.wikipedia.org/wiki/Greedy_algorithm) – Implementation at [greedy_finder.py](./src/pathfinding/algorithms/greedy_finder.py)
- [Breadth First Search](https://en.wikipedia.org/wiki/Breadth-first_search) – Implementation at [bfs_finder.py](./src/pathfinding/algorithms/bfs_finder.py)
- [Dijkstra (Least cost first search)](https://en.wikipedia.org/wiki/Dijkstra%27s_algorithm) – Implementation at [dijkstra.py](./src/pathfinding/algorithms/dijkstra_finder.py)(Code wise, these algortihm differ only in calculated cost function. See the [code](./src/pathfinding/algorithms) for details.)
You can choose from two playback modes:
- **Step** – You press `Step` every time you want to move forward with the search
- **Continuous** – You can control the speed & `Start`/`Stop` the algorithmLast but not least, you can control _Show options_ of nodes and edges at any time:
- **Show node names** - Name appears on top of the node
- **Show node costs** - Cost appears below the node
- **Show edge costs** - Cost appears in the middle of edge and below the line## Contributions
Contributions are welcome. If you have time, passion and idea, go ahead and create a pull request.