Advertisement
Guest User

Untitled

a guest
May 28th, 2015
267
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. % Q4
  2. % computes the lists of beliefs and intentions resulting from the agent's observations
  3.  
  4. % if Observation is in condition of at(_, _), then updates Beliefs as the agent just moved to there
  5. % if Observation is in condition of cleaned(_, _), then no need to update Beliefs as the agent is already there
  6. update_beliefs(Observation, Beliefs, Beliefs1) :-
  7. update_beliefs(at(X, Y), Beliefs, [at(X, Y)]);
  8. update_beliefs(cleaned(X, Y), Beliefs, Beliefs).
  9.  
  10. % if Observation is in condition of cleaned, then updates Intentions2 as the first goal of it have been cleaned
  11. % else no need to update Intentions2
  12. update_intentions(Observation, Intentions2, Intentions3) :-
  13. update_intentions(cleaned(_, _), [_|Intentions], Intentions);
  14. update_intentions(at(_, _), Intention2, Intentions2).
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement