https://github.com/darkstarstrix/pathfinder
Pathfinder algorithms
Science Score: 13.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (12.2%) to scientific vocabulary
Keywords
Repository
Pathfinder algorithms
Basic Info
Statistics
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 0
Topics
Metadata Files
README.md
A* Maze Solver
This project is an implementation of A* pathfinding algorithm to solve a maze. The maze is represented as a grid of cells, where each self can either be open or a wall. The goal of the algorithm is to find the shortest path from a start self to a goal self.
How it works
The* algorithm works by maintaining a priority queue of paths based on their cost and heuristic value. The heuristic value is an estimate of the cost from the current node to the goal. In this case, it's calculated as the Manhattan distance to the goal.
At each step, the algorithm chooses the path with the lowest total cost (path cost + heuristic value) and explores its neighbors. If a neighbor is the goal, it returns the path. If a neighbor is not the goal, it calculates the cost of the path to that neighbor and adds it to the queue. If it encounters a neighbor that it has seen before, it only updates the path if the new path is less expensive.
This process continues until the algorithm finds the goal or explores all reachable nodes. The result is the shortest path from the start to the goal, taking into account the cost of moving between nodes.
Visualization
The program visualizes the maze and the pathfinding process using Pygame. The start self, goal self, walls, and path are all represented with different colors. The program also animates the pathfinding process, showing all the nodes that the algorithm explores.
Usage
To run the program, execute the main Python script:
bash
python A_Pathfinder.py
You can adjust the size of the maze, the number of walls, and the start and goal cells by modifying the constants at the top of the script.
PathFinder
Pathfinder Algorithms
Maze Solver with an* Algorithm
This project implements a maze solver using an* algorithm. The goal is to find the shortest path from the start to the goal in a maze with obstacles.
Features
Maze Generation: The maze is generated with random walls (obstacles) to create a challenging environment.
An* Algorithm: The* algorithm is employed to find the optimal path from the start to the goal, considering the maze's layout.
Visualization: The Pygame library is used to visualize the maze, pathfinding process, and the final solution.
Requirements
- Python 3.x
- Pygame library (install with
pip install pygame)
Usage
Here is a short tutorial on how to run the A* Pathfinder algorithm using Git Bash:
Running A* Pathfinder with Git Bash
Clone the Repository: First, you need to clone the repository to your local machine. Open Git Bash and run the following command:
bash git clone https://github.com/DarkStarStrix/PathFinder.git cd PathFinderEnsure the Script is Executable: Make sure the
run_a_pathfinder.shscript is executable. You can use the following command in Git Bash:bash chmod +x run_a_pathfinder.shRun the Script: Execute the script to install the necessary dependencies and run the A* Pathfinder algorithm:
bash ./run_a_pathfinder.sh
Prerequisites
- Python: Ensure you have Python installed on your system.
- pip: Python package installer should be available.
This script will install the required Python packages and run the A* Pathfinder script, displaying the results using Pygame. Enjoy visualizing the pathfinding algorithm!
Owner
- Name: Allan Murimi Wandia
- Login: DarkStarStrix
- Kind: user
- Location: U.S.A
- Company: Freelance
- Website: https://www.kaggle.com/allanwandia
- Repositories: 1
- Profile: https://github.com/DarkStarStrix
Full stack Dev Turning ideas into projects
GitHub Events
Total
- Push event: 7
Last Year
- Push event: 7