Professional Documents
Culture Documents
Assignment 2 AI PDF
Assignment 2 AI PDF
Assignment 2 AI PDF
aduexsax
Lwhen tRe Gtates e envixonmet dnd actions ae Unceto
e aagnt has to exploxe t environment to gcdhex
index.mation
detcxmine a
n apGxthially obsexvable luoxiA butCamnot
Gne
neds to Canditio ns
ixed actions Sequence in advamce,
Gction 0n tuture percept
ha dhe Gçent Cam qathex neuRmouledge dhrouge i t
achions, it is Oftn net Usettl to plm tox each possi Le
Siduation Scaadh amd Xeciion
Rthea,it a bettex to intexVeave
how ta deal widh it?
Avoidling RepeatedStete
Do not Cseate
SQkution patfa with cycdez
need do Store amd
Do not qenexdte auyepeated Stare
chech a pottrtially axge numbea o Stata)
e., stad
"
gallon jug
. some water from the 4
(My) f
(x*y)<7 (x-[3-yly)r gallor jug to fil the 3
gallon
xy) If (xyc4 (k*y.0) Pour all water from 3
0. (x.y) f
gallon jug to the 4
gallon jug
(x*yk3 (0, x*y) Pour all water from the 4
gallon jug to the 3 gallon jug
The listed
production rules contalin all the actions that could be
agent in transferring the contents of performed by the
jugs. But, to solve the water jug problem in a
minimum number of moves,
following set of rules in the given sequence should be
performed:
Solution of water
Jug problem according to the productlon rules:
S.No.
4gllon Jug contents 3 gallon Jug contents
O gallon
Rule followed
O gallon
Initial state
O gallon
3 gallons
3 gllons
Ruleno.2
gallon Rule no. 9
gallons 3 gallons
5. Rule no. 2
4gallons 2 gallons
Rule no. 7
gallon 2 gallons
7. Rule no. 5
2 gallons
O gallon
Rule no. 9
On
reaching the 7"
attempt, we reach a state which is
this state,
our
goal state. Therefore, at
our
problem is solved.
The man and the chicken Crass the riuer (the fox and
chicken the
corn are safe together), he Leaves the on
The man then takes the fOx aChOSs the rueh n d snce