Re^3: Travelling problem (Anyone better 86850?)
by BrowserUk (Patriarch) on Dec 23, 2013 at 15:40 UTC
|
Quite ruthless really. First time I have tried this approach, seems very powerful.
You mustn't be too ruthless though. You have to allow some of the less good candidates to evolve otherwise the algorithm will lock into a local minima and never explore further.
For example, there are at least 8 better solutions than the 86850:
84860
85075
85294
85469
85509
85684
85982
86197
But these will never be discovered by minor evolution from the 86850 solution.
You have to allow some radical variations (with significantly less good scores) to evolve for a while to discover these better ones.
With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
| [reply] [d/l] |
|
By widening the net, and a bit more shuffling I get:
84860
85075
85294
85469
85489
85509
85684
85923
| [reply] [d/l] |
|
That makes sense. I found I had to keep adding variations to avoid dead ends, the shuffles in particular helped. How would you choose those 'radical variations'? At random from the laggards, or according to some other criteria, some way of spotting potential?
| [reply] |
|
How would you choose those 'radical variations'?
I haven't found a good method yet. So far I've tried:
- Swapping pairs of nodes for the top N so far.
- Shuffling the nodes between two random points for the top N so far.
- Reversing the nodes between two random picks for the top N so far.
- Adding N new totally random shuffles to the set being evolved.
None of these seems to prevent the local minima phenomena.
The best approach I've found is once the top N stop changing; throw them all away (remembering the best 1) and start over with a completely new set of random picks.
With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
| [reply] |
Re^3: Travelling problem (Ignore this. Too quick off the mark!)
by BrowserUk (Patriarch) on Dec 23, 2013 at 15:32 UTC
|
Best I could get is also 8650.
I think you dropped a digit? (The absolute minimum is 74,283 and that's impossible :)
With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
| [reply] |
Re^3: Travelling problem (Anyone better 86850?)
by LanX (Saint) on Dec 23, 2013 at 15:50 UTC
|
> First time I have tried this approach, seems very powerful.
Well not sure if this problem isn't too easy for a good test, considering that the naive approach already gives a solution of 95166, which is probably good enough in most cases.¹
I have the impression that a little branch and bound with just the 3 or 4 shortest edges per node (instead of just one) would quickly produce much better results.
Cheers Rolf
( addicted to the Perl Programming Language)
¹) at least for the OP. | [reply] |
|
| [reply] |
|
95166
90498
90298
89653
88925
88838
86867
85294
84860
| [reply] [d/l] |
|
|
|
|
|
|
And what have you "proven" so far except dropping numbers and (most probably) miscalculating the lower bound?
Cheers Rolf
( addicted to the Perl Programming Language)
| [reply] |
|
|
|
| [reply] |
|
Well, which is far better than 95166. =)
Anyway both results are already within 20% from the optimum.
May I ask, if you cache intermediate results?
If you go from 1 to 24 and reach node X again via the same nodes (just other order) then the options for the rest of the way are identical.
In my experience such memoizing helps to bound very efficiently.
update
This caching is maybe better applied in a "breadth first search" to reduce pathes.
Cheers Rolf
( addicted to the Perl Programming Language)
| [reply] |
|
|