Welcome to Scribd. Sign in or start your free trial to enjoy unlimited e-books, audiobooks & documents.Find out more
Standard view
Full view
of .
0 of .
Results for:
P. 1
Fox, Goose, Grain Artificial Intelligence Problem

# Fox, Goose, Grain Artificial Intelligence Problem

Ratings: (0)|Views: 2,826|Likes:

### Availability:

See more
See less

06/10/2013

pdf

text

original

AI & Logic Programming RA3803A05 CAP-451/Design Problem-1
Page 1

Design Problem Title/No.
1
Course Code:
CAP-451
Course Instructor:
Mr. JASWINDER SINGH
Course Tutor( if applicable):Date of Allotment :

Date of submission :
15-03-10
Student’s Roll number
:
RA3803A05
Section No.:
A3803
Declaration:I declare that this assignment is my individual work. I have not
copied from any other student’s work or from any other source except where
due acknowledgement is made explicitly in the text, nor has any part beenwritten for me by another person.
Student’s Sign:

___________________________________________________ Marks obtained: ____________ out of __________________

AI & Logic Programming RA3803A05 CAP-451/Design Problem-1
Page 2

CAP451Design Problem 1DOS:15-March-2010 Marks: 20
In
Farmer-Fox-Goose-Grain
” puzzle, a farmer wishes to cross a
river taking his fox, goose, ad grain with him.He can use a boat which will accommodate only the farmer and onepossession.Expectations:i.

If the fox is left alone with the goose, the goose will be eaten.If the goose is left alone with the grain it will be eaten [3]ii.

How many journeys will be taken to cross river [3]iii.

Draw a state space search tree for this puzzle using left bank and right bank to denote let and right banks respectively [4]iv.

For solving this problem, whether you will use Forwardreasoning or backward reasoning? Justify your answer [4]v.

Represent This Puzzle in Prolog Programming [6]

AI & Logic Programming RA3803A05 CAP-451/Design Problem-1
Page 3

Farmer+Goose+Fox+Grain Farmer+Goose NobodyFox Farmer+Goose GrainFox+Grain Farmer GooseNobody Farmer+Goose Fox+GrainGoose Farmer Fox+GrainGoose Farmer+Fox GrainFox Farmer+Grain Goose
SOLUTION
EXPECTATION-I
If the fox is left alone with the goose, the goose will be eaten. If thegoose is left alone with the grain it will be eaten [3]
In first Journey Farmer takes Goose to other side. Above condition satisfied.In second journey the Farmer drop the Goose and come alone.

In the third journey Farmer takes the grain to other side. Condition satisfied.In fourth journey Farmer come back with goose with condition satisfied.In fifth journey Farmer drops Goose on first side and takes the fox with him.In the sixth journey Farmer drops Fox on other side and come back.In the seventh journey the Farmer finally takes the Goose and reachsuccessfully by all the three things with no loss.In the above seven steps of Farmer
’s journey
from one side to other side of the river neither fox and grain, goose nor goose, fox stay or go together.Therefore the above condition gets satisfied.