Naive "nearest neighbor" #TravellingSalesmanProblem approximation with just #SciPy, fast but crude. Maybe tomorrow I'll try to implement something from a scientific paper on the problem, or maybe a naive genetic algorithm just for fun. Code at: https://github.com/villares/sketch-a-day/tree/main/2025/sketch_2025_02_10
More sketch-a-day: https://abav.lugaralgum.com/sketch-a-day
If you like this, support my work: https://www.paypal.com/donate/?hosted_button_id=5B4MZ78C9J724 #Processing #Python #py5 #CreativeCoding
sketch-a-day/2025/sketch_2025_02_10 at main · villares/sketch-a-day

One visual idea a day. Contribute to villares/sketch-a-day development by creating an account on GitHub.

GitHub
@villares A MinMaxAntSystem would be very easy to implement and would give you numerical "pheromone" values on edges that could be interesting to display. It may give some kind of feedback loop for the interactivity.
@dreo @villares thank you! I'll have to read about it, sounds very cool!
@villares @dreo @villares If that can help, there's a simple implementation here, in a similar context: https://github.com/nojhan/ubergeekism/blob/master/ants.py
ubergeekism/ants.py at master · nojhan/ubergeekism

An attempt at using as many as possible COOL computer science stuff to produce a single image (Lindenmayer system, Penrose tiling, Travelling Salesman Problem, Ant Colony Optimization, A*, etc.). -...

GitHub