This repo implements a variety of algorithms leveraging powerful python features: heapq, dataclasses, __getitem__
, generators, namedtuple, defaultdict, ...
matplotlib and rich are used to visualize the algorithms step by step.
I used python 3.9.x.
pip install -r requirements.txt
-
Find the minimum number of coins among permitted values to reach a value using dynamic programming: mini_coin_dynamic.py
-
Generate a graph using random walk and random extra connections and find the shortest path using Dijkstra algorithm.
-
Implement and animate bidirectionnal Dijkstra and A* algorithms using iterators and heuristics
-
Generate a grid with obstacles and animate bidir Dijkstra versus bidir A* versus fast but inconsistent bidir A*
- Generate and solve a knapsack problem using branch and bound