359deadloop problem: in first order logic implementation for wumpus problem
- Apr 19, 2004Hello everyone,
I am trying to implement "wumpus problem" by prolog according to
chapter 7 of AIMA version 1 first order logic description.
Mr.Author called the system containing this goal-based agent as
action-valued system because its action has been classified as "great
desired, good desired, medium desired, risky desired".
My implementation of 1 rules is follows:
1. if percept contains "glitter" and the agent doesn't hold gold, the
agent will do "grab" action. This is great desired.
The above rule is a little different from Mr.author's logic
description and it causes deadloop problem.
The problem is following:
1. For the first time when the agent in the "glitter" position, it
doesn't contain gold. Therefore the agent's grab operation will
result in "grab nothing". Therefore after agent get the next percept,
it will do this "great desired operation(grab)" again. The result
fails, grab, ..... fail, grab, dead loop happens.
2. I think the dead loop problem exists in many places of wumpus
2.1. In book, medium desired action is "move to Ok position and the
position is visited". I think "move" action contains "turn left, turn
"risky desired action" is "move to not ok position and the position
is not visited".
2.1.a Now test data is:
two pit exists, one at [1,3], the other at [3,1], gold at [4,2],
wumpus at [4,4].
2.2 agent at [1,1] and start exploration.
move to [2,1] and face "breezy", then move to [2,2] and
face "breezy" again. Then the agent faces a dead loop although it
clearly exists a safe path from [1,1] to [4,2].
I think the causation of the problem is "action-value system", the
conservative action" has higher desirability than "risky action". it
is impossible to try the "risky action" although these action exists.
Do you think my understanding is in error?
If yes, please give me your idea?
If not, could you tell me how to handle the fault of "action-valued
Thank you for your attention.
chenyu (shanghai, China)