Sketch Model - Works Like

Solution Checker Puzzle Generator Game
Piece-By-Piece

How does this game fit at 5Wits?

Our heroes have just finished defusing a bomb. Before venturing into another stressful storyline, they make a pit stop at Chocolate Piece by Piece. Although they've already played the game tens of times, they still love coming back! Why?

Chocolate Piece by Piece is the classic sliding tile game with an adorable chocolate box skin. Why are familiar and simple games (like Candy Crush, Pac Man and Tetris) so addictive? The whole game consists of one action - sliding a tile, swapping two candies, etc. However, regardless of how many times you play, the puzzle is always different. You can play thousands of times and still not ever solve the same puzzle twice!

The scoring of the game also makes it addictive. The score is a combination of time-to-completion and fewest number of moves. Players know they can do a little better every time, and love beating their own high score and competing against others. Chocolate Piece by Piece doesn't have a story, and doesn't really need one. It fills the same function as a mini-game within that players turn to when they want a break from the main story.

Chocolate Piece by Piece is also one of the few games that lends itself really well to mobile play. Players can continue improving their skills and score while at home and collect rewards that they can reap upon their return to the park!

The Puzzle Generator

For complete autonomy the game needs to be able to reset and check itself - these mechanisms are the subjects of our works-like sketchmodel. We initially considered a mechanical reset that shuffles each block back to its original location prior to the entry of a new team. However, for such a simple game, this strategy seemed way over-complicated.
Instead we pursued an electronic shuffle that generates a new puzzle every round. Each block has an identifying number (1-15) and during installation, the tiles must be placed in order. A MATLAB script takes this grid, finds the "blank" tile, determines potential moves, then randomly picks one of the available moves and makes the swap. This process repeats 1,000 times to generate the new puzzle. This method ensures that the puzzle can be solved no matter how the board looks when a team enters the room.


The Solution Checker

To check the players' solutions, we originally wanted to install unique identifying chips (like RFID) in each block to locate them within the grid. However, for a 4x4 grid we'd need at least 15 chips and also (because of the massive block size) 15 scanners, or one moving scanner. We eventually realized that each block already had unique identifying features: their adorably decorated surfaces! Instead of adding aditional hardware to the blocks, we chose to identify them the way you or I would - by looking at their surfaces!
The images of the blocks are pre-loaded and a webcam captures the board image in real time. Our computer vision algorithm finds and extract the surface features of each block and then matches them to the surface features of the current board. The function matchFeatures also outputs the location of the matching points, from which we can calculate the location of the tile in the grid. If the current board is identical to the Puzzle Generator's board, the team wins!
Fortunately, we were able to successfully locate most of the blocks but we learned that some are much harder to identify. Things that are easy for you and I to distinguish are also easy for the program to distinguish.

This criss-cross is very easy to identify! The pattern is unique and the colors have a lot of contrast between them.
This drizzle is a little harder to identify. Although the pattern is unique, the colors are very similar to each other.
These stripes are very difficult to identify. The pattern is not unique and the colors are very similar.

From this sketch model we learned a lot about how to design the blocks such that they're easy to identify should we continue to pursue this idea!