Hakoiri Musume (Sliding Block Puzzle)

Slide the wooden blocks around the box and help the big Daughter piece escape through the exit at the bottom.

Choose a puzzle and press “Start”

Puzzle

Piece labels

The names are just for fun – only the size and shape of each piece matter. “Kanji” shows the traditional Japanese names with their readings; “No labels” marks only the Daughter, with a star.

Report a bug

Only the site operators can read your report. It will not appear in public comments.

Do not include your name, school, address, contact details, or links. The game version and browser type are attached automatically. Privacy

ver 0.9.0 · Updated

Release notes
  1. · ver 0.9.0Added the version label and release notes.
  2. Added the English version.
  3. First published.

How to play Hakoiri Musume

Hakoiri Musume is a sliding block puzzle from Japan. A wooden box four squares wide and five squares tall is packed with blocks of different sizes, and only two small squares are left empty. The biggest block, a 2×2 square called the Daughter, starts at the top of the box. Your job is to slide the blocks around until the Daughter reaches the bottom middle, where there is a gap in the frame she can slip out through. You can’t lift a block, turn it or take it out of the box – you can only slide it into empty space. It sounds simple, but with just two free squares, one careless move can box you in, and the classic starting layout takes at least 81 moves to solve.

The name means “a daughter in a box”: a Japanese expression for a young woman who has been raised very sheltered, kept safe at home by her family. In the puzzle, her parents and the household servants crowd around her, and you have to clear a path so she can finally leave the house.

The pieces and the board

The traditional layout. 1: the big 2×2 Daughter at the top middle. 2: tall pieces – the Father and Mother beside her and two Maids below. 3: the wide Head clerk under the Daughter. 4: small one-square pieces. 5: the exit in the middle of the bottom edge
1 the Daughter, 2 tall pieces, 3 the wide piece, 4 small pieces, 5 the exit

There are four sizes of piece. The 2×2 square is the Daughter (娘, musume) – the piece you need to get out. The tall 1×2 pieces are the Father, the Mother and two Maids. The wide 2×1 piece is the Head clerk (bantō, the senior employee of an old Japanese shop), and the four small squares are the Shop boys (detchi, young apprentices) and a Clerk (tedai). The names are part of the story, not the rules: pieces of the same shape behave exactly the same way. If you prefer, the “Piece labels” setting above the game switches between English names, the original kanji with their readings, or no labels at all.

The exit is the two-square gap in the middle of the bottom edge. A dotted outline on the floor of the box shows where the Daughter has to end up.

How to move the blocks

Left: a small piece slides two squares to the right. Right: a small piece slides down and then turns the corner to the right. Both count as one move
Slide a piece through connected empty squares. Any distance, even around a corner, is one move.

Drag a block toward an empty square and it slides along under your finger or mouse. If the empty squares are connected, you can push a piece two squares at once, or even turn a corner in the middle of the slide. You can also just tap a block. If it can only move in one direction, it steps one square that way. If it has more than one option, it gets a blue outline with small arrows showing where it can go – then tap the empty square you want it to move into.

On a keyboard, press Space to step through the pieces (Shift and an arrow key picks the piece in that direction), then use the arrow keys to move the selected piece one square at a time.

How moves are counted

Three boards. A small piece moves up one square: 1 move. The same piece then moves left: still 1 move
As long as you keep moving the same piece, it all counts as a single move.

Here, moving one piece counts as one move, no matter how far it travels or how many corners it turns. If you move the same piece again straight away, it is still the same move; the counter only goes up when you switch to a different piece. If you slide a piece back to exactly where it started, that move is cancelled and the counter goes back down.

This is the standard way of counting for this puzzle, and it is the one behind the famous figure of 81 moves. Other books and apps sometimes count differently: if every straight slide is a move, the same solution takes 90, and if every single square counts, it takes 116. So when you see different numbers for the same layout, it is usually just a different counting rule.

When a block won’t move

Left: only one square is free under the Daughter, so she can’t move down. Right: a small piece can’t jump over another piece to reach an empty square
A big piece needs every square in its way to be empty, and nothing can jump.

A large block needs a full-width gap to move into. The Daughter can only move down if both squares below her are empty, and the same goes for the tall and wide pieces. No piece can hop over another, and pieces never rotate. If you try a move that isn’t allowed, a short message at the top of the game tells you why – for example, which piece is in the way.

How to win

The Daughter in the middle of the bottom row, with a green arrow pointing out through the exit
Once the Daughter is right above the exit, the puzzle is solved.

The puzzle is solved as soon as the Daughter reaches the bottom middle of the box, right above the exit. She slides out, and you see how many moves you took next to the fewest moves possible for that puzzle. Your best result for each puzzle is saved, so once you’ve solved one, you can come back and try to match the minimum.

The 25 puzzles

LevelPuzzles · fewest movesWhat to expect
Practice1–4 · 1–7Learn to lower the Daughter, move pieces out of the way and slide around corners
Easy5–9 · 9–18Fewer pieces and more room to make space
Normal10–14 · 22–38You have to plan where the wide piece and the Maids go
Hard15–19 · 43–68Mostly full boxes with just two empty squares
Very hard20–22 · 72–79A warm-up for the classic layout
Traditional23 · 81The traditional Hakoiri Musume layout
Challenge24–25 · 82, 93Layouts that take even longer than the classic one

The puzzles are ordered by the fewest moves they need, and you can start anywhere. If you only want the famous one, pick number 23 in the “Traditional” row of the puzzle list. If you’ve never tried a sliding block puzzle before, it really helps to play a few practice puzzles first – they each teach one idea. Every puzzle has been checked by computer, trying every possible sequence of moves, so each one is guaranteed to be solvable, and the fewest-moves figure shown is exact.

Sliding block puzzle strategy: tips for solving

1. Line up the two empty squares

Left: the two empty squares sit side by side in the bottom row (good). Right: the two empty squares are apart (bad)
When the gaps are together, the big pieces can move.

In a full box with only two free squares, everything depends on where those two squares are. When they sit side by side, the wide piece or the Daughter can drop into them; when one is above the other, a tall piece or the Daughter can slide sideways. When they are apart, only the small pieces can move. So before anything else, ask yourself how to bring the two gaps together in the right place.

2. Small pieces carry the space around

The small one-square pieces can go anywhere, one step at a time. Every time you move one, the empty square jumps to where it was. Think of the small pieces as the tool for moving the empty space to where you need it. Avoid packing them all into one corner – once they are stuck, you lose your way of moving space around.

3. Plan the wide piece early

The wide Head clerk sits right under the Daughter in the classic layout and blocks her way down. Sooner or later it has to be moved up past her or tucked away at the side. Before you commit to a plan, check where that piece can go – it is often the real bottleneck.

4. Move the Daughter sideways first

Trying to push the Daughter straight down usually means shuffling a huge number of pieces below her. The shortest solution of the classic layout does something that looks backwards: in roughly the first twenty moves it gathers the wide piece and the small pieces in the lower rows, opens up a column next to the Daughter, and slides her to one side. From then on, the Father, Mother and Maids climb up past her one by one, while she zigzags left and right on her way down. Making room a little at a time is much faster than forcing a straight path.

5. Undo and Hint are there to help

The traditional layout with a dotted outline around a small piece, a dotted path going down and then right, and a dotted shadow where it should go
A hint marks the piece to move and its destination with dotted lines.

You can undo as many moves as you like (the Z key). Pressing Hint (the H key) shows the next move of a shortest solution from the position you are in now: a dotted outline around the piece, a dotted path, and a shadow where it should go. The message also tells you how many moves are left. Try to work out why that move is the right one – it makes the next puzzle easier.

6. Once it’s solved, go for the minimum

Most first solutions take a few detours. Play the puzzle again aiming for the fewest moves shown on the result screen and you will start to see which moves were wasted. Keeping the same piece moving for as long as it is useful – so that several slides count as one move – is part of the trick.

Hakoiri Musume FAQ

Can the classic layout really be solved in 81 moves?

Yes. When moving one piece any distance counts as one move, the fewest possible is 81. We checked it here by computer, searching every position that can be reached from the classic layout (puzzle 23). Counted per straight slide, it is 90 moves, and counted per square, 116.

Can every puzzle be solved?

Yes, all 25 of them. And you can’t get permanently stuck: every move can be reversed, so any position you reach can always be taken back to the start and solved from there.

Does using a hint affect my score?

No. A hint only shows you the next move; it does not change the move count or your personal best. The result screen just mentions how many hints you used.

What if I stop halfway?

Your current puzzle and every move so far are saved automatically. Open the page again on the same device and press “Continue”. The puzzles you have solved and your best move counts are also stored in your browser on that device.

Is there sound?

The game starts muted. Press “Sound: off” to turn on sound effects for moving pieces and solving a puzzle.

History of the sliding block puzzle

Puzzles in which you slide blocks of different sizes to bring one special block to an exit have been played around the world since the early twentieth century. Versions were sold in the United States in the early 1900s, and the idea turns up in many countries under many names. In France it has been told as a story about a red donkey, and in China it is known as Huarong Dao (the Huarong Trail), after a tale from the Romance of the Three Kingdoms in which the warlord Cao Cao slips past the general Guan Yu. In Japan the puzzle became popular around the 1930s under the name Hakoiri Musume, with the family and servants of an old merchant household guarding the daughter. Martin Gardner, the American writer famous for his mathematical puzzle columns, wrote about the 81-move solution in 1964. The names on the pieces vary from set to set: some have grandparents and brothers, others various servants, depending on when and where they were made.

More sliding puzzles

If you enjoy this one, try the 15 Puzzle, where you slide numbered tiles into the gap to put them back in order. The Car Escape Puzzle is a close cousin too: slide the cars in a crowded parking lot back and forth until the red car can drive out – like Hakoiri Musume, it rewards thinking a few moves ahead.