Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- % Q4
- % computes the lists of beliefs and intentions resulting from the agent's observations
- % if Observation is in condition of at(_, _), then updates Beliefs as the agent just moved to there
- % if Observation is in condition of cleaned(_, _), then no need to update Beliefs as the agent is already there
- update_beliefs(Observation, Beliefs, Beliefs1) :-
- update_beliefs(at(X, Y), Beliefs, [at(X, Y)]);
- update_beliefs(cleaned(X, Y), Beliefs, Beliefs).
- % if Observation is in condition of cleaned, then updates Intentions2 as the first goal of it have been cleaned
- % else no need to update Intentions2
- update_intentions(Observation, Intentions2, Intentions3) :-
- update_intentions(cleaned(_, _), [_|Intentions], Intentions);
- update_intentions(at(_, _), Intention2, Intentions2).
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement