even given the help of regretInsertion, the current code couldn't find the correct (though simple) solution.
I tried to implement simulated annealing , and it works. this is a placeholder to clean out the code and formally put it into the repo.
the basic idea is that currently either BestInsertion or RegretInsertion always inserts a node in the position with the lowest incremental cost (RegretInsertion only changes the order to consider each candidate node, and the rest are the same as BestInsertion), instead of this fixed decision, simulated annealing changes that to be a probablistic decision, with a probability very random at first, and gravitating more towards the fixed decision as "temperature cools down"
I was trying to solve this problem https://github.com/yangyangyyy/tsp_problem/wiki
even given the help of regretInsertion, the current code couldn't find the correct (though simple) solution.
I tried to implement simulated annealing , and it works. this is a placeholder to clean out the code and formally put it into the repo.
the basic idea is that currently either BestInsertion or RegretInsertion always inserts a node in the position with the lowest incremental cost (RegretInsertion only changes the order to consider each candidate node, and the rest are the same as BestInsertion), instead of this fixed decision, simulated annealing changes that to be a probablistic decision, with a probability very random at first, and gravitating more towards the fixed decision as "temperature cools down"