the obvious way to reduce the problem of covering fields is to consider the problem of either performing next move or finding out that none is possible let us define the corresponding algorithm first approach is to employ linear search in order to find the next move from which the tour can be completedprocedure trynextmovebegin if board is not full then initialize selection of candidates for the next move and select first onewhile ~(no more candidates~(tour can be completed from this candidatedo select next candidate endhandle search results else handle the case of full board end end trynextmovenotice the if encompassing the procedure bodyit ensures that the degenerate case of full board is handled correctly this is general device that is similar to how arithmetic operations are defined to handle the zero casethe purpose is convenience and robustness if such checks are performed outside of the procedure (as is often done for optimizationthen each call must be accompanied by such check -or its absense must be properly justified in each case introducing such complications is best postponed until correct algorithm is constructed and their necessity is seen the predicate tour can be completed from this candidate is conveniently expressed as functionprocedure that returns logical value since it is necessary to record the sequence of moves being generatedthe function-procedure is proper place both for recording the next move and for its rejection because it is in this procedure that the success of completion of the tour is determined procedure canbedone move )booleanbegin record movetrynextmoveif failed to complete the tour then erase move endreturn tour has been completed end canbedone the recursion scheme is already evident here if we wish to be more precise in describing this algorithmwe are forced to make some decisions on data representation we wish to keep track of the history of successive board occupations then each move in the tour sequence can be characterized by an integer in addition to its two coordinates on the board xy at this point we can make decisions about the appropriate parameters for the two procedures trynextmove and canbedone the parameters of trynextmove are to determine the starting conditions for the next move and also to report on its success the former task is adequately solved by specifying the coordinates xy from which the move is to be madeand by specifying the number of the move (for recording purposesthe latter task requires boolean result parameter with the meaning the move was successful the resulting signature is