Skip to content

Repository files navigation


Logo

A*

Learn go concurrence with goroutines using design pattern (Semaphore, pipeline ...)


Table of Contents
  1. 🧭 About The Project
  2. 📋 Getting Started
  3. 💾 Usage
  4. 🔗 Contributing
  5. 📰 License
  6. 📫 Contact
  7. ⛱️ Acknowledgments

🧭 About The Project

🏗️ Built With

List of technologies / frameworks used during the project.

⬆️

📋 Getting Started

This project is a implementation of A* algorithm in Go. The goal is to compare the performance of the algorithm in Go and C++. Implementation in C++ is not asynchronous unlike the one in Go.

What's A* algorithm

Visualize

C++ repository

🗺️ Prerequisites

You need golang 1.21 for running this project.

⬆️

💾 Usage

To be more user-friendly, a Makefile is present at the root of the project. Even if you run with go run, you need to be at the root of the project and using img parameter with path of image you'd like to analyze.

⚙️ Using makefile

$ make run img=ressources/first_level.png # Run the application using go run under the hood
$ make run-build img=ressources/first_level.png # Run the application from dist folder, build it before !
$ make clean-cache # Clean the cache of the project
$ make build # Run the clean cache before building
$ make time # Time the execution of the application
$ make benchmark # Run the benchmark of the application, from benchmark folder

🏃 Using go run

$ go run main.go img=path_to_img # Run the application

📺Screenshots

Couleur selon H

Logo

Bidirectionnel

Logo

⬆️

📊 Improvement

  • Node.Already for flag already visited nodes | -25%
    • Avoid to iterate over a list of several hundred/thousand nodes at each iteration
  • PriorityQueue make us gain an exponential time, we found that it make us gain MINIMUM 10 000% on execution time

🧙 What's next, Bidirectionnel ?

We would implement a bidirectional A* algorithm. The idea is to run two A* algorithms at the same time, one from the start and one from the end. Unfortunately, we didn't have time to finish, and it's still bugged. However, we have some results :

  • On very small images, the launch of A* in bidirectional sometimes has no performance gain compared to classic A*.
    • Indeed, depending on the system scheduler, it may be that a routine ends before the other has even started.
  • On larger images, we observe a gain of up to 70% in some cases.

He would be interesting to base ourselves on these works to finalize / improve the bidirectional A* algorithm.

🔗 Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

⬆️

📰 License

Distributed under the MIT License. See LICENSE.txt for more information.

⬆️

📫 Contact

Reach our at : gauron.dorian.pro@gmail.com, florian.savoure@gmail.com .

Project Link: https://github.com/P0SlX/go-star

⬆️

⛱️ Acknowledgments

This space is a list to resources i found helpful and would like to give credit to.

⬆️

Template inspired by othneildrew

About

A* en Go, tout simplement

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages