Prolog application, Operating System

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.

Posted Date: 3/30/2013 2:18:21 AM | Location : United States







Related Discussions:- Prolog application, Assignment Help, Ask Question on Prolog application, Get Answer, Expert's Help, Prolog application Discussions

Write discussion on Prolog application
Your posts are moderated
Related Questions
Pure and impure interpreters      In a pure interpreter, the source program is maintained in the source form throughout its interpretation. This arrangement acquires substantia

The swapper work s on the biggest scheduling priority. Initially it will look for any sleeping process, if not get then it will see for the ready-to-run process for swapping. Bu

What is a reference string? An algorithm is evaluated by running it on a particular string of memory references and computing the number of page faults. The string of memory re

Explain about deadlock detection? In deadlock situation, the system must provide An algorithm that verifies the state of the system to verify whether a deadlock has occu

What is real time system? A real time system has well explained, fixed time constraints. Processing must be done within the explained constraints, or the system will fail. It i

Briefly explain process management in Windows 2000. The Windows 2000 process manager provides for deleting, creating and using threads and processes. It has no knowledge about

Overlay structured program: A program consisting of overlays is referred as overlay structured program in which an overlay is a part of program which has similar load origin as

In the mean while the fork() system call the Kernel creates a copy of the parent process's address space and adds it to the child process. But the vfork() system call do no

COMBINED ULT/KLT APPROACHES Idea is to merge the best of both approaches Solaris is an illustration of an OS that combines both ULT and KLT  Thread creation complete i

Processes have valid and invalid entries on their page tables. The valid entries all point to some where "real" (e.g. a physical page, or some portion of disk in case of non-reside