Description
Implement a new interactive visualizer for the Traveling Salesperson Problem (TSP) in the utilities category. This tool will allow users to generate random nodes (cities) on a canvas and visualize how different algorithms attempt to find the shortest path that visits every node exactly once.
Proposed Features
-
Interactive Node Placement: Allow users to click on the canvas to add nodes or generate $N$ random nodes automatically.
-
Algorithm Implementations:
- Greedy Search (Nearest Neighbor)
- Simulated Annealing
- Genetic Algorithm (Bonus)
- Brute Force (for small $N$)
-
Real-time Visualization: Show the current best path updating dynamically, along with a live counter of the current shortest distance calculated.
-
Playback Controls: Play, pause, and step-by-step execution.
Technical Details
- Create entry in
projects_registry.json under utilities.
- Implement core logic in a new
TSP-Visualizer.py script for the Python lab.
- Build corresponding web visualization using the HTML5 Canvas API in the web app, similar to the existing
pathfinding-visualizer.js.
Definition of Done
Description
Implement a new interactive visualizer for the Traveling Salesperson Problem (TSP) in the
utilitiescategory. This tool will allow users to generate random nodes (cities) on a canvas and visualize how different algorithms attempt to find the shortest path that visits every node exactly once.Proposed Features
Technical Details
projects_registry.jsonunderutilities.TSP-Visualizer.pyscript for the Python lab.pathfinding-visualizer.js.Definition of Done