Closed shabin-slr closed 3 years ago
Yes.
That's because there is a lot of cities here, so tsp-solver decided to solve the problem with a simplified genetic algorithm. In this case, we can not have a better solution – only the good one. Try to use the latestPopulation
as you can see here https://github.com/nikbelikov/tsp-solver/blob/master/demo/index.ts#L68
Also please use https://github.com/nikbelikov/tsp-solver#parameters to calibrate the algorithm.
If we rerun the sample deployed at https://codesandbox.io/s/musing-davinci-i3tss, we'll get different results.
E.g:
Is this expected behaviour?