Hacking Ubongo 3D

Not only Ubongo 3D is great, educational, entertainment, but the execution of the game is top-notch. Probably most straightforward game mode is competitive one (player against some other player(s)) but I found just solving the puzzles as helpful aid against aging brain — to what degree I don’t know, but I think a little workout is better than no workout at all.

Ubongo 3D box

While more and more puzzles were solved in rather quickly manner I was afraid that I will run out of the cards soon and I don’t see a good replacement for it. And honestly I am also surprised the difficulty of the decks don’t differ too much.

What can I do about it? Well… I can hack it — I can write program which will compute what pieces are necessary not for two layered card, but three layered one. After few rounds I can attest the difficulty simply jumps up — even the green cards (easy) turn out to be very hard.

Few words about the program — I wanted to write it in Rust for fun of checking the new (to me) language but considering how many projects I have ahead of me I defaulted to C#. You can find code at https://github.com/macias/Ubongo3dMax.

The program does not display any graphics, so little help about the symbols used:

Ubongo 3D pieces
Source: https://www.ludopolis.sk/sk/ubongo-3d-family/

The top row — rT (red twisted), gS (green small), gB (green big), yT (yellow twisted), yF (yellow F). The bottom row — rS (red small), bZ (blue Z), bL (blue L). The codes are not written in stone, it was simply the fastest I came up with.

Two parameters that control the computing are PIECES_PER_GAME (how many the same pieces are allowed in the solution; stock value is 1) and BOARD_HEIGHT (how many layers for the card are used; stock value is 2). With values 2 and 3 for the first card finding all solutions takes around 50 seconds on my laptop (Intel Core 2 Duo 2.53GHz).

If you would like to get new challenges for your Ubongo 3D, grab some C# compiler and run the code. You don’t have to go all crazy, it appears designer of the game cut some solutions so even with the stock setup you will find new ones.

Dodaj komentarz