Exploring through incomplete clues
The Wumpus world is a grid containing gold, pits and a creature. The hunter cannot directly see neighbouring cells. It receives clues such as a breeze or a stench and must decide where to move from an incomplete account of its surroundings.
For this course project, I developed the hunter’s reasoning from the teacher’s starting skeleton. The simulator, graphical interface and HTTP/JSON connection come from the course. My contribution is the set of rules that turn perceptions into beliefs and then decisions.
Correcting the agent’s picture of the world
I separated belief correction from anticipation of the next action. Before deciding, the agent compares incoming perceptions with the state it had predicted. A collision with a wall can correct its estimated position and information about visited cells.
After choosing an action, it anticipates the resulting state for the next turn. This distinction keeps an assumed consequence separate from an observation that has actually arrived. Context is passed as arguments between rules, following the declarative approach required by the assignment.
That structure also gives a concrete way to inspect a decision: look at the previous prediction, the new clue and the belief that changed.
Comparing actions as the task changes
The decision module assigns heuristic scores to available actions. It considers estimated danger, the value of exploration, distance to the objective and revisiting cells, then ranks the choices. The criteria make each selection understandable in terms of the agent’s current state.
Preferences change with progress. Before acquiring the gold, the agent searches for it; afterwards, returning to the exit becomes the priority. That switch connects exploration and escape within the same reasoning loop.
Expressing the decision rules in Prolog
The assignment requires reified predicates: a test produces a truth value that other rules can manipulate. I applied this approach to belief and action modules using the constructs supplied by the reif library.
The interface retains state between requests and displays the consequences of actions in the simulator. The project’s result is an inspectable reasoning loop: perception, correction, comparison, action and another prediction. It applies symbolic AI to a concrete decision problem where the agent must act before it has complete information.