parham1998 / Knights-Tour

Implementation of knight’s tour problem using Warnsdorff's rule with JavaFX

Repository from Github https://github.comparham1998/Knights-TourRepository from Github https://github.comparham1998/Knights-Tour

Knights-Tour (warm-up project!)

Implementation of knight’s tour problem using Warnsdorff's rule with JavaFX

Given an 8x8 board with the knight placed on one of the empty blocks of the board. Moving according to the rules of chess, the knight must visit each square exactly once.

Warnsdorff's rule

The rule of Warnsdorff is a heuristic for finding a single knight's tour. The knight is always moved to the square from which the knight will have the fewest further moves. We don't count steps that return to a square that has previously been visited when calculating the number of onward moves for each candidate square. It is possible to have two or more choices for which the number of onward moves is equal.

example

the following animation shows Warnsdorff's rule in knight’s tour problem

knights_tour

About

Implementation of knight’s tour problem using Warnsdorff's rule with JavaFX


Languages

Language:Java 100.0%