Infinit Pacman with JavaScript. Using multiple path-finding algorithms: A*, Greedy Best First Search, and Hill Climbing Search
This project was implemented at the University of Missouri as part of the completion of "Artificial Intelligence 1" course by Dr. Yi SHang.
The issue of finding the shortest path is very paramount in geographical maps, IP routing, telephone networks. A Pathfinding method searches a graph by starting at one vertex and exploring adjacent nodes until the destination node is reached, generally with the intent of finding the cheapest route.
We intend to design a real time AI enemy that follows the player. This is not just the normal enemy-player tracker instead a pathfinder that compares several search algorithms and finds the shortest path to reach the player with dynamic obstacle avoidance. With the simultaneous changes in the grid pattern and search algorithms, we compare how efficient a particular algorithm is in finding the shortest path.
From this project, we intend to build a real time pathfinder that is robust, efficient and well versed with the dynamic environment.
You can simply double click on index.html
and use the app. Additionally, you can find the main code in sketch.js
You can simply open index.html
in your browser.
Additionally, you can run a local server. You need to have Python installed in your computer.
-
Run a simple http server using Python's built-in
http.server
:python -m http.server
-
Open
http://localhost:8000/
in your favorite browser
- p5.js - The HTML canvas library used
- Imad Eddine Toubal - Initial work - imadtoubal
This project is licensed under the MIT License - see the LICENSE file for details
- Inspiration: Coding Challenge 51.1: A* Pathfinding Algorithm
Happy coding!