• Welcome to the Speedsolving.com, home of the web's largest puzzle community!
    You are currently viewing our forum as a guest which gives you limited access to join discussions and access our other features.

    Registration is fast, simple and absolutely free so please, join our community of 40,000+ people from around the world today!

    If you are already a member, simply login to hide this message and begin participating in the community!

Mr.Toad's Fifteen puzzle with timer (modified by stannic)

stannic

Member
Joined
Jun 16, 2010
Messages
120
Location
The country of riddles
It would save some time to either store the result of getColors (updating when the puzzle size or color scheme is changed), or to just not compute the whole array each time, e.g.

Yes, you're right. Changed the code to not compute the array. Also, changed a bit behavior of scrambling function (in v.5.2, scrambling 16x16 puzzle with Live XXX scheme was very slow). Updated online link.

I'll see if there are other ways to optimize speed. Also, the code is rather long and could be shortened (e.g., right now I have three separate functions for Ao5, Ao12 and Ao100).

Edit: should work more or less fast now. Also, uploaded 5.2 upd 2 offline.

- stannic
 
Last edited:

qqwref

Member
Joined
Dec 18, 2007
Messages
7,834
Location
a <script> tag near you
WCA
2006GOTT01
YouTube
Visit Channel
Very nice! I thought I should beat that, so I gave it a try and got... 28:16.555 in 9940 moves :p


And no, I don't do this weird row/column shift thing every time, I just felt like doing it on this solve. In fact, I'm thinking I should have started the columns later.


EDIT: I wonder... how does the movecount on an NxN puzzle grow? N^2? N^3? N^4? Something else entirely?
 
Last edited by a moderator:

stannic

Member
Joined
Jun 16, 2010
Messages
120
Location
The country of riddles
Very nice! I thought I should beat that, so I gave it a try and got... 28:16.555 in 9940 moves :p

And no, I don't do this weird row/column shift thing every time, I just felt like doing it on this solve. In fact, I'm thinking I should have started the columns later.

Well, I've did not reduction to (N-1) x (N-1) too. I've just used Live Rows mode.

This is to show how it is unfair to use it on competitions...

Edit:

EDIT: I wonder... how does the movecount on an NxN puzzle grow? N^2? N^3? N^4? Something else entirely?

Probably as N[SUP]3[/SUP]. Basically, you need O(N) moves to solve one tile, and there are O(N[SUP]2[/SUP]) tiles.

I've looked at my PBs (Mo10). They were not established yet, though. Also, it's not FMC but just the best movecounts from speedsolves.

2x2: 4.0 = 2[SUP]3[/SUP] * 0.5
3x3: 42.5 = 3[SUP]3[/SUP] * 1.574
4x4: 100.7 = 4[SUP]3[/SUP] * 1.573
5x5: 219.8 = 5[SUP]3[/SUP] * 1.758
6x6: 438.2 = 6[SUP]3[/SUP] * 2.029
7x7: 724.8 = 7[SUP]3[/SUP] * 2.113
8x8: 1280.0 = 8[SUP]3[/SUP] * 2.5

16x16 (the best "fair" single): 12932 = 16[SUP]3[/SUP] * 3.157

Assuming that after a certain amount of practice the TPS becomes constant independent of the size of puzzle, times would be also O(N[SUP]3[/SUP]).

Edit 2: My movecounts are not a good data source since I'm newbie. Someone else probably could provide better data. Maybe oranjules?

- stannic
 
Last edited:

oranjules

Member
Joined
Oct 29, 2010
Messages
90
WCA
2010DESJ01
For 4x4 and 3x3, that is what I get in average. The 2x2 isn't representative enough I think, and for bigger ones, my method (row by row) isn't move optimal. But the O(N^3) seems a good approximation.
 
O

Owen

Guest
So frustrating, I'm trying to do 2-7 relays, but my 7x7 time is bigger that 2-6 combined...
 

stannic

Member
Joined
Jun 16, 2010
Messages
120
Location
The country of riddles
Got a lucky 7x7 single: time 1:43.507, moves 606 = 7[SUP]3[/SUP] * 1.767.

Ao5 2:16.160 (774.333 moves), Ao12 2:23.732 (792.7 moves). Rainbow coloring (Multi Rows) used this time, so I believe the results are fair :)

Edit: Oh wow, 4x4 mo10 16.759. 109.4 moves.
best single 12.357 (83 moves), mean tps 6.528

Edit 2: 4x4 single 11.682, 67 moves, tps 5.570.
 
Last edited:

oranjules

Member
Joined
Oct 29, 2010
Messages
90
WCA
2010DESJ01
2-7 relay : sub-3 ! 2:46.812 PB, and i almost always do 2:5x.xx.
I optimized my last line solve (i do it with 3-cycles, so it's a bit long, especially for 16x16)
 
Top