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
Oct 1, 2015

Sep 11, 2015

Sep 6, 2015

Aug 26, 2015

Aug 25, 2015

Aug 21, 2015

Aug 16, 2015

Jul 30, 2015

Jun 24, 2015

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