Doshu Puzzle

Initializing live version
Download to Desktop

Requires a Wolfram Notebook System

Interact on desktop, mobile and cloud with the free Wolfram Player or other Wolfram Language products.

Object: Make the yellow and red tokens swap places.


You can drag a token (keep the mouse key pressed) any distance in any of the four major directions, but you cannot move a piece by itself: you must always pull a second touching token (the dragged token's neighbor in the direction opposite the drag). If there is no adjacent token on the opposite side, a token cannot move.

The dragging token (together with the dragged token) can also move over (but not onto) non-empty positions, as long as the dragging and the dragged token both land on empty positions. Thus with yellow-red-yellow in a row, you can drag the red token two positions to the right to get yellow-yellow-red.

This "dragging" restriction makes even the most simple board setups (with six or eight pieces) a challenge.


Contributed by: Karl Scherer (April 2014)
Open content licensed under CC BY-NC-SA



Pink and light yellow floor tiles indicate where the round tokens have to end up. If all tokens have swapped places, you get a win message at the top border. Some challenges show one or more additional black walls. You cannot move into or through a wall.

Drag slowly

Take care to execute the dragging of a token slowly, otherwise the second token that is supposed to be dragged along with it might be left behind, which is against the rules of this puzzle. If the adjacent token lags behind, you can click the "undo" button to take the last move back (see below).



You can select between 33 fixed setups and nine randomized setups.

"prev," "next" setter bar:

Click to select the previous or next challenge.


Takes you back to the starting position. In the scrambled challenges, this means that you see the previous scrambling. To see a differently randomized setup for this challenge, select a different challenge, and then select the desired challenge again (use "<," then ">").


Counts the moves; useful when you compete for the fastest solution with your friends.


Click to take the last move back.


This puzzle was previously published as the Zillions game "Doshu" by the same author.

Feedback (field required)
Email (field required) Name
Occupation Organization
Note: Your message & contact information may be shared with the author of any specific Demonstration for which you give feedback.