Skip to content

πŸ‘“ Visualization of the Breadth First Search pathfinding algorithm

Notifications You must be signed in to change notification settings

maxontech/breadth-first-search

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

17 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Breadth-First Search Algorithm in Python (with Pygame)

Preview

Breadth-First Search in Python using Pygame! πŸ‘“

Show support:
Star 🌟 the Project: GitHub stars
Follow 🀝 on GitHub: GitHub followers

Made by maxontech

Table of contents

Description

This is a visual implementation of the Breadth-First Search algorithm.

You can manually draw walls, and the algorithm will find the path from the start to the end.

YouTube Videos

Python Pathfinding Vizualisation

Installation

Requirements: You must have Python installed and preferably a code editor like PyCharm.

  1. Clone the repository
  2. In the terminal, navigate to the directory where the repository was cloned, e.g., C:\Users\Max\PycharmProjects\breadth-first-search-algorithm
  3. Create a virtual environment, activate it, and install pygame by running the following commands in the terminal:
    python -m venv venv #This creates a virtual environment
    venv\Scripts\activate #This activates the virtual environment
    pip install -r requirements.txt #This installs the required libraries
  4. Run the game by running the following command in the terminal:
    python pathfinding.py

Controls

  • Left mouse to draw walls
  • Right mouse to set target point
  • Space to start the algorithm

Libraries

  • pygame: Pygame is a cross-platform set of Python modules designed for writing video games.

FAQ

Contact

Feel free to reach out to me on Twitter if you have any questions or feedback! Hope you find this useful!

About

πŸ‘“ Visualization of the Breadth First Search pathfinding algorithm

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages