The agent now avoids going into squares with possible pits and wumpuses.