• 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
I guess 10 years of piano, 5 years of penspinning, and of course rubik's cube help moving the fingers on the keyboard :p

i do all with the right hand (index for left, middle for up/down, 4th (don't know the english name :p) for right), am i the only one ?

omg.

Edit:
I've updated online version (v 5.1 now). There is a table and TPS for each single solve.
 
Last edited:

vcuber13

Member
Joined
Oct 14, 2009
Messages
2,477
Location
Near Toronto
WCA
2009METH01
YouTube
Visit Channel
best time: 6.93
worst time: 14.24

best avg5: 8.77 (σ = 1.18)
best avg12: 9.79 (σ = 1.53)
best avg100: 10.93 (σ = 1.18)


12.54, 9.13, 12.71, 11.16, 11.30, 9.94, 12.22, 10.06, 9.23, 11.56, 10.54, 10.27, 13.08, 11.34, 11.14, 9.23, 9.12, 6.93, 10.33, 11.92, 13.65, 12.59, 11.63, 11.95, 11.50, 10.05, 12.48, 9.57, 10.25, 9.47, 12.41, 8.78, 9.38, 11.86, 9.36, 12.67, 11.43, 11.02, 12.78, 11.48, 11.07, 7.43, 9.02, 10.55, 10.34, 9.98, 11.87, 10.54, 11.46, 11.12, 11.15, 12.21, 13.16, 11.12, 10.51, 9.93, 12.09, 10.36, 10.59, 10.98, 13.23, 10.33, 11.64, 11.24, 13.56, 12.18, 11.30, 12.60, 10.89, 11.87, 9.86, 11.94, 7.41, 9.81, 7.47, 9.77, 9.07, 13.66, 8.61, 12.65, 11.65, 8.96, 9.10, 10.78, 10.82, 11.97, 10.79, 13.24, 9.47, 11.12, 14.24, 10.69, 12.35, 10.31, 9.96, 9.43, 12.64, 9.44, 9.65, 10.69
 

stannic

Member
Joined
Jun 16, 2010
Messages
120
Location
The country of riddles
4x4 Ao12.
Code:
                Time        Moves
Mean	        20.019	    109.167
Avg	        19.485	    105.600
Best Ao5	17.316 (7)  91.000 (7)
Best Ao12	19.485 (1)  105.6 (1)

No.	Times	Moves	TPS
12	21.662	116	5.355
11	13.972	84	6.012
10	19.391	113	5.827
9	18.985	96	5.057
8	15.613	87	5.572
7	17.350	90	5.187
6	31.398	170	5.414
5	20.526	114	5.554
4	16.639	96	5.770
3	28.678	147	5.126
2	18.152	97	5.344
1	17.857	100	5.600
And I'm sub 20 (mo10) now.
Code:
 	Time 		Moves
Curr 	19.914 		97
Mean 	19.419 		106.600
Avg 	19.404 		106.250
  	  	 
Curr Ao5 19.626 	104.000
Best Ao5 18.946 (5) 	104.000 (6)

No. 	Times 	Moves 	TPS
10	19.914	97	4.871
9	20.330	113	5.558
8	20.997	117	5.572
7	17.874	98	5.483
6	18.635	101	5.420
5	17.504	101	5.770
4	22.658	126	5.561
3	22.697	127	5.595
2	17.318	97	5.601
1	16.267	89	5.471
Previous PB (mo10): 21.382
 
Last edited:

qqwref

Member
Joined
Dec 18, 2007
Messages
7,834
Location
a <script> tag near you
WCA
2006GOTT01
YouTube
Visit Channel
Should I record a 255 puzzle as well? lol

@oranjules: Wow, 10-11 tps... I can press keys pretty fast but I'm not really used to going fast on the arrow keys. And your method is kinda weird, I'm honestly not quite sure what you are doing a lot of the time.
 

Jaycee

Member
Joined
Jul 17, 2011
Messages
1,843
Location
Crestwood, Illinois
YouTube
Visit Channel
1) Should I record a 255 puzzle as well? lol

@oranjules: Wow, 10-11 tps... I can press keys pretty fast but I'm not really used to going fast on the arrow keys. 2) And your method is kinda weird, I'm honestly not quite sure what you are doing a lot of the time.

1) Yes please! I wanna see how you do it.

2) I use the same method he does, only I avg about 6 TPS >.>

Solve 1-4
Solve 5-8
Solve 9 and 13
Solve 10 and 14
Cycle the remaining three (11, 12, 15)
 

stannic

Member
Joined
Jun 16, 2010
Messages
120
Location
The country of riddles
7x2-2x2 relay, mo10 pb: 1:08.932
Code:
No. 	Times         	Moves 	TPS
10	1:08.211	357	5.234
9	54.516        	262	4.806
8	1:14.570	359	4.814
7	1:10.952	355	5.003
6	1:04.965	316	4.864
5	1:06.078	321	4.858
4	1:11.321	347	4.865
3	1:10.295	333	4.737
2	1:13.255	380	5.187
1	1:15.161	378	5.029
 

stannic

Member
Joined
Jun 16, 2010
Messages
120
Location
The country of riddles
I use a really simple method (the one here); is there a more advanced method?

On large puzzles, you can group tiles and move 'snakes' instead of single tiles. This is much faster than moving tiles one-by-one.

With grouping the tiles, learning many cases can probably improve speed. (E.g., how to move up three consecutive tiles in row? Or what to do if you almost solved 16x16 but just noticed that tiles 1 and 2 are swapped?)

One more possibility is to reduce NxN puzzle to (N-1)x(N-1) puzzle. You solve fringe tiles (1,2,3,4,5,9,13), then fringe tiles of remaining 3x3 puzzle (6,7,8,10,14), then cycle remaining 2x2 puzzle. Potentially it is faster but it requires faster thinking / memorizing the sequence of tiles (not in numerical order).

On large puzzles, such as 16x16, this method is definitely faster but harder to execute (for example, see Ben's video in this thread).

One more improvement over this method is to reduce (NxN) to (N-2)x(N-2) ("two layers at a time") but I haven't tried this.

- Bulat

Edit: To all: I have a question regarding the coloring of tiles. In the current implementation of the timer, there are two colors A and B for even and odd tiles. I thought about some other potentially useful ways to color the tiles:

1) Tiles from odd columns (or rows) with color A; tiles from even columns (or rows) with color B;
2) Already solved rows with color A; tiles from the first unsolved yet row with color B; all remaining tiles with color C;
3) Already solved tiles with color A; tiles from the first unsolved yet "fringe" with color B; all remaining tiles with color C;
12345
6713810
1112915
1617191420
2122182324
4) Solved tiles with color A; unsolved tiles with color B;
5) Without coloring at all (all the tiles with color C);
6) Something else?

Such modification could be useful to learn the particular cases, to improve speed etc. However, on "real competitions" some may consider it as being "against rules" because it simplifies the solving.
 
Last edited:

qqwref

Member
Joined
Dec 18, 2007
Messages
7,834
Location
a <script> tag near you
WCA
2006GOTT01
YouTube
Visit Channel
1) Tiles from odd columns (or rows) with color A; tiles from even columns (or rows) with color B;
This is what we already do, right? It may be useful to have some kind of plaid design with 4 colors: A for even row/even column, B for even row/odd column, etc. etc.

2) Already solved rows with color A; tiles from the first unsolved yet row with color B; all remaining tiles with color C;
3) Already solved tiles with color A; tiles from the first unsolved yet "fringe" with color B; all remaining tiles with color C;
4) Solved tiles with color A; unsolved tiles with color B;
These could be useful but I think they would also be against the rules since the color of a tile would change over the course of a solve.

5) Something else?
I would actually like to have a different color on each row. You could either keep a list of different colors (max 16, so it's not too hard) or use a function like this:
Code:
// return an array of x different colors
function getColors(x) {
 var colors = [];
 for (var i=0; i<x; i++) {
  h = 6 * i/x;
  w = Math.floor(h);
  f = h - w;
  color = "#";
  if (w==0) {
   color += "FF" + strHex(f) + "00";
  } else if (w==1) {
   color += strHex(1-f) + "FF00";
  } else if (w==2) {
   color += "00FF" + strHex(f);
  } else if (w==3) {
   color += "00" + strHex(1-f) + "FF";
  } else if (w==4) {
   color += strHex(f) + "00FF";
  } else {
   color += "FF00" + strHex(1-f);
  }
  colors.push(color);
 }
 return colors;
}

// float from 0 to 1, multiplied by 256, to string hex
function strHex(n) {
 x = Math.floor(n*256);
 if (x>255) x=255;
 return "0123456789ABCDEF"[Math.floor(x/16)] + "0123456789ABCDEF"[x%16];
}
 

stannic

Member
Joined
Jun 16, 2010
Messages
120
Location
The country of riddles
This is what we already do, right? It may be useful to have some kind of plaid design with 4 colors: A for even row/even column, B for even row/odd column, etc. etc.

Not exactly. Coloring odd/even tiles and coloring odd/even columns looks the same when the width of the puzzle is even. For puzzles with odd width (5x4, 7x7, 3x6) it's two different coloring schemes.

Edit: ninja'd by vcuber13.

As for your idea of having 4 colors, I'd agree. I've seen somewhere designed in such way real 4x4 puzzle (maybe on Jaap's site).

These could be useful but I think they would also be against the rules since the color of a tile would change over the course of a solve.

Yeah, it's true, and it's the whole point of having such scheme :) You see what tiles you're solving at the moment. During learning, it may be useful, but it's most likely not fair when competing.

I would actually like to have a different color on each row. You could either keep a list of different colors (max 16, so it's not too hard) or use a function like this:

Nice idea. And wow, thanks for the code. I'll see what it does.

- stannic
 
Last edited:

stannic

Member
Joined
Jun 16, 2010
Messages
120
Location
The country of riddles
v5.2 is released. Multiple coloring schemes are included. A short description:
- Alt XXX = Alternate XXX (interleaving odd and even);
- Live XXX are coloring schemes where the colors of tiles would change during a solve to show current progress;
- Multi XXX are schemes where there is a different color on each row/column/fringe level (qqwref's function is used);
- Mono is scheme with only one color;
- Plaid is scheme with four colors.

Note that Live schemes are rather slow on large puzzles. This is because after each move, all tiles are re-colored. It is possible to optimize the code but I have not yet as Live schemes are anyway "against rules" for at least two reasons :)

I've had to add two colors to existing two colors in each of color sets. Please comment if you think some colors are chosen poorly (and add your suggestions of better colors).

- stannic
 
Last edited:

qqwref

Member
Joined
Dec 18, 2007
Messages
7,834
Location
a <script> tag near you
WCA
2006GOTT01
YouTube
Visit Channel
I notice you have code like this:
Code:
	if (color_scheme == 'mr') return getColors(puzzle.h)[homerow];
	if (color_scheme == 'mc') return getColors(puzzle.w)[homecol];
	if (color_scheme == 'mf') return getColors(maxf)[maxf - 1 - homef];

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.
Code:
// return the i'th color out of x possible colors
function getColor(x, i) {
  h = 6 * i/x;
  w = Math.floor(h);
  f = h - w;
  color = "#";
  if (w==0) {
   color += "FF" + strHex(f) + "00";
  } else if (w==1) {
   color += strHex(1-f) + "FF00";
  } else if (w==2) {
   color += "00FF" + strHex(f);
  } else if (w==3) {
   color += "00" + strHex(1-f) + "FF";
  } else if (w==4) {
   color += strHex(f) + "00FF";
  } else {
   color += "FF00" + strHex(1-f);
  }
  return color;
}
 
Top