GithubHelp home page GithubHelp logo

liuhaozhe6788 / pathfinding Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 4.33 MB

Implementation of pathfinding algorithms on Wuhan city

Home Page: https://liuhaozhe6788.github.io/pathfinding

JavaScript 2.46% Shell 0.04% C++ 10.42% HTML 0.57% Jupyter Notebook 86.04% CSS 0.47%
astar-pathfinding uniform-cost-search alt-search ai-algorithm

pathfinding's Introduction

Pathfinding Algorithms

Implementation of Pathfinding Algorithms on road map of Wuhan for my 2022AI course final project. You can have a shot at it at https://liuhaozhe6788.github.io/pathfinding.

Demo

Here is the webpage for Pathfinding Algorithms:

alt text

After selecting the algorithm and moving the start and target nodes, click "Start progress". After that, a window would show the execution time and the map would display extended edges and the final path. For ALT Search and ALT Search improved, the map would also show two landmarks, which are inportant for pathfinding. A demo result of ALT Search improved looks like this:

alt text

Four algorithms

Uniform Cost Search: aka Dijkstra Algorithm.

A* Search: with euclidean bounds.

ALT Search: with triangular inequality lower bounds in this, the landmarks are selected using avoid methods in this.

ALT Search Improved: based on ALT search, one can select a subset of two landmarks that are close to and after the target node from all the landmarks before each pathfinding search.

Generally, ALT Search Improved is the fastest among all four algorithms.

How to run it with live-server

  1. Install node.js

  2. Install live-server with npm command

npm i live-server
  1. Run the website with
live-server

Rebind C++ code[optional]

The C++ code is binded with javascript using Emscripten and Embind, so you need to install Emscripten if you want to modify the C++ code. Install Emscripten

After modifying the C++ code, run

./build.sh

Troubleshooting

  1. Please refresh the page a couple of times if the map and markers are not rendered
  2. Please use a VPN if the map is not rendered completely

pathfinding's People

Contributors

liuhaozhe6788 avatar

Watchers

 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.