A Chinese Knight's Tour

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.

A knight's tour is a sequence of knight's moves that visit each square of an 8×8 chessboard once and only once. Finding knight's tours is a classic problem in computer science.


This Demonstration explores the knight's tour problem on the Chinese chessboard (also called Xiangqi), which is played on a 9×10 rectangular grid. The chess piece is called the horse (or "Ma").


Contributed by: Frederick Wu (August 2010)
Based on Demonstrations by: Jay Warendorff
Open content licensed under CC BY-NC-SA


"Thus tomorrow, as I have said, will be accomplished what I so much desire, enabling me lawfully to roam through all the four quarters of the world seeking adventures on behalf of those in distress, as is the duty of chivalry of knights-errant like myself, whose ambition is directed to such deeds." in Miguel de Cervates' Don Quixote, Chapter 3, 1615 (translated by John Ormsby).


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.