• 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
but then you will lose the previous versions

Well, I could make new page to move previous version, and then replace it on the old page with new version.

Or/and I can zip all old versions together (because there are too many versions :|) I'm not sure if it is very useful to have all online versions. Maybe it's sufficient to provide single zip archive.

- stannic

IE-compatible 7.1.ie.01 version (beta) is available.

One issue with Internet Explorer is that localStorage (apparently) does not work in offline version (so PBs will not be saved if you're using offline version in IE). In online version, it seems to work normally.

For those interested in changes:
- .textContent replaced with .innerHTML
- textarea.textContent replaced with textarea.value (why)
- addEventListener() does not work in IE 8.0, attachEvent() (IE-specific) used instead
- used e.returnValue = false; instead of e.preventDefault() (why)
Edit: The link is shortened to bitly.com/stannic15 from now.
 
Last edited:

ThomasJE

Premium Member
Joined
Dec 31, 2011
Messages
1,791
Location
England
YouTube
Visit Channel
Just done an Ao100:
Code:
No.	Times	Moves	TPS
100	21.281	131	6.156
99	19.469	105	5.393
98	26.297	148	5.628
97	22.421	135	6.021
96	15.063	106	7.037
95	21.171	129	6.093
94	13.406	88	6.564
93	19.000	139	7.316
92	16.031	109	6.799
91	14.258	92	6.453
90	26.523	161	6.070
89	16.619	91	5.476
88	23.078	143	6.196
87	18.703	113	6.042
86	26.196	162	6.184
85	16.883	100	5.923
84	19.827	129	6.506
83	30.817	183	5.938
82	20.059	121	6.032
81	26.016	156	5.996
80	19.884	136	6.840
79	21.010	133	6.330
78	24.068	146	6.066
77	20.560	123	5.982
76	17.843	108	6.053
75	20.256	131	6.467
74	22.676	133	5.865
73	19.395	125	6.445
72	21.847	136	6.225
71	19.003	117	6.157
70	20.974	114	5.435
69	22.016	148	6.722
68	15.677	105	6.698
67	19.821	110	5.550
66	19.452	111	5.706
65	19.768	115	5.817
64	18.930	112	5.917
63	17.476	95	5.436
62	17.531	107	6.103
61	27.156	167	6.150
60	23.594	167	7.078
59	18.734	126	6.726
58	20.422	120	5.876
57	23.609	148	6.269
56	19.579	121	6.180
55	20.531	122	5.942
54	27.344	176	6.437
53	20.570	136	6.612
52	15.148	100	6.602
51	20.914	125	5.977
50	23.203	127	5.473
49	19.610	126	6.425
48	20.532	123	5.991
47	19.406	124	6.390
46	16.610	89	5.358
45	22.617	144	6.367
44	19.922	110	5.522
43	21.938	138	6.290
42	30.032	164	5.461
41	21.515	131	6.089
40	20.516	116	5.654
39	19.250	117	6.078
38	31.461	190	6.039
37	22.141	145	6.549
36	22.157	144	6.499
35	16.164	108	6.682
34	20.047	137	6.834
33	23.148	153	6.610
32	16.188	101	6.239
31	24.062	149	6.192
30	27.844	175	6.285
29	15.046	101	6.713
28	21.266	141	6.630
27	19.547	130	6.651
26	22.149	124	5.598
25	23.586	146	6.190
24	17.164	116	6.758
23	24.015	150	6.246
22	25.492	151	5.923
21	22.265	142	6.378
20	15.485	112	7.233
19	14.297	87	6.085
18	20.485	127	6.200
17	23.594	138	5.849
16	16.063	104	6.475
15	30.429	171	5.620
14	22.766	141	6.193
13	14.328	91	6.351
12	23.938	142	5.932
11	16.734	107	6.394
10	28.360	149	5.254
9	14.461	100	6.915
8	23.321	136	5.832
7	23.781	129	5.424
6	24.407	150	6.146
5	22.688	132	5.818
4	26.421	161	6.094
3	20.744	131	6.315
2	23.156	149	6.435
1	16.938	115	6.789
Code:
 	Time	Moves
Curr	21.281	131
Best	13.406	87
Mean	21.002	129.380
Avg	20.973	129.194
 	 	 
Curr Ao5	21.057		124.000
Best Ao5	16.430 (91)	110.000 (62)
Curr Mo10	18.840		118.2
Best Mo10	18.385 (87)	113.4 (62)
Curr Ao12	19.161		118.5
Best Ao12	18.700 (85)	115.2 (62)
Curr Ao50	20.514		126.729
Best Ao50	20.514 (51)	126.729 (51)
Curr Ao100	20.973		129.194
Best Ao100	20.973 (1)	129.194 (1)
All PB's as far as I'm concerned (never recorded PB's before and I don't remember getting faster times than this).
 

ben1996123

Banned
Joined
May 17, 2009
Messages
4,972
Location
Ponyville
WCA
2009WHIT01
YouTube
Visit Channel
am still 2slow D:

13.38 15 puzzle single, second sub20. 72 moves lol.

also, does anypony apart from me use ijkf for controls? also @stannic, you can remove s and l from my control scheme, it was just a bad habit :p
 

stannic

Member
Joined
Jun 16, 2010
Messages
120
Location
The country of riddles
am still 2slow D:

13.38 15 puzzle single, second sub20. 72 moves lol.

also, does anypony apart from me use ijkf for controls? also @stannic, you can remove s and l from my control scheme, it was just a bad habit :p

Well, maybe it was just a bad habit, but it could be easily someone else's bad habit :p

And I see no reason (or is it?) to remove (this) functionality unless it's a performance issue and/or someone feels uncomfortable due to its presence. I personally don't use ijkf(sl) (I stick with arrows :p), but I tried some solves with it, and it seems to be quite nice scheme, especially if you're used to it.

I may even consider switching to it if I will not be able to stay with arrows. Some consequence of extensive testing the program is that I feel like arrow keys slide on the keyboard just as physical tiles. It makes me dizzy :\

Basically, the control schemes are encoded in the following code somewhere around lines 130-140 in the current version:

Code:
[I]/* control keys to move tiles */[/I]
[B]var[/B] ctrlScheme = [
	[I]/* arrows */[/I] [[37],[38],[39],[40]],
	[I]/* AWDS */[/I]   [[65],[87],[68],[83]],
	[I]/* HCNT */[/I]   [[72],[67],[78],[84]],
	[I]/* ijkfsl */[/I] [[74,76],[73],[70,83],[75]]
];
[B]var[/B] ctrlSchemeStrs = ['[I]Arrows[/I]', '[I]A/W/D/S[/I]', '[I]H/C/N/T[/I]', '[I]JL/I/FS/K[/I]'];
[B]var[/B] ctrlSchemeId = 0;
[B]var[/B] invertCtrls = 1;
and in the following function somewhere around 300th line:

Code:
[I]/* determining if a move key is pressed */[/I]
[B]function[/B] keyToMove(key) {
	[B]for[/B] ([B]var[/B] m=0; m < 4; m++)
		[B]for[/B] ([B]var[/B] i=0; i < ctrlScheme[ctrlSchemeId][m].length; i++)
			[B]if[/B] (key==ctrlScheme[ctrlSchemeId][m][i])
				[B]return[/B] m;
	[B]return[/B] -1;
}
The code is universal in the sense that it's possible to add any new scheme with any number of keys for each of four directions by adding something like [[l[SUB]1[/SUB],l[SUB]2[/SUB],l[SUB]3[/SUB]],[u[SUB]1[/SUB],u[SUB]2[/SUB]],[r],[d[SUB]1[/SUB],d[SUB]2[/SUB],d[SUB]3[/SUB],d[SUB]4[/SUB]]] in the ctrlScheme variable and adding the name of your scheme in ctrlSchemeStrs variable.

I'm not absolutely sure if this code could be performance issue (again: or is it?), but it does not do any massive calculations, and the function is launched just once after each key press.
 
Last edited:

stannic

Member
Joined
Jun 16, 2010
Messages
120
Location
The country of riddles
5x5 sub 30 (mo10, ao12)!

best ao5 27.692
best mo10 29.694
best ao12 29.830
mean tps 6.877
times: 27.252, 34.331, 33.367, 26.544, 30.645, 25.888, 30.971, (25.443), 30.448, (38.172), 27.560, 31.291, 29.973
moves: 189, 234, 222, (178), 217, 182, 204, 186, 210, (266), 195, 209, 203
 

stannic

Member
Joined
Jun 16, 2010
Messages
120
Location
The country of riddles
19.56 avg12 :D

edit: also best avgwhatever doesn't work for me on v7.1. using google chroëm.

It's strange :( I've tested v7.1.ie.01 offline using Google Chrome on VM, and it seem to work correctly for me. It shows all AoX & Mo10 (current and best), updates best value when it improves and correctly stores it in localStorage.

What exactly doesn't work for you (don't shows at all, shows incorrect values, the PBs are not saved etc.)?
And is it offline version, online or both here and there?

Did you enabled local data (Chrome menu -> Settings -> Show advanced settings -> Content settings -> Cookies)?

Also, if you're using online version, then the list Chrome menu -> Settings -> Show advanced settings -> Content settings -> All cookies and site data should contain an item "pastehtml.com" displaying some cookies and local data.

4x4 Ao12 11.696, Mo10 11.310, Ao5 11.150, mean tps 8.081

times: 8.814, 12.891, 11.162, 12.986, 9.397, 11.823, 13.181, 12.686, (8.080), 12.076, 12.312, 12.808, (15.350)
moves: (71), 105, 84, 108, 77, 91, 100, 102, 71, 95, 106, 109, (122)

Code:
No. 	Times 	Moves 	TPS
13	15.350	122	7.948
12	12.808	109	8.510
11	12.312	106	8.609
10	12.076	95	7.867
9	8.080	71	8.787
8	12.686	102	8.040
7	13.181	100	7.587
6	11.823	91	7.697
5	9.397	77	8.194
4	12.986	108	8.317
3	11.162	84	7.526
2	12.891	105	8.145
1	8.814	71	8.055

Edit 2: 4x4-2x2 relay ao12 18.442, 137.1 moves @ 7.434 tiles per second

13.588, 5.817, 0.619 = 20.024
15.585, 6.600, 0.605 = 22.790
11.748, 5.562, 0.959 = 18.269
10.017, 3.407, 0.709 = 14.133
11.830, 5.332, 0.674 = 17.836
9.900, 6.760, 0.744 = 17.404
15.086, 4.042, 0.957 = 20.085
14.039, 4.452, 1.244 = 19.735
7.427, 6.732, 0.995 = 15.154
10.007, 3.161, 0.636 = 13.804
14.652, 5.423, 0.793 = 20.868
13.109, 6.809, 0.990 = 20.908
117, 46, 1 = 164
124, 46, 1 = 171
91, 40, 6 = 137
71, 27, 3 = 101
87, 39, 3 = 129
77, 49, 4 = 130
102, 31, 7 = 140
110, 32, 5 = 147
56, 51, 7 = 114
81, 21, 2 = 104
114, 38, 4 = 156
98, 45, 7 = 150
 
Last edited:

ben1996123

Banned
Joined
May 17, 2009
Messages
4,972
Location
Ponyville
WCA
2009WHIT01
YouTube
Visit Channel
It's strange :( I've tested v7.1.ie.01 offline using Google Chrome on VM, and it seem to work correctly for me. It shows all AoX & Mo10 (current and best), updates best value when it improves and correctly stores it in localStorage.

What exactly doesn't work for you (don't shows at all, shows incorrect values, the PBs are not saved etc.)?
And is it offline version, online or both here and there?

Did you enabled local data (Chrome menu -> Settings -> Show advanced settings -> Content settings -> Cookies)?

Also, if you're using online version, then the list Chrome menu -> Settings -> Show advanced settings -> Content settings -> All cookies and site data should contain an item "pastehtml.com" displaying some cookies and local data.

4x4 Ao12 11.696, Mo10 11.310, Ao5 11.150, mean tps 8.081

times: 8.814, 12.891, 11.162, 12.986, 9.397, 11.823, 13.181, 12.686, (8.080), 12.076, 12.312, 12.808, (15.350)
moves: (71), 105, 84, 108, 77, 91, 100, 102, 71, 95, 106, 109, (122)

Code:
No. 	Times 	Moves 	TPS
13	15.350	122	7.948
12	12.808	109	8.510
11	12.312	106	8.609
10	12.076	95	7.867
9	8.080	71	8.787
8	12.686	102	8.040
7	13.181	100	7.587
6	11.823	91	7.697
5	9.397	77	8.194
4	12.986	108	8.317
3	11.162	84	7.526
2	12.891	105	8.145
1	8.814	71	8.055

Edit 2: 4x4-2x2 relay ao12 18.442, 137.1 moves @ 7.434 tiles per second

13.588, 5.817, 0.619 = 20.024
15.585, 6.600, 0.605 = 22.790
11.748, 5.562, 0.959 = 18.269
10.017, 3.407, 0.709 = 14.133
11.830, 5.332, 0.674 = 17.836
9.900, 6.760, 0.744 = 17.404
15.086, 4.042, 0.957 = 20.085
14.039, 4.452, 1.244 = 19.735
7.427, 6.732, 0.995 = 15.154
10.007, 3.161, 0.636 = 13.804
14.652, 5.423, 0.793 = 20.868
13.109, 6.809, 0.990 = 20.908
117, 46, 1 = 164
124, 46, 1 = 171
91, 40, 6 = 137
71, 27, 3 = 101
87, 39, 3 = 129
77, 49, 4 = 130
102, 31, 7 = 140
110, 32, 5 = 147
56, 51, 7 = 114
81, 21, 2 = 104
114, 38, 4 = 156
98, 45, 7 = 150

Best avgsomething just shows the same as Current avgsomething.
 

stannic

Member
Joined
Jun 16, 2010
Messages
120
Location
The country of riddles
Best avgsomething just shows the same as Current avgsomething.

1. Are you using Live Rows / Live Cols / Live Fringe color scheme? If yes, then the averages do not count as "official" and will not be remembered. In this case, "Official" counter in third line should not change (stay on 0).
2. If not (1), do you have the same problem in online and offline versions?
3. If not (1), could you make screenshot after some solves (after the problem is happened), so I can see all settings and stuff?

- Bulat
 
Last edited:

ben1996123

Banned
Joined
May 17, 2009
Messages
4,972
Location
Ponyville
WCA
2009WHIT01
YouTube
Visit Channel
1. Are you using Live Rows / Live Cols / Live Fringe color scheme? If yes, then the averages do not count as "official" and will not be remembered. In this case, "Official" counter in third line should not change (stay on 0).
2. If not (1), do you have the same problem in online and offline versions?
3. If not (1), could you make screenshot after some solves (after the problem is happened), so I can see all settings and stuff?

- Bulat

oh ok, I was using the live fringe colour scheme.
 

ThomasJE

Premium Member
Joined
Dec 31, 2011
Messages
1,791
Location
England
YouTube
Visit Channel
NL PB single: 12.275. 75 moves, 6.110 TPS.

Solution:
Code:
 9 6 5 2 6 5 2 14 8 2 13 3 10 1 2 10 10 13 3 10 13 3 14 8 3 14 8 12 11 15 4 3 12 8 5 6 8 12 14 5 6 9 10 13 5 6 12 11 7 8 11 14 15 7 8 11 14 15 7 8 15 14 14 12 9 10 13 9 10 14 11 15 12 11 15

While listening to Gangnam Style. :D

Also, I got a VERY lucky solve on the original sim when I was in school (school internet :mad:). 8.563; 54 moves; 6.306 TPS. Last 2 rows completed in ONE move (12 piece needed to me moved up). I won't be beating that very soon (I won't count it as PB anyway).

Also, some suggestions:
- Save PB for Ao50 and Ao100
- Save the date/time of a PB, so you can track your progress
- Add a graph for the suggestion above
 
Last edited:

stannic

Member
Joined
Jun 16, 2010
Messages
120
Location
The country of riddles
Please try to open the attached html page offline. Place it in the same directory where you have offline version of the timer.

View attachment viewstor.zip

It should display all your PBs in internal format, like below:

Code:
'ao12m' = '4-4-92.3;3-3-30.1'
'ao12t' = '4-4-11.4317;3-3-3.3894'
'ao5m' = '4-4-84.667;3-3-24.667;5-3-93.000'
'ao5t' = '4-4-10.2580;3-3-2.5987;5-3-13.2500'

Check out please if there are rows 'ao50m', 'ao50t', 'ao100m' or 'ao100t'. (If they are, then PBs are stored but for some reason are not displayed.)
 

ThomasJE

Premium Member
Joined
Dec 31, 2011
Messages
1,791
Location
England
YouTube
Visit Channel
There's Ao50, but no Ao100. Probably because I have a session running now and the PB's both match. Should I see if the standard v7.1 works?
 

stannic

Member
Joined
Jun 16, 2010
Messages
120
Location
The country of riddles
There's Ao50, but no Ao100. Probably because I have a session running now and the PB's both match. Should I see if the standard v7.1 works?

Yes please, it may help.

And is Mo10 saved too or not?

I still couldn't understand the issue since it all works for me (just checked on 2x2), and the code does not differ for Ao50/Ao100 and other averages.

Also, I'm completely rewriting the code currently (so it will probably be fixed anyway). But it is still interesting what is the issue.
 

ThomasJE

Premium Member
Joined
Dec 31, 2011
Messages
1,791
Location
England
YouTube
Visit Channel
Yes please, it may help.

And is Mo10 saved too or not?

I still couldn't understand the issue since it all works for me (just checked on 2x2), and the code does not differ for Ao50/Ao100 and other averages.

Also, I'm completely rewriting the code currently (so it will probably be fixed anyway). But it is still interesting what is the issue.

Mo10 is saved. I'll try the other version tomorrow, because I'm in a 'long' session (100+ solves).

Also, sub-20 Ao100!

Code:
100	16.564	120	7.245
99	21.695	137	6.315
98	20.382	114	5.593
97	31.125	188	6.040
96	19.656	134	6.817
95	23.320	152	6.518
94	16.836	108	6.415
93	18.015	106	5.884
92	20.578	132	6.415
91	18.079	117	6.472
90	17.602	106	6.022
89	23.773	140	5.889
88	18.649	119	6.381
87	18.657	116	6.218
86	17.551	106	6.040
85	15.454	113	7.312
84	21.761	133	6.112
83	17.011	99	5.820
82	16.650	104	6.246
81	20.492	141	6.881
80	17.789	119	6.690
79	16.653	113	6.786
78	20.162	125	6.200
77	15.185	94	6.190
76	21.876	142	6.491
75	20.245	132	6.520
74	22.357	145	6.486
73	27.530	162	5.884
72	16.956	112	6.605
71	18.870	124	6.571
70	17.033	102	5.988
69	18.241	120	6.579
68	22.071	117	5.301
67	18.912	121	6.398
66	16.054	105	6.540
65	14.582	92	6.309
64	21.147	122	5.769
63	16.288	108	6.631
62	25.015	156	6.236
61	18.897	122	6.456
60	21.399	135	6.309
59	22.707	143	6.298
58	22.306	140	6.276
57	14.969	98	6.547
56	24.100	151	6.266
55	14.309	73	5.102
54	14.463	100	6.914
53	16.693	113	6.769
52	20.708	125	6.036
51	21.848	129	5.904
50	19.207	119	6.196
49	16.719	107	6.400
48	18.005	114	6.332
47	24.679	165	6.686
46	12.275	75	6.110
45	17.779	114	6.412
44	20.117	136	6.760
43	15.547	119	7.654
42	20.466	131	6.401
41	16.804	103	6.129
40	23.130	147	6.355
39	24.062	135	5.611
38	24.149	145	6.004
37	19.047	119	6.248
36	14.102	83	5.886
35	16.074	102	6.346
34	15.763	93	5.900
33	20.220	118	5.836
32	17.042	117	6.865
31	18.857	124	6.576
30	21.072	131	6.217
29	18.773	125	6.658
28	16.814	107	6.364
27	21.167	129	6.094
26	25.621	152	5.933
25	25.913	137	5.287
24	18.592	106	5.701
23	17.167	110	6.408
22	17.635	126	7.145
21	19.390	112	5.776
20	27.898	160	5.735
19	18.887	122	6.459
18	21.139	137	6.481
17	19.468	122	6.267
16	15.680	110	7.015
15	22.247	141	6.338
14	20.226	121	5.982
13	20.541	119	5.793
12	18.648	126	6.757
11	19.531	119	6.093
10	16.945	113	6.669
9	19.164	132	6.888
8	19.258	118	6.127
7	22.273	135	6.061
6	20.234	140	6.919
5	23.469	143	6.093
4	17.531	119	6.788
3	17.055	119	6.977
2	16.023	110	6.865
1	21.719	135	6.216
Code:
Best	12.275	73
Mean	19.473	122.670
Avg	19.428	122.510
Mean TPS: 6.299
 

stannic

Member
Joined
Jun 16, 2010
Messages
120
Location
The country of riddles
Also, I got a VERY lucky solve on the original sim when I was in school (school internet :mad:). 8.563; 54 moves; 6.306 TPS. Last 2 rows completed in ONE move (12 piece needed to me moved up). I won't be beating that very soon (I won't count it as PB anyway).

Just got: 8.826, 8.969, 9.095, (14.763), (7.485) = 8.963 ao5 @ something like 7.5 tps :p
 
Top