Happy Cube (Wirrel Warrel) Solver

Launch web solver

An assembled 2×2×2 Happy Cube

Dirk Laureyssens designed the Happy Cube, also known as Wirrel Warrel, in 1986. Build a cube from six foam pieces, then fit them back into the flat frame. The six original puzzles vary in color and difficulty. The range grew to 24 compatible puzzles across Little Genius, Happy Cube, Profi Cube, and Marble Cube.

This was my first program. I wrote it for small cubes in 1992, added recipes in 1997, and made it fast in 2001. It's the only program I kept coming back to in my first ten years of programming. It started out lousy. Now it's OK.

Command-line solver

Download the source (MIT license). Unpack it and run these commands in the wirrel directory.

c++ -std=c++11 -DVERSION='"1.5"' -o wirrel wirrel.C
./wirrel -d des/rood.des -m mak/wir111.mak
-h, --help              Show help
-d, --description FILE  Read pieces from FILE
-m, --recipe_file FILE  Read the recipe from FILE
-s, --silent            Continue without prompting after each solution
-c, --count             Count attempts
-v, --verbose           Show more detail

A description file in des/ has one piece per line. Give each piece a unique name. I put small stickers on mine. The 16 binary digits mark the rim around the 3×3 center. Count clockwise from bit 0 at the top left. A 1 marks a tab and a 0 marks a gap.

A piece with two tabs at the start of its rim
some_piece 1101110100100010

The default piece list, des/wirlist.des, contains my collection. A recipe specifies the shape and the rules for fitting pieces. The recipes in mak/ build a 1×1×1 cube (wir111.mak), a 2×2×2 cube (wir222.mak, the default), or a 2×2×3 box (wir223.mak). See README.md in the archive to write your own.

Read a solution

Solution 1
 1-geel_a: 1.
 2-geel_c: 6.
 3-geel_b: 2.
 4-geel_e: 7.
 5-geel_d: 6.
 6-geel_f: 5.

Each line gives the position, piece name, and orientation. For wir111.mak, positions 1–6 are bottom, right, back, left, front, and top. Other recipes set their own order. Keep the cube facing the same way while you build it.

Orientation 1 is the piece as described in the file. Turn it 90° clockwise between numbers on the same row. Flip it top to bottom from 4 to 5. The photos show one piece, yellow on one side and orange on the other.


1

2

3

4

5

6

7

8

Other solvers

Shy Shalom wrote HappySolver. I used his piece library to check my collection. See also Talip Turkmen's Java solver, Andreas Röver's BurrTools for interlocking puzzles, and the Snafooz solutions.