Using the rule in Example 6.2.3 as a model, write the eight move rules needed for the

Question:

Using the rule in Example 6.2.3 as a model, write the eight move rules needed for the full 8 × 8 version of the knight’s tour.

Data from Example 6.2.3

We may generalize the knight’s tour solution to the full 8 × 8 chessboard. Because it makes little sense to enumerate moves for such a complex problem, we replace the 16 move facts with a set of 8 rules to generate legal knight moves. These moves (productions) correspond to the 8 possible ways a knight can move (Figure 6.5). If we index the chessboard by row and column numbers, we can define a production rule for moving the knight down two squares and right one square: CONDITION: current row 6 ∧ current column 7 ACTION: new row = current row + 2 ∧ new column = current column + 1 If we use predicate calculus to represent productions, then a board square could be defined by the predicate square(R,C), representing the Rth row and Cth column of the board. The above rule could be rewritten in predicate calculus as:  move (square (Row, Column), square (Newrow, Newcolumn)) ← less_than_or_equals(Row, 6) ∧ equals (Newrow, plus (Row, 2)) ∧less_than_or_equals(Column, 7) ∧ equals (New column, plus (Column, 1)) plus is a function for addition; less_than_or_equals and equals have the obvious arithmetic interpretations. Seven additional rules can be designed that compute the remaining possible moves. These rules replace the move facts in the 3 × 3 version of the problem. The path definition from the 3 × 3 knight’s example offers a control loop for this problem as well. As we have seen, when predicate calculus descriptions are interpreted procedurally, such as through the pattern search algorithm, subtle changes are made to the semantics of predicate calculus. One such change is the sequential fashion in which goals are solved. This imposes an ordering, or procedural semantics, on the interpretation of predicate calculus expressions. Another change is the introduction of meta-logical predicates such as assert, which indicate actions beyond the truth value interpretation of predicate calculus expressions.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Question Posted: