Build a rational agent to play (and win) Wumpus world using truth-table enumeration-based entailment (model checking) to estimate probabilities.
The program that simulates the Wumpus World will be given to you, as well as the code for an example agent that just makes random moves. You will need to download this code*. The example agent is in the file wwagent.py and the wumpus simulation is in the file wwsim.py. You should not change the wwsim.py file AT ALL. You should copy and edit the wwagent.py file to build your agent.
The program can be run by executing wwsim.py with the argument -gui from the command line. This brings up a GUI and you can cause your wwagent.py code to be evaluated each time you press “Move”. If you instead use the -nongui argument, then the game runs without a GUI until the agent gets the gold or dies.
You need to program your rational agent so that it meets the following four performance criteria:
1.If there is a 100% guaranteed safe move for the agent from its current position, then it will take that move.
2.If there is no 100% safe move, then the agent will take the safest move it can, based on its estimate of the probability of a wumpus or pit being in the target location.
3.It always identifies whether a location is safe at the earliest time possible given percepts
4.If the gold is reachable, and agent does not get killed because of step 2 above, the agent will eventually find it and win the game.
You have to implement your reasoning using an implementation of truth-table enumeration to determine at the earliest moment possible given the percepts whether a location is safe for the wumpus or not. You cannot use any other method to do this. The bulk of the grade will be given for this. You do not need to represent the rules of wumpus world declaratively – you can build them into a procedure for example that calculates the truth table for the Knowledge Base from the data structures available to you (and/or new ones you design). However, you must do the model checking of the truth table as we covered in class.
You will submit the following by email :
1. Your version of wwagent.py, well written and documented.
2. A PDF document that :
a. describes your implementation approach and overviews your code; and
b.shows, by way of evidence you collected from running the program multiple times, that your agent is rational according to the criteria 1 through 4. You could for example compare performance of multiple runs of your program against multiple runs of the random agent in the initial code you are given. To do this, please note that you can run the
You do not have to address ladders or any other aspect of Wumpus world other than the pits, wumpus and gold.