Knight's tour Warndorff's algorithm problem
robin.rytich at gmail.com
Wed Mar 10 10:32:05 CET 2010
On Wed, 2010-03-10 at 02:37 -0300, Gabriel Genellina wrote:
> Warnsdorff's algorithm is heuristic; it works most of the time, but in
> some cases leads to a dead end and you have to backtrack and try another
> The starting square is important; if you start at 1,1 (instead of 0,0)
> your program finds a solution for all those problematic board sizes.
Wow, didn't know about that. It seems to be a good idea for me to make a
little research around this question.
> Some comments on the code itself:
> This sets a class attribute (as opposed to normal, instance attributes)
> which is shared by all ChessBoard instances (this really should be covered
> in the FAQ!).
Damn, I'm ashamed.
About other points, I actually totally agree with you (and corrected
almost everything before received your letter). Thank you for your
remarks, I'll review public code more careful next time.
More information about the Python-list