Best algorithms?

This forum is for discussions related to the Runaway Robot puzzle
DaymItzJack
Posts: 106
Joined: Thu Oct 29, 2009 9:21 pm

Best algorithms?

Post by DaymItzJack »

For the people who have reached 513, how long did it take your program to run the actual solving code? (Ignoring web requests)

I just wrote one in C# today and with minimal effort of efficiency, my program took roughly 30 seconds for all the solving.
gfoot
Posts: 269
Joined: Wed Sep 05, 2007 11:34 pm
Location: Brighton, UK

Post by gfoot »

Is that for all the levels, or just level 513? My final algorithm, implemented in Python, solved all the levels in under two seconds each, and took about a minute to solve them all in sequence (without redownloading them).
megabreit
Posts: 141
Joined: Sat Jan 03, 2009 3:33 pm

Post by megabreit »

My nearly none optimized perl script takes 231s for level 513... 100s took the "pre-optimization": probably the worst code I ever wrote :-) But I never changed it because it was "fast enough for the job".
Hardware is Intel i750 with 2.6GHz. The damn thing was slower when I solved it 2 years ago...
User avatar
CodeX
Posts: 350
Joined: Fri Oct 17, 2008 5:28 pm

Post by CodeX »

I think mine took about 0.08 seconds and was written in C that could have been improved by using a generator that would make the most likely to succeed maps first instead of going from one extremity to the other for each possible length. The code itself was actually quite simple and didn't employ anything fancy for threading or GPU use. Ran with Vista32 on a Core 2 Duo running at 2.1GHz on each core that happen to run at just 100°C
DaymItzJack
Posts: 106
Joined: Thu Oct 29, 2009 9:21 pm

Post by DaymItzJack »

Roughly 30 seconds was for all 513 puzzles in a row. Mine also had no threading or gui, I did however try to reduce the number of prints (to 0) but that's no way cheating.
tune2fs
Posts: 1
Joined: Thu Mar 05, 2009 2:37 pm

Post by tune2fs »

My Algorithm in Python needed about 0.5 sec for solving a Level. For two it took him about 12 sec, I am not sure why.
With downloading the Levels it took him about 15min from Level 140 to 513.
tiwe
Posts: 3
Joined: Thu Mar 05, 2009 2:09 pm

Post by tiwe »

I used a shell script for submitting results, downloading the next level and extracting the parameters.
The actual solving is done in single-threaded C.
Total CPU time (shell+C) for all levels is 30s in a 2.0GHz Core2. Most levels were solved in under 10ms, longest single-level runtime was 6.49s for 511.

The algorithm was developed after solving levels ~15-~40 with screen shots and GIMP.
da_hunta
Posts: 2
Joined: Sat Oct 08, 2011 10:56 pm

Fun Fun Fun

Post by da_hunta »

:D tried the hillclimbing algo optimizing the number of crashes ... works well till level 100 then it sucks^^
Allosentient
Posts: 273
Joined: Thu Apr 10, 2008 9:47 pm

Post by Allosentient »

CodeX wrote:Ran with Vista32 on a Core 2 Duo running at 2.1GHz on each core that happen to run at just 100°C
100°C? That seems a bit hot :)
User avatar
CodeX
Posts: 350
Joined: Fri Oct 17, 2008 5:28 pm

Post by CodeX »

Allosentient wrote:
CodeX wrote:Ran with Vista32 on a Core 2 Duo running at 2.1GHz on each core that happen to run at just 100°C
100°C? That seems a bit hot :)
Sure is, the CPU heatsink is poorly attached using 4 push/twist locks (one of which broke). After putting on a load more thermal paste and laying the tower horizontal so gravity keeps it attached the temperature has dropped at least 20°C
Besere
Posts: 12
Joined: Sat Mar 12, 2011 12:58 pm

Post by Besere »

Mine solved each lvl under 2 seconds or less.

Can someone send me their algorithm? or code?
I'm not trying to cheat or anything, I beat all 513 levels. You can check my profile.

Someone mentioned a polynomial time algorithm to solve this and I really want to know what that algorithm looks like.
irgangla
Posts: 3
Joined: Fri Sep 11, 2009 7:19 pm

A few results

Post by irgangla »

Finally I reached level 513 with some luck. I have a bug somewhere into my algorithm which I can not figure out at the moment, so I'm not able to solve the levels above 503 each time, but it seems there is some randomization into the levels so requesting a new version of the level helps sometime. This is the data from a run from level 1 to 503 a few minutes ago:

Download duration: 40.53 seconds
Maximum download duration: 40.53, average download duration: 5.218

Solving time for level 503: 0.774 seconds
Maximum solving duration: 6.057, average solving duration: 0.068
User avatar
Hippo
Posts: 339
Joined: Sat Feb 01, 2014 12:05 am
Location: Praha 5

Post by Hippo »

My solving times are about 300ms (till level 505), except level 448 they were under 1s. Level 448 needed 2082ms.

I have searched for all program paths with the same endpoint at once, using "dynamic programming".
The puzzle is so easy and levels small that doing more tricks would be waste of time.

--- edit ---
now around 510 there is a bit slowdown. Solution for 513 needed 8419ms and solution for 514 took 8199ms :).
go.to.hell
Posts: 5
Joined: Fri Dec 25, 2009 4:25 pm

Post by go.to.hell »

The average solution time with my Java program (690 lines, 141 for the solver) is 16 ms, 513 takes 779ms and 514 required with 1948ms nearly a quarter of the total time (8234ms).
AMindForeverVoyaging
Forum Admin
Posts: 496
Joined: Sat May 28, 2011 9:14 am
Location: Germany

Post by AMindForeverVoyaging »

Hippo wrote: --- edit ---
now around 510 there is a bit slowdown. Solution for 513 needed 8419ms and solution for 514 took 8199ms :).
I thought it does not go beyond level 512, which when you have solved it shows as 513 in your profile. Is that correct?
Post Reply