Archive for the ‘cube’ Category
Finding Possible Cube PLL Algorithms using an Anagram Finder
I ran the internet anagram server on the list of PLL algorithms’ shortcodes:
So who can find some interesting words or sentences? Put it in the comments.
Here’s the full list:
288 candidate words found:
1. Gaunter
2. Fraught
3. Naughty
4. Unearth
5. Haunter
6. Frenzy
7. Jaunty
8. Rehang
9. Hunger
10. Hanger
11. Gather
12. Naught
13. Argent
14. Father
15. Graven
16. Anther
17. Hungry
18. Gyrate
19. Garnet
20. Nature
21. Hearty
22. Tavern
23. Earthy
24. Gentry
25. Rehung
26. Vaguer
27. Hunter
28. Gantry
29. Urgent
30. Gurney
31. Turfy
32. Heart
33. Jaunt
34. Hyena
35. Grave
36. Fayer
37. Faery
38. Vegan
39. After
40. Grunt
41. Grate
42. Aunty
43. Furze
44. Nervy
45. Auger
46. Junta
47. Gauze
48. Great
49. Ferny
50. Argue
51. Earth
52. Avert
53. Agent
54. Gaunt
55. Thane
56. Graze
57. Angry
58. Aught
59. Teary
60. Graft
61. Azure
62. Grant
63. Hater
64. Gazer
65. Yearn
66. Hefty
67. Tangy
68. Tuner
69. Gayer
70. Hazer
71. Huger
72. Gauzy
73. Runty
74. Rangy
75. Vaunt
76. Anger
77. Heavy
78. Gravy
79. Raven
80. Entry
81. Hertz
82. Neath
83. Vague
84. Haven
85. Range
86. Haunt
87. Tear
88. Thru
89. Year
90. Rave
91. They
92. Aver
93. Rant
94. Tare
95. Fate
96. Rang
97. Fang
98. Tune
99. Rage
100. Tray
101. Raze
102. Tern
103. Zany
104. Faun
105. Aery
106. Urge
107. Rent
108. Gaze
109. Near
110. Yeah
111. Navy
112. Nave
113. Turn
114. Ante
115. Gave
116. Nary
117. Arty
118. Fret
119. Jute
120. Rhea
121. Gate
122. True
123. Fare
124. Tang
125. Jean
126. Yuan
127. Gent
128. Envy
129. Feat
130. Tyre
131. Zeta
132. Fray
133. Hurt
134. Rune
135. Hunt
136. Fern
137. Ague
138. Hung
139. Turf
140. Huge
141. Thug
142. Vary
143. Very
144. Fear
145. Jury
146. Runt
147. Trey
148. Heft
149. Yang
150. Heat
151. Rung
152. Ghat
153. Then
154. Futz
155. Hazy
156. Than
157. Haze
158. Gnat
159. Raft
160. Have
161. Urea
162. Earn
163. Hear
164. Hate
165. Tarn
166. Hart
167. Hare
168. Frat
169. Hang
170. Fury
171. Haft
172. Tzar
173. Gyve
174. Yurt
175. Tuna
176. Fart
177. Gear
178. Rate
179. Faze
180. Grey
181. Fuze
182. Feta
183. Gray
184. Neat
185. Vent
186. Yarn
187. Vane
188. Aunt
189. Hut
190. Jet
191. Hay
192. Gnu
193. Nag
194. Hey
195. Van
196. Yen
197. Ran
198. Rue
199. Fay
200. Hue
201. Rye
202. Rut
203. Are
204. Tag
205. Nut
206. Jag
207. Tau
208. Rug
209. Hat
210. Nay
211. Rev
212. Age
213. Jug
214. Hag
215. Fur
216. Fun
217. Fry
218. Nae
219. Gay
220. Gut
221. Her
222. Zen
223. Fez
224. Fey
225. Vat
226. Jay
227. Yet
228. Fen
229. Jar
230. Rag
231. Rah
232. Yea
233. Ant
234. Nth
235. Net
236. Get
237. Fat
238. Guy
239. Tan
240. Far
241. Veg
242. Fan
243. Fag
244. Vet
245. Gun
246. Eta
247. Erg
248. Era
249. Urn
250. Jut
251. Hen
252. Gar
253. Eat
254. Tar
255. Ugh
256. The
257. Ear
258. Ray
259. Aye
260. Ten
261. Ref
262. Rat
263. Thy
264. Tun
265. Tug
266. Try
267. Ate
268. Tea
269. Run
270. Art
271. Hug
272. Aft
273. Any
274. Nu
275. Re
276. En
277. Ye
278. Fa
279. Ay
280. An
281. Ah
282. At
283. Ya
284. He
285. Eh
286. Ha
287. Uh
288. A
How To Solve a Rubik’s Cube
“Great beginners guide to solving the Rubik’s Cube. Has step by step instruction with animation and images. Now you can solve any old cube laying around and impress your friends.”
I wish I understood Digg. I don’t see how this pretty standard tutorial on howtodothings.com is so much better than other ones (mine? Boohoo I didn’t get dugg).
Rubik’s championships
Well I am sorry to say I couldn’t attend the Rubik’s cube speedcubing world championships in Hungary this year. Another thing I missed this year was Erik Akkersdijk’ new world record of 9.77 set during the Dutch Open. I didn’t even know he was this good. Congratz, also to all the other ones performing so well, as e.g. Dan with his 10.xx solve.
I am practicing more than before because it gets me really excited to see everyone master the craft/art/sport so well. The last couple of days I get regular sub 15s solves, while I am still trying to get a 12 x sub 20.
I am thinking of practicing the OLL and PLL attack a little more, I think that will help.
Source code
ImageCube is a program written by Lars Vandenbergh to show images of Rubik’s cube where you define what stickers to show.
I wrote a version of ImageCube that can also be used as a model of the Rubik’s Cube. I decided to give away the code, because that’s how cool I am. If you’re only into cubing and not into programming at all, you should just check out what I did with it at the algorithm database or my Rubik’s cube site.
And now for the source. If you have any comments, feel free to leave them here.
<?
/*
Cube object
Copyright (C) 2007 Michiel van der Blonk - <a href="mailto:blonkm@gmail.com">blonkm@gmail.com</a> - All Rights Reserved
Based on C++ code by Joël van Noort
This software is licensed as per the MIT License below:
MIT License: <a href="http://www.opensource.org/licenses/mit-license.php">http://www.opensource.org/licenses/mit-license.php</a>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
/*
 * To generate the imagecube sticker codes, this program first simulates the
 * cube, using a string that represents the cube state. Every elementarty move
 * (UDLRFB) is then executed as five 4-cycles of stickers. Example: the
 * sticker permutations corresponding with the move U are:
 *
 * U: (53, 51, 45, 47) (50, 52, 48, 46) (2, 38, 29, 11)
 *    (1, 37, 28, 10,) (0, 36, 27, 9)
 */
// just for debugging
class Debug
{
 function out($s)
 {
  echo '<div class="debug">';
  print_r($s);
  echo '</div>';
 }
}
// post, get
class Page
{
 function get($s)
 {
  if (isset($_GET[$s]))
   return $_GET[$s];
  if (isset($_POST[$s]))
   return $_POST[$s];
 }
}
// handy functions
class Util
{
 //swaps two elements in an array
 function swap(&$var, $a, $b){
  $temp = $var[$a];
  $var[$a] = $var[$b];
  $var[$b] = $temp;
 }
}
// model of a Rubik's cube
class Cube
{
 var $stickers;
 var $mode;
 // constructor
 function Cube()
 {
  // initialize stickers
  $this->stickers = "rrrrrrrrrgggggggggwwwwwwwwwooooooooobbbbbbbbbyyyyyyyyy";
 }
 //this function uses swap function 3 times to make a 4-cycles of stickers:
 function execute_permutation($a, $b, $c, $d){
  Util::swap($this->stickers, $a, $b);
  Util::swap($this->stickers, $a, $c);
  Util::swap($this->stickers, $a, $d);
 }
 // perform a move and update stickers member variable
 // for multiple moves in the string $token the moves are done one by one
 function move($token)
 {
  $moveTransforms = array('u'=>'UEEE', 'd'=>'DE', 'f'=>'FS', 'b'=>'BSSS', 'l'=>'LM', 'r'=>'RMMM', 'x'=>'rLLL', 'y'=>'uDDD', 'z'=>'fBBB');
  // recursive calls to walk through the translated lowercase moves
  if (strlen($token) > 1)
   foreach (str_split($token) as $ch)
    $this->move($ch);
  switch($token)
  {
   case 'U':
    //one of the elementary move functions. Uses the execute_permutation function
    //five times to make five 4-cycles of stickers:
    $this->execute_permutation(53, 51, 45, 47); // top layer
    $this->execute_permutation(50, 52, 48, 46);
    $this->execute_permutation(2, 38, 29, 11);
    $this->execute_permutation(1, 37, 28, 10);
    $this->execute_permutation(0, 36, 27, 9);
    break;
   case 'D':
    $this->execute_permutation(20, 26, 24, 18);
    $this->execute_permutation(23, 25, 21, 19);
    $this->execute_permutation(8, 17, 35, 44);
    $this->execute_permutation(7, 16, 34, 43);
    $this->execute_permutation(6, 15, 33, 42);
    break;
   case 'F':
    $this->execute_permutation(2, 8, 6, 0);
    $this->execute_permutation(5, 7, 3, 1);
    $this->execute_permutation(9, 20, 44, 51);
    $this->execute_permutation(12, 19, 41, 52);
    $this->execute_permutation(15, 18, 38, 53);
    break;
   case 'B':
    $this->execute_permutation(29, 35, 33, 27);
    $this->execute_permutation(32, 34, 30, 28);
    $this->execute_permutation(47, 36, 24, 17);
    $this->execute_permutation(46, 39, 25, 14);
    $this->execute_permutation(45, 42, 26, 11);
    break;
   case 'R':
    $this->execute_permutation(11, 17, 15, 9);
    $this->execute_permutation(14, 16, 12, 10);
    $this->execute_permutation(2, 47, 33, 20);
    $this->execute_permutation(5, 50, 30, 23);
    $this->execute_permutation(8, 53, 27, 26);
    break;
   case 'L':
    $this->execute_permutation(38, 44, 42, 36);
    $this->execute_permutation(41, 43, 39, 37);
    $this->execute_permutation(0, 18, 35, 45);
    $this->execute_permutation(3, 21, 32, 48);
    $this->execute_permutation(6, 24, 29, 51);
    break;
   case 'M':
    $this->execute_permutation(4, 22, 31, 49 );
    $this->execute_permutation(1, 19, 34, 46 );
    $this->execute_permutation(7, 25, 28, 52 );
    break;
   case 'E':
    $this->execute_permutation(4, 13, 31, 40);
    $this->execute_permutation(5, 14, 32, 41);
    $this->execute_permutation(3, 12, 30, 39);
    break;
   case 'S':
    $this->execute_permutation(49, 13, 22, 40);
    $this->execute_permutation(50, 16, 21, 37);
    $this->execute_permutation(48, 10, 23, 43);
    break;
   case '':
    break;
   default:
    // u,d,f,b,l,r,x,y,z
    $this->move($moveTransforms[$token]);
  }
 }
 // clean from certain tokens
 // note: only cleans up space, minus, quote
 function clean($input)
 {
  if ($input=='')
   return $input;
  $tokens = " ()-\\'";
  $input_clean = '';
  $prevCh = '';
  // delete magic quotes
  $input = str_replace("\\\\", '', $input);
  foreach (str_split($input) as $ch)
  {
   if (!strpos($tokens, $ch))
      $input_clean .= $ch;
   // only add prime when right after a move token, e.g. R'
   // so skip R2' (becomes R2)
   if ($ch=='\\'' && $prevCh!='2')
    $input_clean .= $ch;
   $prevCh = $ch;
  }
  return $input_clean;
 }
 // normalize algorithm
 // e.g. R2L'FD' becomes R2L3F1D3
 function normalize($input_clean){
  $temp = str_replace('\\'', '3', $input_clean);
  foreach (str_split($temp) as $ch)
  {
   // when both ch and prev are moves, insert a 1 between them
   // RL becomes R1L
   if (preg_match("/\\D/", $prevCh) && preg_match("/\\D/", $ch))
    $alg_normal .= '1';
   $alg_normal .= $ch;
   $prevCh = $ch;
  }
  if (preg_match("/\\D/", $ch))
   $alg_normal .= '1';
  return $alg_normal;
 }
 // reverse moves
 // used to show an algorithm that solves a cube
 function inverse($alg_normal){
  // split into separate moves
  $moves = str_split($alg_normal, 2);
  // reverse those
  $moves_inverse = array_reverse($moves);
  // back to string
  $alg_inverse = implode("", $moves_inverse);
  // inverse quantifiers
  $alg_inverse = str_replace('1', '#', $alg_inverse); // temp ch for 3
  $alg_inverse = str_replace('3', '1', $alg_inverse);
  $alg_inverse = str_replace('#', '3', $alg_inverse);
  return $alg_inverse;
 }
 // several predefined sticker modes
 function setMode($mode='')
 {
  if ($mode!='')
   $this->mode = $mode;
  switch (strtoupper($this->mode))
  {
   case "F2L":
    $this->stickers = "xxxrrrrrrxxxggggggwwwwwwwwwxxxooooooxxxbbbbbbxxxxyxxxx";
    break;
   case "SHORTCUT":
    $this->stickers = "xxxxrrxrrxxxggxggxxwwwwwxwxxxxxoxxoxxxxxbxxbxxxxxyxxxx";
    break;
   case "OLL":
    $this->stickers = "xxxrrrrrrxxxggggggwwwwwwwwwxxxooooooxxxbbbbbbyyyyyyyyy";
    break;
   case "PLL":
    $this->stickers = "rrrrrrrrrgggggggggwwwwwwwwwooooooooobbbbbbbbbyyyyyyyyy";
    break;
  }
 }
 // execute an algorithm
 function execute($alg, $mode='')
 {
  // prepare with a certain mode if given
  if ($preset!='')
   $this->setMode($mode);
  // walk through all moves in a normalized alg
  for ($i=0; $i < strlen($alg); $i+=2)
  {
   // define operation (move) and quantifier
   $op = $alg[$i];
   $q = $alg[$i+1];
   // move a face n times
   foreach (range(1, $q) as $value)
    $this->move($op);
  }
  return $this->stickers;
 }
 // applet sticker for RubikPlayer are
 // the same as the stickers member variable
 function toAppletStickers()
 {
  return $this->stickers;
 }
 // return only visible faces for imagecube
 // i.e. U, F, R
 function toImageCubeStickers()
 {
  // split into 9 faces
  $faces = str_split($this->stickers, 9);
  // create string for up, right, front
  $upFace = $faces[5];
  $frontFace = $faces[0];
  $rightFace = $faces[1];
  $imageStickers = $upFace . $frontFace . $rightFace;
  return $imageStickers ;
 }
 // perform an algorithm given
 // done in the steps
 // 1. clean up
 // 2. normalize (add quantifiers)
 // 3. optionally inverse
 // 4. execute
 function performAlg($input, $inverse = false)
 {
   $input_clean = "";
   $alg_normal = "";
   $alg_inverse = "";
  // clean input leaves only the moves
  $alg = $this->clean($input);
  // process to get normalized alg (e.g. R2F1L3)
  $alg = $this->normalize($alg);
  // process inverse of alg
  if ($inverse)
   $alg = $this->inverse($alg);
  // perform inverse on the stickers
  $this->stickers = $this->execute($alg);
 }
}
?>
Rubik’s cube in local press
I was very surprised when I opened up my local (Aruban) newspaper and saw the heading “Prince: Solve the Rubik’s cube.” It says the prince of the Netherlands, Willem Alexander (so not TAFKAP) thinks the problem of world wide water shortage is one that resembles a Rubik’s cube, and we need to fix it.
Here’s a rough translation:
Guatemala-cit — Last Sunday, Prince Willem-Alexander of the Netherlands, in the yearly meeting of the inter American Development Bank in Guatemala City, called all 47 countries as a member of this organisation to make progress with the millenium targets of the United Nations.
One third of the 550 million people in these countries do not have access to clean water. and over 125 million people have no sewer system. According to the prince the millenium targets of the UN resemble the Rubik’s cube, an invention of Erno Rubik, which was a famous brain teaser some 30 years ago that was very popular.
One turn in the right direction in one area (e.g. reducing poverty) can have a direct negative influence on another one (like the environment). “That’s why we need cooperation on all areas, so that one side doesn’t take what the other gives. Lets start turning this cube as soon as possible and get all the colors in the right place”, says the prince.
As an example of the problems he mentions the large cultivation of sheer sugar for the production of the bio-fuel ethanol. It’s great for the environmen, but it costs a tremendous amount of water. We need to search for cultivation methods that require less water, says the future king.
Willem Alexander travels all over the world to lobby for his cause. Last week he was in Tokyo for a consultation with the Japanese government. Next Thursday he will speak in Rome on World Water Day.
If he doesn’t know how to solve it he can visit my site, and learn how to solve the Rubik’s cube. Anyway, I thought this was a nice analogy, and one that could very well fit into every day life. Usually the Rubik’s cube is only used as an analogy to a difficult problem, or even an unsolvable problem, which, as we know, is hardly the case.
So maybe we can help solve world poverty by using Rubik’s cube algorithms?
Anyway, here’s the article. Unfortunately no link to an online version, since Amigoe only provides those as a paid service.
![]()
Website update
The last couple of weeks I have been working hard updating my website www.vanderblonk.com. It’s been fun, but I’m hardly ready, there is so much more to do.
Let me give you a little breakdown of what has been done and what you can expect in the (near) future:
- There is a new home page
- The applet has already been greatly improved, e.g. you can now enter any parameters of the applet in the url.
- I placed google ads. I know not everyone likes ads, but I think everyone mature enough in our field (speedcubing, programming) knows how to disable them. I get a lot of juice from wikipedia of which I am grateful.
And soon:
- I will make some help text available for all the new awesome options (which I am not revealing yet)
- Not very useful to you, but I will integrate the style of the home page in all of my pages, it’s still a collection of pages, and not a real site this way. Let me know if you like it.
Average number of moves
I never measured my number of moves to solve a cube. In this attempt, I solved each cube in about 30s.
These are the results:
48,42,48,56,44,47,41,49,52,48,45,51
Average (10/12): 47.4
I use CFOP and the fact that the average is below fifty comes from a smart F2L mostly. I don’t know advanced OLL or PLL. The F2L was usually done in 30 moves or less.
I bet this guy could memorize all LL cube positions
Watch it and remind yourself to close your mouth when you’re done.
Your own label maker
Google label maker is a game for speed freaks who like to compete. Hey, that’s us, speedcubers! Anyway, I advise you all to go there and try it out.
The aim of the game is to match the tags that you assign to a random image, together with your game partner. This is a nice way of google to get everyone who is crazy enough to play this game (us) to categorize their enormous image database. So in fact we’re all working for Google here.
Unfortunately you can’t see who you were racing with, only their nickname is shown. Getting into the highscore just requires a lot of stamina since the score is simply accumulated after each game.
update: my high sore is 10, see if you can beat it.
Leave a Comment
Leave a Comment
Leave a Comment

