Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hi , please help me by writing me the code for all this in C++. You must write the program of an agent allowing to

Hi , please help me by writing me the code for all this in C++. You must write the program of an agent allowing to play the game of the Wumpus whose PEAS description is as follows: - Performance : Exit with gold: +1000 Fall or be eaten: Execute an action: 1 - Environment : n n square map Probability of wells on a space: 0.2 A Gold space and a Wumpus space Actions / Effectors: 1: up, 2: right, 3: down, 4: left, 5: grab, 6: climb Sensors: Smell = 1 if the Wumpus is on one of the adjacent spaces Breeze = 1 if a well is on one of the adjacent squares Glow = 1 if the gold is on the current square Shock = 1 if the last move was not valid (takes us out of the map) Given a completely visible map, find the best sequence of actions. The world map is represented in a textual file. The vacuum is represented by "", the wells by "P", the gold by "O" and finally the Wumpus by "W". You always start in the box (1,1) and will have to exit through this same box. This is how looks the map : ...P WOP. .... ..P. You must get it from a text file. Your program always returns valid paths Your program always returns an optimal sequence of actions. Your program has good algorithmic complexity. Use the A star algorithm. Please make sure to add the whole code you made... If needed, add it on multiple comments...

Also show me the ouptput of the optimal path cuz the last person send a code which doesn't work .

Don't forget this is the map to get from the file:

...P

WOP.

....

..P.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

What has been done before?

Answered: 1 week ago

Question

6. Describe to a manager the different types of distance learning.

Answered: 1 week ago

Question

1. Explain how new technologies are influencing training.

Answered: 1 week ago