Chocolate Puzzles

A few days after the St. Valentine's day in 2006, a sister in law who is a mistress of a convenience store gave me "Meiji Milk Chocolate Puzzle" and "Meiji Black Chocolate Puzzle".

They are both products of Hanayama Corporation that is famous for cast puzzles. Well, they say it's not legal to quote the images of the chocolate puzzles. So I can only show you the link to their web site. Hanayama Corporation > PUZZLE

Milk Chocolate Puzzle

Milk Chocolate ... Pentomino

Milk Chocolate Puzzle contains differently shaped 12 pieces. Each piece is made up of 5 square rectangles.

The rule of the game is very simple. Just pick out all the pieces from the case and shuffle them a bit, and put them back to it again. If you do it right, all the pieces will make up a 6x10 rectangle and fit into the case.

You may flip any piece.

The level of difficulty, they say, is "Sweet".

In fact it has as many as 2,339 answers, but it's not very easy.

This is a famous puzzle called "Pentomino".

Black Chocolate Puzzle

Black Chocolate ... Hexomino Subset

Black Chocolate Puzzle contains differently shaped 11 pieces. Each piece is made up of 6 square rectangles.

The rule is the same. If you do it right, all the pieces will make up a 6x11 rectangle and fit into the case.

You may not flip any piece.

The level of difficulty is "Bitter".

It only has just one solve. But it's not 2,339 times harder than Milk Chocolate Puzzle.

This is a subset of "Hexomino" puzzle.

The author of the puzzle is Mr. Yoshigahara who is a famous puzzle creator.

White Chocolate Puzzle

White Chocolate

The third one in this series is White Chocolate Puzzle that is meant for those who feel that the first two puzzles are too difficult to play with. It contains differently shaped 8 pieces: 3 of them made up of 6 blocks, another 3 made up of 5, 1 made up of 4, and another 1 made up of 3. They are all L-shaped.

The rule is just the same. If you do it right, all the pieces will make up a 5x8 rectangle and fit into the case.

You may flip any piece.

The level of difficulty is "Melting Sweet".

It has 7,764 answers. I don't know whether it is really easy or not. I have not tried it yet.

You may call this puzzle "L-shaped 8 piece poliomino".

The author is another famous puzzle creator, Mr. Odawara.

No answer sheet included

None of the puzzle packages mentioned above includes an answer sheet in it.

"If you are new to this puzzle, you would be better to memorize the initial state of the pieces stored in the case before you take them out to play." reads a gentle warning on the case. Fine, but who is going to be reading it? At least, my kids never did. Probably almost all people should have casually taken out the pieces at once to start playing without giving a glance to the warning. And after some unsuccessful tries, they will know that it's not so easy to solve this puzzle. But it's too late for them.

You can not clear it away without solving the puzzle. What should you do with this?

Solve chocolate puzzles using a computer

I found a page named "Solving Pentomino"(in Japanese) on the Web. The author is using a computer program to solve Pentomino puzzle.

I could get an answer of Milk Chocolate Puzzle in it.

But there was no answer for Black. So I had to write my own program.

My wife scolded me, saying "What in the hell have you been doing all these nights? I thought you were working hard on your WORK, but what is this!?" Ah, well, but it helped me clear up both Milk and Black! (And writing this program was a great fun for me, in fact.)

Now that I have made a program to solve these puzzles and have seen how it works, I'm pretty sure that the proper way of playing with them should be programming. Yes, these puzzles are meant for programmers. If you don't have tons of leisure time, don't touch them without some programming language.

Reference links

For those programmers who are interested in the programming of a pentomino solver, I strongly recommend the following two documents on the Web. Though they are written only in Japanese, you may still obtain some good hints with their source codes.

"Solving Pentomino"

The author is Mr. Nakamura. Especially, "Chapter 5 Optimizing in C language version" is very interesting.

"C Puzzle Programming - Using Recursive Call" > Pentomino

The author is a "novice" puzzle programmer, Mr. Fujiwara. You should read other articles as well. I don't understand why he call himself a novice.

Also, the following site written by the author of White Chocolate Puzzle may be helpful, though it is written in Japanese.

"Box Packing Puzzle Heaven of Juggler Odawara" > "# 41 Meiji White Chocolate Puzzle"

Mr. Odawara, the author of White Chocolate Puzzle, is introducing the puzzle by himself.

I recommend you to refer to some other pages in order to get an idea on the box packing puzzles in general.

Bitter(64).exe

Bitter.exe is a program to solve Chocolate Puzzles which I wrote based on the works of Mr. Nakamura and Mr. Fujiwara.

When it was first released on March 2006, the program only supported Milk and Black. And it was upgraded on January 2008 to support White as well.

Comparing to the programs of the antecessors, it has an advantage in its wider support of the puzzles: it supports not only Milk but also Black and White. And it has a graphical user interface and you can stop and restart during the game. The biggest drawback might be the speed.

On January 2010, Bitter.exe has evolved in a weird direction. It now has an English skin and a Simplified Chinese skin. There's no evolution in its functionality at all.

And I have made Bitter64.exe which is dedicated for the 64-bit Windows. The improvement in the speed was not what I had expected for. The 64-bit version is slightly faster than the 32-bit version in Milk, but is obviously slower in White.

Downloads

BitterSetup.exe

An installer for 32-bit Bitter.exe. Can be installed on 32-bit and 64-bit Windows.

Bitter64Setup.exe

An installer for 64-bit Bitter64.exe. Cannot be installed on 32-bit Windows.

bitter-src-2010-01-22.zip

The sources of Bitter.exe and Bitter64.exe in Microsoft Visual Studio 2008 VC++ solution.

Take it if you would like. It should be under the BSD license. But I think the source codes of Mr. Fujiwara are much more simple and worth reading.

Security notice

On Windows Vista/7, you will encounter an User Account Control dialog when you try to run the downloaded BitterSetup.exe or Bitter64Setup.exe.

"An unknown program requests an access to this computer. Do not execute the program unless you are familiar with the publisher of it or you have already used it before.", it says.

It sounds like something like this: "I don't want to be blamed if you have gotten into a problem by running an unknown program."

But Bitter(64)Setup.exe is not a malware, and Biter(64).exe also is a completely safe software to run, so please take it easy …… No! I CAN NOT assure you. Unfortunately, I have to say the same thing as Vista/7. "I can not take any responsibility when you dare to run the setup program."

Because a file named "Bitter(64)Setup.exe" that you have downloaded and are going to run might be something different from the Bitter(64)Setup.exe that I have made. There always exist certain risks of falsification and spoofing in the file(data) transmission via Internet. This is why the digital signatures are used to assure the identities of the file(data) and its source. But I can not afford to provide the digital signatures for my programs.

So, what should you do? Just close your eyes and click on the button to run it. But I have to say it again, I can not take any responsibility.

Usage

The program is quite simple and seems that no explanation is required, but here goes the detailed usage of it.

bitter.exe ... A program to solve Chocolate Puzzles

This is Bitter.exe, a program to solve Chocolate Puzzles.

It's quite easy to use. First, select a mode of the game and a mode for displaying pieces.

And click "Start", then it begins to search the answers.

Game Mode

You can select a game mode from the following 8 modes.

No Mode Pieces Board Size Answers Difficulty
Type Count Vert Horz
Milk Pentomino
Milk 5x12
Milk 4x15
Milk 3x20
Milk 8x8
Black Hexomino
White Poliomino
White 7x7

The difficulties are the relative values in which Milk(6x10) is set to 100. They come from the values of total count of trial moves divided by the total count of answers, i.e., the average count of trial moves necessary to get one answer. They show that the difficulty levels of the puzzles("Sweet", "Bitter" and "Melting Sweet") are fairly reliable.

"Milk 8x8" takes a 2x2 blank space in the middle of the board. "White 7x7" also takes a 3x3 blank space in the middle.

Board of Milk 4x15

The dimensions of the window is optimized for "Milk 6x10".

With the modes other than that, the size of the piece block is modified so that the entire board comes within the window as you see in the picture above. Some modes need large margins in the window above and below or left and right of the board.

Display Mode

A mode for displaying pieces can be one of the following 5 modes.

No Disp. Description
None Displays nothing until all the answers have been searched.
Ans. Only Displays only the answers. Trial moves are not displayed.
Fast Displays all trial moves of the pieces, including preparatory moves.
Medium
Slow

If you select "Medium" or "Slow", you can trace the movements of the pieces and get some rough notion on the program's thinking process.

But this "thinking process" means just a simple but well orderly sequenced brute force trial-and-error method.

The preparatory moves might look funny and you might wonder what it is doing. In the preparatory moves, the program checks all the pieces(including the rotated and/or flipped variations) and records the possible positions on the board. This preparation will reduce the calculation load by a considerable amount in the succeeding search of answers where the determination of possible placement of pieces is repeatedly processed.

Break on Every Ans.

Set the check mark on "Break on Every Ans.", and the program will break every time when it reached an answer.

But you may not set it when the display mode is set to "None".

"Initialize" button

"Initialize" button will reset the game to the initial state.

The shapes and colors of the pieces are randomly assigned every time the game is initialized. So the search results will vary in the appearing order of answers and in the count of trial moves of each answers every time you play the same game.

And when you change the mode of the game, the initialization will take place automatically without your click on the "Initialize" button.

"Start" button

"Start" button will change its name and state and according to the phase of the game.

Phase of Game Name and State Action
Initialized "Start" Start to search answers.
Searching with display "Stop" Stop searching answers.
without display (disabled) (Can not stop searching)
Stopped "Restart" Restart to search answers.
Search completed (disabled) (Stopped after displaying the first answer)

When you have started the search with the display mode set to "None", you can not stop searching and have to wait until the search has been completed. But the search will be completed in a few seconds in the mode with the largest number of trial moves, even if your computer is equipped with a slowest CPU in the current standards.

"Show Ans." button

"Show Ans." button will show the answers after the search has been completed.

The action will vary according to the display mode and the state of "Break on Every Ans.".

When "Break on Every Ans." is set

Every time you click on the button, it will show one answer after another in the search result sequence.

When it reached at the last answer, it goes back to the first one.

When "Break on Every Ans." is not set

Click on the button to show the answers continuously in the order of search result.

The speed of changing is determined by the display mode.

When it reached at the last answer, it goes back to the first one.

The button will change its name to "Stop", so that you can click on it to stop showing the answers.

"Exit" button

It will exit Bitter.exe.

System Menu

Click on a "Bitter" icon on the top left corner of the program to show the system menu.

System Menu

The system menu supports the following items.

Move
Move the program window with keyboard.
Close
Exit the program to close the window.
Language skins
Choose a language skin for the program. Japanese, English and Simplified Chinese are supported.
Help
Shows the help file (in Japanese).
Online Help
Shows the help page on the Web (in Japanese or in English).
About
Shows the version information of the program.

You have to select the English and Chinese skins when you install the program, or they will not be available and the skin will default to Japanese. And the help file(local file written in Japanese) also needs to be selected in the installation to be available.

When you select the "Typical" installation in the English installer, the language skins are included and the Japanese help file is excluded.

I'll be glad to receive your feedback. If you have noticed something wrong, please let me know.

Last modified on : 2011-01-19