logo Hurry, Grab up to 30% discount on the entire course
Order Now logo
667 Times Downloaded

Ask This Question To Be Solved By Our ExpertsGet A+ Grade Solution Guaranteed

expert
Bill BaileyLaw
(5/5)

703 Answers

Hire Me
expert
Richard RussellResume writing
(5/5)

515 Answers

Hire Me
expert
Adarsh Vikram RaiComputer science
(/5)

903 Answers

Hire Me
expert
Rajat AahujaEnglish
(5/5)

936 Answers

Hire Me
Others
(5/5)

A finite grid world of size N × M, where N,M are integer numbers greater than or equal to 6 (six). Outermost cells contain Walls1.

INSTRUCTIONS TO CANDIDATES
ANSWER ALL QUESTIONS

1 Background: Wumpus World II

Environment: A finite grid world of size N × M, where N,M are integer numbers greater than or equal to 6 (six). Outermost cells contain Walls1. A Wall can also appear elsewhere on the grid.

 

Agent and NPCs: The world is also populated by an Agent, a Wumpus, a set of Confundus Portals, and a set of Coins. While the Agent is mobile, all other items remain fixed throughout the game and cannot co-inhabit a grid cell.

 

Goal: The goal of the Agent is to find all coins that are accessible and return to the initial position.

 

Actions: The Agent has orientation, so that its movements are: Forward, TurnLeft, and TurnRight. The Agent can also Pickup a gold coin if it is in the same cell as the Agent. The Agent can also shoot an arrow in the direction it faces. The Agent has only one arrow.

 

Percepts: Prior to any movement, the Agent receives an vector of sensory indicators: Confounded, Stench, Tingle, Glitter, Bump, Scream. All indicators are Off, except in the following situations:

Confounded indicator is On at the start of the game and after the Agent stepped into a cell with a Confundus

Portal.

Stench indicator is On in the cell next to one inhabited by the Wumpus.

Tingle indicator is On in the cell next to one inhabited by a Confundus Portal.

Glitter is On in the cell inhabited by a Coin.

Bump is On if the Agent attempted an action Forward and the next cell in that direction contained a Wall.

Scream indicator is On after the Agent shot an arrow and the Wumpus was in the direction of the shot.

Notice that the agent does not perceive its exact location on the grid.

 

Action Effects and Agent Capabilities: All actions taken by the Agent are deterministic in nature. The Agent is capable of counting its steps and turns. Thus, the Agent is capable of orientation in space relatively to its initial position and direction. The initial direction is termed Relative North. The direction to the left of Relative North is Relative West, the direction to the right of Relative North is Relative East, and the direction opposite to Relative North is termed Relative South. The initial position of the agent is the Origin with relative coordinates (0,0). Actions have the following effects:

Executing action Forward changes the position of the Agent. If the agent’s orientation is Relative North,the second coordinate of its relative position will increase by 1: (x,y) → (x,y +1). Executing Forward in Relative South orientation will decrease the second relative coordinate: (x,y) → (x,y −1). Similarly, executing Forward in Relative West (East) orientation will decrease (increase) the first relative coordinate. Exceptions to the rule:

The intended new location is inhabited by a Wall. In this case the relative location of the agent is not changed.

The intended new location is inhabited by a Confundus Portal. The Agent is randomly relocated to a safe location in the Wumpus World. The relative position is reset to (0,0) and relative orientation is reset to become the Relative North. All memory of previous steps and sensory readings is lost, except the fact of existence of uncollected coins, whether the Wumpus is alive and whether the Agent has the arrow.

 

 

1 Notice that Walls are not between the cells, but within the cells completely filling them.

 

The intended new location is inhabited by the Wumpus. Game ends. Relative position reset occurs, as with the case of stepping into a Confundus Portal, to prepare for a new game. All memory of previous steps and sensory reading is lost without exceptions, the arrow is returned to the Agent.

TurnLeft changes the Agent’s current orientation by 90 degrees counter-clockwise. E.g. if the Agent’scurrent orientation is Relative East, then after executing TurnLeft the orientation will become Relative North.

TurnRight changes the Agent’s current orientation by 90 degrees clockwise. E.g., if the Agent’s currentorientation is Relative South, then after executing TurnRight the orientation will become Realative West.

Pickup action removes a Coin, if present, from the current location of the Agent. Percepts change accord- ingly.

Shoot action removes the Wumpus from the world, if the Wumpus inhabits any of the cells ahead of theagent.

 

2 The Assignment

In this assignment you will implement the Agent’s logic in a Prolog program. Your Prolog implementation will allow the Agent to analyse the sensory data, navigate and map the current world. You will also implement a basic Wumpus World Driver to test your (and other’s) Agent using PySWIP library.

 

2.1 The Agent

Your Proglog Agent program will implement the following terms:

reborn/0 – implements Agent’s reset due to arriving into a cell inhabited by the Wumpus.

move(A,L) – implement Agent’s reasoning response to executing action A and receiving sensory input L.

Action constants are {shoot,moveforward,turnleft,turnright,pickup}

Sensory input is a list of six indicators, one for each percept: Confounded, Stench, Tingle, Glitter, Bump, Scream. In that order. Each indicator can have one of the two values {on, off}.

reposition(L) – implements Agent’s reset due to game start or arrival to a cell inhabited by a ConfundusPortal. The argument includes the initial sensory information. The format of L is the same as with the move/2 function. Confundus indicator should be on.

Localisation and mapping.

visited(X,Y), where X,Y are integers, returns true if the Agent has visited relative position (X,Y). Otherwise it returns false.

wumpus(X,Y), where X,Y are integers, returns true if the Agent knows (or reasons) that the Wumpus may inhabit relative position (X,Y). Otherwise it returns false. Notice that there may be more than one positions where true is returned. It is also possible that all positions return false, either because there is no Wumpus or no relevant information exists.

confundus(X,Y), where X, Y are integers, returns true if the Agent knows (or reasons) that a Confundus Portal may inhabit relative position (X,Y). Otherwise false is returned.

tingle(X,Y), where X, Y are integers, returns true if the Agent knows (or reasons that) it will experience a Tingle indicator beging on at the relative position (X,Y). Otherwise, false is returned.

glitter(X,Y), where X, Y are integers, returns true if the Agent knows (or reasons that) it will experience Glitter indicator being on at the relative position (X,Y). Otherwise false is returned. Notice that this knowledge changes, once the Agent picks up the coin.

 

stench(X,Y), where X,Y are integers, returns true if the Agent knows it will experience Stench indicator being on at the relative position (X,Y). Otherwise, false is returned. Notice that this knowledge changes, once the Wumpus is killed.

safe(X,Y), where X,Y are integers, returns true if the Agent knows or can reason that the relative position (X,Y) contains neither a Wumpus nor a Confundus Portal.

wall(X,Y), where X, Y are integers, returns true if the Agent knows or can reason that the relative position (X,Y) contains a Wall.

 

(5/5)
Attachments:

Expert's Answer

667 Times Downloaded

Related Questions

. The fundamental operations of create, read, update, and delete (CRUD) in either Python or Java

CS 340 Milestone One Guidelines and Rubric  Overview: For this assignment, you will implement the fundamental operations of create, read, update,

. Develop a program to emulate a purchase transaction at a retail store. This  program will have two classes, a LineItem class and a Transaction class

Retail Transaction Programming Project  Project Requirements:  Develop a program to emulate a purchase transaction at a retail store. This

. The following program contains five errors. Identify the errors and fix them

7COM1028   Secure Systems Programming   Referral Coursework: Secure

. Accepts the following from a user: Item Name Item Quantity Item Price Allows the user to create a file to store the sales receipt contents

Create a GUI program that:Accepts the following from a user:Item NameItem QuantityItem PriceAllows the user to create a file to store the sales receip

. The final project will encompass developing a web service using a software stack and implementing an industry-standard interface. Regardless of whether you choose to pursue application development goals as a pure developer or as a software engineer

CS 340 Final Project Guidelines and Rubric  Overview The final project will encompass developing a web service using a software stack and impleme