• 67

Learning Opportunities

This puzzle can be solved using the following concepts. Practice using these concepts and improve your skills.


  The Goal

Place all boxes on their target cells.


You have one unit which you can move around on the map. You can push boxes by walking into them. This will push the box in the same direction as you are moving in. The field where you push the box to must be free, it is not possible to move two or more boxes at once.
You are given target cells where you have to place the boxes.

  Expert Rules

The source code can be found here:

  Game Input

Initial input

Line 1: width height boxCount, the width and height of the map and the number of boxes

next height lines: a string of width characters, that can be:

  • . for an empty cell
  • # for a wall
  • * for a target cell
Input per turn

Line 1: pusherX pusherY, the position of your unit

next boxCount lines: boxX boxY, the position of each box

A single character indicating your movement direction: U to move up, D to move down, R to move right, L to move left.

Allotted response time to output is ≤ 10 seconds for the first turn, 50 ms for later turns.


A higher resolution is required to access the IDE