City Path Finder is a web application that utilizes the A* and Greedy Best-First Search (GBFS) algorithms to determine the optimal route between cities. This project aims to demonstrate the implementation of these pathfinding algorithms with a user-friendly interface.
Check out the live demo here.
- Select a starting city from a dropdown list.
- Choose between A* and GBFS algorithms for pathfinding.
- View the optimal path and its cost displayed in a user-friendly manner.
- Toggle between light and dark modes for better visual comfort.
Follow these instructions to get a copy of the project up and running on your local machine for development and testing purposes.
You will need the following software installed on your computer:
- Web browser (Chrome, Firefox, Safari, etc.)
- A text editor (VS Code, Sublime Text, Notepad++, etc.)
-
Clone the repository to your local machine using the following command:
git clone https://github.com/your-username/city-path-finder.git
-
Navigate to the project directory:
cd city-path-finder
-
Open
index.html
in your web browser to view the application.
- Open the application in your web browser.
- Select a starting city from the dropdown list.
- Choose an algorithm (A* or GBFS).
- Click the "Find Path" button to calculate the optimal route.
- View the resulting path and cost displayed below the button.
- Use the toggle switch in the top right corner to switch between light and dark modes.
If you want to contribute to this project, please follow these steps:
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch
). - Make your changes and commit them (
git commit -m 'Add new feature'
). - Push to the branch (
git push origin feature-branch
). - Open a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.