Doshu Puzzle

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.



  • [Snapshot]
  • [Snapshot]
  • [Snapshot]


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.
    • Share:

Embed Interactive Demonstration New!

Just copy and paste this snippet of JavaScript code into your website or blog to put the live Demonstration on your site. More details »

Files require Wolfram CDF Player or Mathematica.

Mathematica »
The #1 tool for creating Demonstrations
and anything technical.
Wolfram|Alpha »
Explore anything with the first
computational knowledge engine.
MathWorld »
The web's most extensive
mathematics resource.
Course Assistant Apps »
An app for every course—
right in the palm of your hand.
Wolfram Blog »
Read our views on math,
science, and technology.
Computable Document Format »
The format that makes Demonstrations
(and any information) easy to share and
interact with.
STEM Initiative »
Programs & resources for
educators, schools & students.
Computerbasedmath.org »
Join the initiative for modernizing
math education.
Step-by-Step Solutions »
Walk through homework problems one step at a time, with hints to help along the way.
Wolfram Problem Generator »
Unlimited random practice problems and answers with built-in step-by-step solutions. Practice online or make a printable study sheet.
Wolfram Language »
Knowledge-based programming for everyone.
Powered by Wolfram Mathematica © 2017 Wolfram Demonstrations Project & Contributors  |  Terms of Use  |  Privacy Policy  |  RSS Give us your feedback
Note: To run this Demonstration you need Mathematica 7+ or the free Mathematica Player 7EX
Download or upgrade to Mathematica Player 7EX
I already have Mathematica Player or Mathematica 7+