Giter Site home page Giter Site logo

enpm692-porj2's Introduction

ENPM692-Porj2

Project 2 for ENPM692, Spring 2021

This project implements breath-first on an eight-way connected graph 400x300 unites with static obstacles.

For this project, pygame is used to visualise the graph, along with the nodes explored and the final path found.

Pygame is the only library used that is not built in.

To run:

python3 main.py
pygame 2.0.1 (SDL 2.0.14, Python 3.7.4)
Hello from the pygame community. https://www.pygame.org/contribute.html
Enter the X coordinate of the start point: 4
Enter the Y coordinate of the start point: 20
Enter the X coordinate of the target point: 6
Enter the Y coordinate of the target point: 9
Finding path...
Found path
Visited:  296
Path:  12
Done

The program will ask for what type of algorithm to use, followed by the start and target location. If you enter an invalid point, it will re-prompt you.

In the shown map, white represents free space, black is for obstacles, cyan is explored nodes, and the final path is depicted in red.

Known issues: While there is a function to perform an a* search, there are some issues with it. Because of this, it is not included as an option. a* does not always return the shortest possible path. I think there is a problem with the adding better nodes to the list in order. A* search is also very slow due to the need to sort and iterate through the open list every step.

Github repository: https://github.com/RoboRoyal/ENPM692-Porj2

enpm692-porj2's People

Contributors

roboroyal avatar

Watchers

James Cloos avatar  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.