Write a prolog program to set up the group

Assignment Help Computer Engineering
Reference no: EM133273124

Artificial Intelligence

There are two problems in this assignment.

Refer to the Wampus World problem setting discussed in lecture 8. There is an agent who can move in n n grid (one step at a time). Cells can have wampus, pit, Gold, or nothing. Smell around the wumpus and breeze around the pit. The agent will be killed if he enters the wampus cell. The agent can kill a wampus if he shoots an arrow (provided the wampus is in the adjacent cell faced by the agent). The objective of the agent is to get the Gold (not to kill wumpus). Following are the rules.

1. Let number of pit be p where p ≥ 0 as per the setting of environment. The agent did not know the value of p.

2. Let number of wumpus be w where w ≥ 0 as per the setting of environment. The agent did not know the value of w.

3. Let number of arrow be m where m ≥ w as per the setting of environment. The agent can see the value of m.

4. Agent can move in a cell adjacent to its current location (one cell only). Only horizontal and vertical movement is allowed. No diagonal movement. Any attempt to get down the n n grid (corner moves) gives him a bump, and he remains in the same cell.

5. Cost of actions

Attempt to move up, down, left, right

-1

Shoot arrow

-10

Grab Gold

150

6. Agent is always in cell (1,1) at the beginning. No pit or wumpus in the cell (1,1)

7. Agent dies if it enters a cell of live wumpus (Game over). Dead wumpus disappears. Wampus screams after being hit by an arrow, and the same can be heard by the agent using the sensor.

8. Agent entering in pit gets stuck. This is again Game over.

9. There is only one gold.

10. Environment is static.

11. Agent can move using GO up/down/left/right

12. Agent can focus arrow by SHOOT up/down/left/right

Logistice

Question 1. Write code in PYTHON. It should run on version 3 and above without any errors.

2. Code should take a file as a parameter to set the environment (say " env1.txt"). ˆ First line specifies the size of the grid (if the grid is 25 × 25 first line is 25).
ˆ Second line specifies the number of arrows (say 3).
ˆ Every subsequent line specifies one pit/gold or wumpus location.
"p 2 5" specifies a pit at (2,5) location
"w 3 7" specifies a wumpus at (3,7) location
"g 8 4" specifies a GOLD at (8,4) location A valid environment file is as below.
20
5
p 5 5
w 2 2
p 4 2
p 6 2
g 10 5
w 6 3
w 9 9
p 11 3

Here agent is in 20 × 20 tile with 5 arrows. There are 4 pits and 3 wumpuses. Gold is at (10,5) 3.Code should output the moves taken by the agent

Question 2 Prolog program to create a guest list

Assume in a college, there are ten students (give them any name you like). Some of them are friends with each other (make three groups). Each student has a mom and dad. Let a student want to throw a birthday party and wish to invite all his friends with their parents. Write a prolog program to set up the group and create the guest list by querying on the prolog. Please note that own parent names should not be on the guest list.

Reference no: EM133273124

Questions Cloud

Online learning in third world countries : Write/Provide a Socia-Political Analysis Paper following the afore cited structure. Topic is on "Online Learning in Third World Countries"
Multiple intelligences in planning activities : Is it important for teachers to use their knowledge about thinking/learning style and multiple intelligences in planning activities to help student learn effect
Learned from osteogenesis imperfecta : What is one interesting idea that you learned from Osteogenesis Imperfecta? How does it relate to your understanding of genetics?
Pesticides developed genetic abnormality diseases : Michael Skinner's lab experiments with rats and pesticide exposure showed that rats exposed to pesticides developed genetic abnormality diseases.
Write a prolog program to set up the group : Artificial Intelligence ode should take a file as a parameter, Write a prolog program to set up the group and create the guest list by querying on the prolog
Eight staphylococcus aureus are inoculated into cream pie : Eight Staphylococcus aureus are inoculated into a cream pie from the hands of a pastry chef.
Recommendation for what the school system should do : A public school system in havard city has 130,000 students in total. The average score of the students in a city wide exam is much lower than the scores of the
Identify a theorist from the theories at a glance table : PSY 211 Lifespan Development Assignment - Perspective Theorist Alignment Worksheet, Southern New Hampshire University
Mendel deduce that units of inheritance for height segregate : How did Mendel deduce that units of inheritance for height segregate, then combine at random with those from the opposite gamete at fertilization?

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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