Knight's tour: Difference between revisions

Content added Content deleted
Line 8,440: Line 8,440:
Warnsdorff’s rule, with random tie-breaks. The program keeps trying
Warnsdorff’s rule, with random tie-breaks. The program keeps trying
until it finds a solution. Running time can vary a lot.
until it finds a solution. Running time can vary a lot.

Beware the program writes to a file ‘__random_number__’ in the working directory. (This can be avoided in GNU m4 by using ‘esyscmd’ instead of ‘syscmd’. I do not know how to avoid it in general.)

<lang m4>divert(-1)
<lang m4>divert(-1)