# Strictly for fun: TSP images with Julia

**URL:** <https://discourse.julialang.org/t/strictly-for-fun-tsp-images-with-julia/40527>\
**Category:** Offtopic\
**Tags:** plotting, graphics\
**Created:** [May 31, 2020, 11:45pm UTC](https://discourse.julialang.org/t/strictly-for-fun-tsp-images-with-julia/40527 "2020-05-31T23:45:25Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![evanfields](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/evanfields/32/1744_2.png) [@evanfields](https://discourse.julialang.org/u/evanfields)\
**Post date:** [May 31, 2020, 11:45pm UTC](https://discourse.julialang.org/t/strictly-for-fun-tsp-images-with-julia/40527/1 "2020-05-31T23:45:25Z")

</div>

(Because we can’t all be as good as @cormullion, but you gotta start somewhere…)

I put together a small personal [project](https://github.com/evanfields/TSPImages.jl/tree/master) to generate TSP-style images in Julia. The classic example is the [TSP Mona Lisa](http://www.math.uwaterloo.ca/tsp/data/ml/monalisa.html), though I should be up front that my implementation chokes on instances about 1/50th that size and doesn’t solve anything to certified optimality. Nonetheless I think the output it generates is kinda cool:

 ![jl_logo_out](https://global.discourse-cdn.com/julialang/original/3X/c/a/ca82f2be8b4e336e423b07f9be6b79900087e524.png)

Big thanks to the many contributors to LightGraphs, Gadfly, and Images; those packages do all the hard work 🙂

---

<div class="post-metadata">

**Author:** ![cormullion](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cormullion/32/49131_2.png) [@cormullion](https://discourse.julialang.org/u/cormullion)\
**Post date:** [June 1, 2020, 7:39am UTC](https://discourse.julialang.org/t/strictly-for-fun-tsp-images-with-julia/40527/2 "2020-06-01T07:39:42Z")

</div>

Wow, that’s awesome. I’ll definitely be ~~stealing~~ re-using some of your code! 🙂

---

<div class="post-metadata">

**Author:** ![Wikunia](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/wikunia/32/2180_2.png) [@Wikunia](https://discourse.julialang.org/u/Wikunia)\
**Post date:** [June 1, 2020, 9:50am UTC](https://discourse.julialang.org/t/strictly-for-fun-tsp-images-with-julia/40527/3 "2020-06-01T09:50:47Z")

</div>

Looks awesome! Reminds me of this kaggle challenge: [Understanding the problem and some sample paths | Kaggle](https://www.kaggle.com/seshadrikolluri/understanding-the-problem-and-some-sample-paths)

Btw seems like your Mona Lisa link is broken or is it just for me?

---

<div class="post-metadata">

**Author:** ![evanfields](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/evanfields/32/1744_2.png) [@evanfields](https://discourse.julialang.org/u/evanfields)\
**Post date:** [June 3, 2020, 6:48pm UTC](https://discourse.julialang.org/t/strictly-for-fun-tsp-images-with-julia/40527/4 "2020-06-03T18:48:13Z")

</div>

Wow, what a cool Kaggle challenge. And sort of charming to see William Cook’s team atop the leaderboards by just throwing the problem to Concorde 🙂

The Mona Lisa link was originally broken but works for me now.

---

<div class="post-metadata">

**Author:** ![Wikunia](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/wikunia/32/2180_2.png) [@Wikunia](https://discourse.julialang.org/u/Wikunia)\
**Post date:** [June 3, 2020, 6:59pm UTC](https://discourse.julialang.org/t/strictly-for-fun-tsp-images-with-julia/40527/5 "2020-06-03T18:59:36Z")

</div>

Haha yeah it was a fun one. I visualized one of my tours: [Kaggle Santa 2019 Prime run - YouTube](https://youtu.be/_PQEbcb854k)

It was actually very funny that some people asked whether we can use the concorde solver for it and asked William Cook which made him aware of the challenge and was Top 1 a week after that 😃
