Prolog application, Operating System

Assignment Help:

1. Problem Domain
You will be considering the Wumpus world introduced in Russell and Norvig (2009) Chapter 7. For this programming assignment you'll use Prolog's ability to do inference in order to write an agent that will make safe moves within its world.

2. Project Infrastructure
1) You will need to download and install your own version of SWI-Prolog. It is freely available for major operating systems. Major Linux distributions have copies available within their package system.

2) Download the following three files:
I attached these files.

3) The first two files comprise a simulator for the Wumpus world. The third is an empty agent skeleton program. Your assignment is to flesh out the details in my agent.pl

3. Running the code

Start SWI-Prolog:
pl
Load the world simulator:
?- [wumpus_world].
Load the agent:
?- [my_agent].
Run the agent:
?- evaluate_agent(1, Score, Time).
Correct to: "wumpus:evaluate_agent(1, Score, Time)"? y

If you read the output, you'll see the default agent just moves forward. It does this in the world shown in Russell and Norvig's Figure 7.2, which causes the agent's dead rather soon. (You use Ctrl+D to exit the programming environment.)

You will need to edit my agent.pl produce a more rational movement. To do this you will need to define an intelligent run_agent (Percept, Action). The percepts are provided as a list of five elements [Stench, Breeze, Glitter, Bump, Scream], where you receive a "yes" or a "no" in the respective position.

There is also an init_agent function which you can use for initialization.

The simulator knows the total state of the world, while your agent will know only what it senses through its perceptions. Initially the agent knows only the perceptions in position (1,1) and in order to acquire other information must be moved in other cells of the grid. Your agent must maintain its own state, containing all the information that gradually becomes available. The state will have to be update with the new perceptions every time an action is executed, and this information must be represented so as to permit reasoning (via interference) as to what operations are safe.


Related Discussions:- Prolog application

Os, why we say" OS is a resource allocator" and “OS is a control program"?

why we say" OS is a resource allocator" and “OS is a control program"?

Read-write locks, Consider a large web-based database. In some sense, Googl...

Consider a large web-based database. In some sense, Google is sort of like this. There might be many users who want to read from the database, but only a few users who are allowed

Describes responsibilities of the I/O manager, Q. Describes responsibilitie...

Q. Describes responsibilities of the I/O manager? Answer: The I/O manager is responsible for file systems and device drivers and network drivers. The I/O manager keeps follow

Describe the possible rmi invocation semantics, Question: (a) Briefly d...

Question: (a) Briefly discuss and describe the possible RMI invocation semantics. (b) (i) What is data marshaling? (ii) Explain the role of a remote object reference dur

Explain fixed partitioning, Explain fixed partitioning. Partitioning ar...

Explain fixed partitioning. Partitioning are the simpler techniques that don't involve virtual memory. Partitioning has been used in numerous variations in operating systems.

Managing outside communication, Problem: Managing Outside Communication...

Problem: Managing Outside Communication. a. What is the principal action we use when communicating through a web browser? b. Give an example of how to preaddress an email

How does a program execution take place in multiprogramming?, How does a pr...

How does a program execution take place in multiprogramming? While the processor is dealing with a number of programs, the sequence with which programs are implemented will de

Explain lru enhanced second chance algorithm, Enhanced Second chance algori...

Enhanced Second chance algorithm In this a modify bit is as well used. Now if the ordered pair of reference and modify is (0,0) neither recently used nor modified - the best

Define lru page replacement algorithm, Define LRU Page Replacement Algorith...

Define LRU Page Replacement Algorithm LRU policy: LRU expands to least currently use. This policy suggests which we re- move a page whose last usage is farthest from current ti

Define the server communications module or scm, Define the Server Communica...

Define the Server Communications Module or SCM The Server Communications Module (SCM) performs many necessary functions. The SCM responsible for establishing, maintaining, and

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd