CS代写 % Solve the maze, aiming to get all the agents to p(N,N)

% Solve the maze, aiming to get all the agents to p(N,N)
solve_maze :-
my_agents(Agents),
find_moves(Agents,Moves),

Copyright By PowCoder代写 加微信 powcoder

agents_do_moves(Agents,Moves),
solve_maze.

%%%%%%%%%%%%%%%% USEFUL PREDICATES %%%%%%%%%%%%%%%%%%
% Find a possible move for each agent
find_moves([],[]).
find_moves([A|As],[M|Moves]) :-
findall(P,agent_adjacent(A,P,_),PosMoves),
random_member(M,PosMoves),
find_moves(As,Moves).

程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com