Closed sagarvijaygupta closed 6 years ago
Sure, nice idea!
@MrDupin I implemented visualization of simulated annealing and it is working fine. Iteratively running simulated annealing, provided with the last found best path as start state, is giving good visual demonstration but to show two_opt
neighbors I will have to create a copy of the simulated_annealing
part as the present code just provides with the final output state, which will result in repetition of code.
Hmmm, if you want to add a revised simulated_annealing
code to the notebook (essentially replacing the search.py
code), you can definitely do so (as long as it is only for the notebook).
Maybe you can change the name a bit to show the differentiation. I believe you want the function to return not only the final state, but also the states in between? If so, you could name the new function something like simulated_annealing_full
.
@MrDupin yeah I wanted different states in between so I just created simulated_annealing2
in the file TSP.py
without changing search.py
in my last pull request. Should I change it the way you mentioned?
I think having it simulated_annealing_full
is a better name, since it gives a little bit more information. With just numbering people might forget which function is which, but with 'full' I doubt they will have the same problem.
Also, why do you create a separate file? You can simply write the function in a notebook cell, to keep things clean.
@MrDupin I will add the visualization to the search.ipynb
with the changed name. I initially added the file into the GUI folder.
The gui folder is only for tkinter applications. If you use tkinter for TSP, you can add it there, no problem. But if you want the visualization to go only on the notebook, the file is not needed. It depends on what you want to do:
@MrDupin I will try to implement both. It would be a nice experience on GUI with python. But firstly I will implement it on notebook.
Awesome, thanks!
@MrDupin Should I close this issue? As what was planned has been implemented in the last commit.
@sagarvijaygupta Yes. It's better to keep the Issues clean.
Thanks!
@MrDupin There is no visualization anywhere for simulated annealing and genetic algorithms which can be demonstrated on Traveling Salesman Problem. I would like to work on it.