:- module(agent, [look/0, move/1]). look :- write('looking\n'). move(D) :- here(L), connects(L,N,D), retract(here(L)), asserta(here(N)), !.