Every lab on this site uses the same small world. This page explains how that world works and where it sits among the kinds of task environments an agent can face (AIMA §2.3). The rest of the book is largely about how the right technique depends on the kind of environment.
An agent perceives its environment through sensors and acts on it through actuators. At every time step it receives a percept, and its agent program maps the percept history to an action. A performance measure scores the resulting sequence of environment states. The agent is rational if it chooses actions expected to maximize that measure, given what it has perceived and what it knows (§2.2).
| The cave | A grid of rooms (4×4 in the book). The agent starts in [1,1], the bottom-left corner, facing east (right). Walls surround the grid. |
|---|---|
| Pits | Each room except [1,1] has a pit with probability 0.2. Falling in kills the agent. |
| The wumpus | One wumpus, placed uniformly at random among the rooms other than [1,1]. Entering its room while it lives is fatal. It never moves (except in Chapter 6). |
| Gold | One heap of gold, placed uniformly at random among the rooms other than [1,1]. It may sit in a pit or under the wumpus, so some worlds can't be won. |
| Arrow | The agent has exactly one arrow. It flies straight in the direction the agent faces until it hits the wumpus (killing it) or a wall. |
| Stench | in the wumpus's room and the rooms directly (not diagonally) next to it. A dead wumpus still smells. |
|---|---|
| Breeze | in rooms directly next to a pit |
| Glitter | in the room where the gold is |
| Bump | after walking into a wall |
| Scream | after the arrow kills the wumpus, heard anywhere in the cave |
The percept is a 5-tuple, e.g. [Stench, Breeze, None, None, None]. The agent never senses its own position: it must keep track of that itself.
| Forward | move one room ahead (or Bump into a wall) |
|---|---|
| TurnLeft / TurnRight | rotate 90° |
| Grab | pick up the gold if it is in this room |
| Shoot | fire the arrow straight ahead (once) |
| Climb | leave the cave. Only works in [1,1], and ends the episode |
Score: +1000 for climbing out with the gold, −1000 for dying, −1 per action, −10 for using the arrow. The episode ends when the agent dies or climbs out.
Keyboard: ↑ ← → G S C. Squares you've visited show what you perceived there (B, S, G). What you conclude is up to you. Chapter 7 turns exactly this reasoning into logic.
Before choosing a technique, characterize the task environment. First write its PEAS description (Performance, Environment, Actuators, Sensors). Then place it along the seven dimensions below. The harder side of each dimension (partially observable, multiagent, nondeterministic, sequential, dynamic, continuous, unknown) calls for more machinery. Test yourself: for each dimension, decide where the classic Wumpus World belongs before reading the answer.
Most chapters on this site change the Wumpus World along one of these dimensions, and that change is what calls for the chapter's technique. Highlighted cells differ from the classic world.