Starting from:

$30

CptS440-540- Homework 9 Solved

General Instructions: Upload your agent files (see below) as your submission for Homework 9 for the course CptS 440 Pullman (all sections of CptS 440 and 540 are merged under the CptS 440 Pullman section) on the Canvas system by the above deadline. Note that you may submit multiple times, but we will only grade the most recent entry submitted before the deadline.

For this homework, you will improve the agent from HW5 to handle locating and shooting the Wumpus. I have posted my solution to HW5 (C++ and Python versions) on Blackboard Learn. You can start with my HW5 solution or your own. Specifically, your agent will need to handle worlds where there will always be a safe path to the gold, but that safe path may require killing the Wumpus. Your agent should do the following:

The agent should still implement the requirements from HW5.
In addition to the information maintained by the HW5 agent, the agent should also maintain information about stench locations and the Wumpus location.
Implement the logical rule: If there are two stench locations in a diagonal arrangement, and one of their common adjacent locations is safe, then the other common adjacent location contains the Wumpus. For example, if there is a stench in (2,2) and (3,3), and (3,2) is safe, then the Wumpus is in (2,3). Your agent should never die from the Wumpus. Once the Wumpus is located, you should add adjacent locations without pits as safe locations. If the agent successfully shoots the Wumpus, then add the Wumpus location as a safe location. You may assume the Wumpus is never collocated with a pit.
If the agent does not have the gold, and there are no remaining safe unvisited locations, then the agent should do the following:If the agent knows the location of the live Wumpus, and there is a safe location facing the Wumpus, then the agent should move there and shoot the Wumpus.
If the Wumpus is dead or cannot be killed, then the agent should move to an unvisited location that is not known to be unsafe.
Your agent should be implemented entirely in the Agent.h and Agent.cc files (for C++ implementations) or the Agent.py file (for Python implementations). You may also include an optional readme.txt file with any extra instructions for compiling and running your agent. Your agent should not require any user input. Your agent will be tested by copying only your Agent.h and Agent.cc files, or Agent.py file, into a fresh copy of the simulator code (that includes the Makefile, Search.h, Search.cc and Search.py from HW5), and compiling and running it on several test worlds. Your grade will be based on satisfying the above requirements, good programming style, and your agent’s scores on the test worlds.

The test worlds will adhere to the following constraints:

The world size can vary from 3x3 to 9x9.
The Wumpus is never collocated with a pit.
There is always a safe path to the gold, but it may require killing the Wumpus.

More products