Course Solutions Uncategorized (Solved) : Allowed Use Pre Dened Predicates 2 2 Similar Unless Explicitly Indicated Q28023263 . . . .

(Solved) : Allowed Use Pre Dened Predicates 2 2 Similar Unless Explicitly Indicated Q28023263 . . . .

 

You are not allowed to use any pre-dened predicates (other thanis/2, =/2 and similar), unless explicitly indicated.

4. (i) Code a predicate winner/2 that checks whether a given player (either x or o) has won tic-tac-toe, which means that he has occupied a line of three squares (horizontally, diagonally or vertically) ?- winner(x, [x,o,o, 0 x, free]) true (i) Code a predicate move/3 that checks whether the given transition between two configurations of the board is legal for a given player. This means that the new configuration differs from the previous one by exactly one formerly free square being now occupied by the player. The predicate should also be able to generate all legal moves from the given configuration for the given player free, free, ?- move(x, [x, 0 0 x, free, free], [x, o, free , 0 x, free, free]). true

4.

OR

PayPal Gateway not configured

OR

PayPal Gateway not configured

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post