% | 1 | 2 | 3 | % | 4 | 5 | 6 | % | 7 | 8 | 9 | bishop(1,5). bishop(2,4). bishop(2,6). bishop(3,5). bishop(4,8). bishop(5,7). bishop(5,9). bishop(6,8). bishopbi(X,Y):-bishop(X,Y); bishop(Y,X). move_user(X,Y) :- retractall(visited(Z)), asserta(visited(X)), asserta(visited(Y)), move(X,Y). move(X,Y) :- bishopbi(X,Y). move(X,Y) :- bishopbi(X,Z), not(visited(Z)), asserta(visited(Z)), print(Z),nl, move(Z,Y).