Talk:Simulated annealing: Difference between revisions

Content added Content deleted
mNo edit summary
No edit summary
Line 18: Line 18:


::::: Another issue is this: ''Pick a random neighbour city v > 0 of u , among u's 8 (max) neighbours on the grid.'' vs ''The cities are '''all''' connected.'' I'm having a problem figuring out how this pair of constraints makes sense. (More specifically - what does this pair of constraints mean for my data structures?) --[[User:Rdm|Rdm]] ([[User talk:Rdm|talk]]) 20:45, 23 March 2016 (UTC)
::::: Another issue is this: ''Pick a random neighbour city v > 0 of u , among u's 8 (max) neighbours on the grid.'' vs ''The cities are '''all''' connected.'' I'm having a problem figuring out how this pair of constraints makes sense. (More specifically - what does this pair of constraints mean for my data structures?) --[[User:Rdm|Rdm]] ([[User talk:Rdm|talk]]) 20:45, 23 March 2016 (UTC)

:::::: Means that the graph is complete : you can go in one step from any city to any other one, using a single edge. This simplifies things, there is no need to describe the cities graph. A path (permutation) is always legal. The neighbours of a city u are the closest, at distance 1 or diagonally at distance √2. For example the neighbours of 0 are 1, 10, 11 . The neighbours of 37 are 36,38,47,27 and 46,28,49,26. When you pick 37 (at random) you choose (at random) one of oits eight neighbours. We swap only neighbours in order to have small perturbations at each step.--[[User:G.Brougnard|G.Brougnard]] ([[User talk:G.Brougnard|talk]]) 22:14, 23 March 2016 (UTC)