Giter VIP home page Giter VIP logo

ai-miniproject-mazesolver's Introduction

Path Finder

Uses Pygame to create an interactive visualization for the A* search algorithm

Description

Path Finder allows users to interactively create a maze, set the start and end points, and visualize the process of finding the shortest path using algorithms like A* and breadth-first search. Users can drag and draw walls, watch as the algorithm explores the maze, and see the shortest path highlighted, Incase no path is found - the application shows "No Solution".

Usage

  1. Run the main.py file using Python.
  2. Click to set the start and end points on the grid.
  3. Drag the mouse to create walls or obstacles.
  4. Press Enter to start the pathfinding algorithm.
  5. Watch as the algorithm explores the maze and finds the shortest path.
  6. Press Enter again to reset the grid and start a new pathfinding process.

A* Algorithm

The A* (A-star) algorithm is a popular pathfinding algorithm that combines the benefits of Dijkstra's algorithm (uniform cost search) and greedy best-first search. It uses heuristics to estimate the cost from the current node to the goal and makes informed decisions about which nodes to explore.

  • A* considers the cost to reach a node from the start (g-score) and the estimated cost to reach the goal from that node (f-score).
  • The f-score of a node is the sum of its g-score and h-score.
  • A* explores the nodes with the lowest f-score first, prioritizing the most promising paths.
  • By using a heuristic function (such as Manhattan distance), A* is able to find the shortest path efficiently.

Requirement

-pip install pygame -pip install sys -pip install heapq

ai-miniproject-mazesolver's People

Contributors

harshalkodgirwar avatar kanurkarprateek avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.