Question: write using prolog predicate We represent a chess board square by Row/Col, where Row and Col are integers from 1 to 8. A knight moves

 write using prolog predicate We represent a chess board square by Row/Col, where Row and Col are integers from 1 to 8. A knight moves in the shape of L. For example, if the knight is on 2/3 it can move to 1/1, 1/5, 3/1, 3/5, 5/2, 5/4. The other 2 squares that satisfy the L move are -1/2 and -1/4, but those are off the board. Write the predicate knight_move(R1/C1, R2/C2) which is satisfied if the knight can move from R1/C1 to R2/C2 in a single move. 

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!