A game by Kemal Efe · the secret gate

Crack the code. Save the flock.

Help the little girl open the gate and bring the chickens home.

Follow the yellow frame
Ready to help the chickens?
3 moves · 0 tries
Ready to playPress Play or choose a pair of blocks to begin.
THE WOODS Click on the dog to chase wolves ENTER THE CODE TO OPEN THE GATE
Total points0
This game0
Pairs3
Safe inside

Press Play, then select a pair for the little girl to touch.

+3 Per chicken rescued−1 Try another pairClick on the dog to chase wolves · first 2 free, then −1 pointPut each color together to open the gate

How points add up

Total points includes this game. Start over clears session scores and keeps your personal best.

In an n-pair game, each rescued chicken earns n points — all three earn 3n points.

3–8 pairs: +1 for a good choice; −1 for a wrong choice.

9–20 pairs: −1 for a move that undoes progress. Neutral preparatory moves are free. Finishing in the other color order refunds move penalties.

Dog calls: the first two each game are free, then −1 per call.

How to play

The chickens need to get home before the wolves catch them. Help the little girl open the gate! In an n-pair game, every chicken that reaches safety earns n points.

Press Play. Point to two blocks next to each other. The yellow frame suggests one helpful pair. When hints are hidden, a light frame shows the pair you are choosing. Click, or press Touch blocks, and she will run over and touch them. Put all the green blocks together and all the gold blocks together, with the empty space at the gate. Then the chickens can run inside!

Choose Classic to start with alternating colors, or Random for a new mix. Choose 3 to 20 pairs. Every random puzzle can be solved. Changing the starting layout begins a new round.

A good choice earns 1 point and moves the blocks. A wrong choice costs 1 point and the blocks stay where they are. In Level 0, one yellow frame always shows a helpful pair. After three successful rounds, you can choose to try Level 1: hints wait until two mistakes, then go away after a good choice. With 3–6 pairs, you can keep Level 0 or change Help level. From 7 pairs onward, there are no hints, even after mistakes.

With 9 pairs or more, every legal pair moves into the empty space. You can make mistakes or return to an earlier position. Moves that undo progress cost 1 point; preparatory moves that keep progress unchanged are free. Every chicken that reaches safety earns n points (n is the number of pairs). Both final color orders open the gate. If you finish in the other color order, move penalties are refunded; extra dog calls still cost points. No hints or remaining-move count are shown.

You can also click the yard to let her walk around. Walking does not count as a try. With three pairs, the last move uses the extra space at the right-hand end.

Click or tap your dog when a wolf gets too close. He will chase one wolf away for eight seconds before it starts coming back. You can call him as often as you need. The first two calls each round are free; every extra call costs 1 point. As soon as he chases one wolf away, call again to send him after the next wolf.

The game adjusts the wolves according to your performance. After a difficult round, they slow down. In advanced play, a clean rescue can make the next round faster. Use Pause whenever you want more thinking time. Every wolf speed is eligible for your personal best: it records the largest puzzle you successfully complete. Start over restarts the rounds and keeps that record.

After a few seconds on the start screen or after an unsuccessful round, a demo plays automatically with the game’s sounds. The large DEMO label means the game is playing itself. Press Play, choose a pair of blocks, or click the dog to start your own game immediately. The banner changes to Your turn. Demo points do not change your progress. Tap for sound enables audio if your browser needs a click first.

After three easy wins in a row at the same size, Click here to get the game up to your level offers one more pair, up to 20. The choice is yours.

After a successful rescue, Well done! and a large, pulsing Next level button appear in the center. The girl points toward it. Choose it when ready: one more pair makes the next puzzle bigger. The win screen waits for you. At 20 pairs, you can play again at the same size. Personal bests are saved on this device; tracking starts with this update. Click anywhere else in the play area to repeat the same level; this works on the result card, blocks and dog too. The large next-level button advances instead.

Pause lets everyone take a break. The game also pauses when you leave this tab. Arrow keys choose a pair; Space or Enter tells her to go.

Earlier game ↗Snow game ↗

The puzzle algorithms are described in Kemal Efe’s “Generalizations and Optimal Solutions for Coin Sorting Puzzles”, 17th International Conference on Computer Games (CGAMES), 2012, pp. 180–187.