pygame is
Simple DirectMedia Layer is
Site Swing
Knight Terror

Knight Terror - 0.01

Sean J McKiernan (mekire)



Investigating the commonly posed CS problem of calculating a "Knight's Tour".

Calculates a knight's tour using the Warnsdorff algorithm.
You can also put it on a plain brute force mode to illustrate
how utterly ineffective this approach is.

If you are not familiar with Warnsdorff's algorithm or with the problem of finding a Knight's Tour in general please see the wikipedia page on this subject.'s_tour

Mouse: Place knight, click buttons

Space: Start
Enter: Reset
+ : Increase FPS
- : Decrease FPS
w : Toggle between Warnsdorff/Brute
# : Toggle showing path numbers on/off
c : Toggle continuous solution mode on/off
r : Replay current tour
n: Pop the stack and find next tour
Esc : Quit

Searching for a closed tour specifically is not yet implemented.
The tour you find may be closed but you are much more likely to find open tours.


Home Page:


click to view original size


Knight Terror - 0.01 - Dec 19, 2011 account Comments

If you wish to leave a comment with your account, please sign in first.

No user comments have been submitted.

our projects welcomes all python game, art, music, sound, video and multimedia projects. If they use pygame or not.
recent releases
May 22, 2016

May 21, 2016

May 18, 2016

May 1, 2016

Mar 27, 2016

Mar 26, 2016

Mar 22, 2016

Mar 19, 2016

Mar 17, 2016

... more!
for pygame related questions, comments, and suggestions, please see help (lists, irc)