Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 10

1

UNIT III PLANNING


3.1 INTRODUCTION

There are two type of planning 1) CLASSICAL PLANNING: The environment which are fully o !erva le" #etermini!tic" finite" !tatic an# #i!crete$ %) N&N CLASSICAL PLANNING: The environment which i! partially o !erva le or !tocha!tic environment

3.1.2 WHAT HAVE WE DONE SO FAR ?


'arlier we !aw that problem !ol"#$% &%e$'! are a le to plan ahea# ( to con!i#er the con!e)uence! of sequences of action! ( efore acting$ *e al!o !aw that a ($o)le*%e b&!e* &%e$'! can !elect action! a!e# on e+plicit" logical repre!entation! of the current !tate an# the effect! of action!$ Thi! allow! the agent to !uccee# in comple+" inacce!!i le environment! that are too #ifficult for a pro lem(!olving agent

Problem Sol"#$% A%e$'! + ,$o)le*%e b&!e* A%e$'! - Pl&$$#$% A%e$'!

3.1.3 SI.PLE PLANNING ALGORITH.


1$ Generate a goal to achieve %$ Con!truct a plan to achieve goal from current !tate ,$ '+ecute plan until fini!he# -$ .egin again with new goal /unction! u!e# in the algorithm: STAT'(0'SC1IPTI&N: u!e! a percept a! input an# return! the #e!cription of the initial !tate in a format re)uire# for the planner$ I0'AL(PLANN'1: i! the planning algorithm 2A3'(G&AL(45'16: a!7! the 7nowle#ge a!e what the ne+t goal will e$

3.1./ PRO0LE. SOLVING "! PLANNING Con!i#er the ta!7 of getting mil7 or algorithm fail! mi!era ly anana ect form !uper mar7et8 the !tan#ar# !earch

In !earche! 9pro lem !olving)" operator! are u!e# !imply to generate !ucce!!or !tate! an# we can not loo7 :in!i#e: an operator to !ee how it;! #efine#$ The goal(te!t pre#icate al!o i! u!e# a! a : lac7 o+: to te!t if a !tate i! a goal or not$ The !earch cannot u!e propertie! of how a goal i! #efine# in or#er to rea!on a out fin#ing path to that goal$ Hence this approach is all algorithm and representation weak. Planning i! con!i#ere# #ifferent from pro lem !olving ecau!e of the #ifference in the way they repre!ent !tate!" goal!" action!" an# the #ifference! in the way they con!truct action !e)uence!$

Pro lem! with Pro lem !olving agent:


< It i! evi#ent from the a ove figure that the actual ranching factor woul# e in the thou!an#! or

million!$ The heuri!tic evaluation function can only choo!e !tate! to #etermine which one i! clo!er to the goal$ It cannot eliminate action! from con!i#eration$ The agent ma7e! gue!!e! y con!i#ering action! an# the evaluation function ran7! tho!e gue!!e!$ The agent pic7! the e!t gue!!" ut then ha! no i#ea what to try ne+t an# therefore !tart! gue!!ing again$
< It con!i#er! !e)uence! of action! eginning from the initial !tate$ The agent i! force# to #eci#e

what to #o in the initial !tate fir!t" where po!!i le choice! are to go to any of the ne+t place!$ 5ntil the agent #eci#e! how to ac)uire the o =ect!" it can>t #eci#e where to go$ Planning empha!i?e! what i! in operator an# goal repre!entation!$ There are three 7ey i#ea! ehin# planning: < to "open up" the representations of !tate" goal!" an# operator! !o that a rea!oner can more intelligently !elect action! when they are nee#e# < the planner is free to add actions to the plan wherever they are nee#e#" rather than in an incremental !e)uence !tarting at the initial !tate < most parts of the world are independent of most other parts which ma7e! it fea!i le to ta7e a con=unctive goal an# !olve it with a #ivi#e(an#(con)uer !trategy 3.1.1 SITUATION CALCULS Situation calculu! i! a ver!ion of fir!t(or#er(logic 9/&L) that i! augmente# !o that it can rea!on a out action! in time$

3.1.2 STRIPS 3S'&$4or* Re!e&r56 I$!'#'7'e Problem Sol"er8


Cla!!ical Planner! u!e the ST1IPS 9Stanfor# 1e!earch In!titute Pro lem Solver) language to #e!cri e !tate! an# operator!$ It i! an efficient way to repre!ent planning algorithm!$

State! are repre!ente# y con=unction! of function(free groun# literal!" that i!" pre#icate! applie# to con!tant !ym ol!" po!!i ly negate#$ An e+ample of an initial !tate i!: At(Home) @A (Have(Milk) @A (Have(Bananas) @A (Have(Drill) @A $$$ Goal! are a con=unction of literal!$ Therefore the goal i! At(Home) @A Have(Milk) @A Have(Bananas) @A Have(Drill) Goal! can al!o contain varia le!$ .eing at a !tore that !ell! mil7 i! e)uivalent to At( ) @A !ells( "Milk) Strip! operator! con!i!t of three component! < &5'#o$ *e!5r#p'#o$: what an agent actually return! to the environment in or#er to #o !omething$ < pre5o$*#'#o$: con=unction of atom! 9po!itive literal!)" that !ay! what mu!t e true efore an operator can e applie#$ < e44e5' o4 &$ oper&'or: con=unction of literal! 9po!itive or negative) that #e!cri e how the !ituation change! when the operator i! applie#$ '+ample: An e+ample action of going from one place to another:
#p9ACTI&N:$o(there)" P1'C&N0:At(here) %& 'ath(here" there) '//'CT:At(there) @A (At(here))

3.2 PLANNING AS SEARCH


There are two main approache! to !olving planning pro lem!" #epen#ing on the 7in# of !earch !pace that i! e+plore#: 1$ Situation(!pace !earch %$ Planning(!pace !earch

PLAN SPAC' S'A1CB < the !earch !pace i! the !pace of all po!!i le plan! < a no#e corre!pon#! to a partial plan < initially we will !pecify an :initial plan: which i! one no#e in thi! !pace

< <

a goal no#e i! a no#e containing a plan which i! complete" !ati!fying all of the goal! in the goal !tate the no#e it!elf contain! all of the information for #etermining a !olution plan 9e$g$ !e)uence of action!)

3.2.1 SITUATION SPACE SEARCH In !ituation !pace !earch < The !earch !pace i! the !pace of all po!!i le !tate! or !ituation! of the worl# < Initial !tate #efine! one no#e < A goal no#e i! a !tate where all goal! in the goal !tate are !ati!fie# < A !olution plan i! the !e)uence of action! 9e$g$ operator in!tance!) in the path from the !tart no#e to a goal no#e
There are % approache! to !ituation(!pace planning: 1$ Progre!!ion !ituation(!pace planning %$ 1egre!!ion !ituation(!pace planning 3.2.1.1 FORWARD CHAINING OR PROGRESSION SITUATION SPACE PLANNING

(orward)chaining from initial !tate to goal !tate Loo7! =u!t li7e a !tate(!pace !earch e+cept ST1IPS operator! are !pecifie# in!tea# of a !et of ne+t(move function! 6ou can u!e any !earch metho# you li7e 9i$e$ ./S" 0/S" AC) D#!&*"&$'&%e: huge !earch !pace to e+plore" !o u!ually very inefficient" high ranching factorD

Al%or#'6m
1$ Start from initial !tate %$ /in# all operator! who!e precon#ition! are true in the initial !tate ,$ Compute effect! of operator! to generate !ucce!!or !tate! -$ 1epeat !tep! E%(E, until a new !tate !ati!fie! the goal con#ition!

<

/ormulation a! !tate(!pace !earch pro lem: < Initial !tate F initial !tate of the planning pro lem Literal! not appearing are fal!e < Action! F tho!e who!e precon#ition! are !ati!fie# A## po!itive effect!" #elete negative < Goal te!t F #oe! the !tate !ati!fy the goal < Step co!t F each action co!t! 1

3.2.1.2 0AC,WARD CHAINING OR REGRESSION SITUATION SPACE PLANNING

<

Backward)chaining from goal !tate to initial !tate

<

1egre!!ion !ituation(!pace planning i! u!ually more efficient than progre!!ion ecau!e many operator! are applica le at each !tate" yet only a !mall num er of operator! are applica le for achieving a given goal Bence" regre!!ion i! more goal(#irecte# than progre!!ion !ituation(!pace planning D#!&*"&$'&%e* cannot alway! fin# a plan even if one e+i!t!D

< <

Al%or#'6m9 1$ Start with goal no#e corre!pon#ing to goal to e achieve# %$ Choo!e an operator that will add one of the goal! ,$ 1eplace that goal with the operator>! precon#ition! -$ 1epeat !tep! E%(E, until you have reache# the initial !tate G$ *hile ac7war#(chaining i! performe# y ST1IPS in term! of the generation of goal!" !u (goal!" !u ( !u (goal!" etc$" operator! are u!e# in the forwar# #irection to generate !ucce!!or !tate!" !tarting from the initial !tate" until a goal i! foun#$ ,$%$% 'HA2PL': .&H *&1L0

Definitions of Descriptors: o$'&ble3:89 loc7 i! on top of the ta le o$3:;<89 loc7 i! on top of loc7 + 5le&r3:89 there i! nothing on top of loc7 I therefore it can e pic7e# up 6&$*emp'<9 you are not hol#ing any loc7 Definitions of Operators: &pJACTI&N: p#5(7p3:8 P1'C&N0: onta le9+)" clear9+)" han#empty '//'CT: hol#ing9+)" Konta le9+)" Kclear9+)" Khan#empty L &pJACTI&N: p7'*o)$3:8 P1'C&N0: hol#ing9+) '//'CT: onta le9+)" clear9+)" han#empty" Khol#ing9+) L &pJACTI&N: !'&5(3:;<8 P1'C&N0: hol#ing9+)" clear9y) '//'CT: on9+"y)" clear9+)" han#empty" Khol#ing9+)" Kclear9y) L

7
&pJACTI&N: 7$!'&5(3:;<8 P1'C&N0: clear9+)" on9+"y)" han#empty '//'CT: hol#ing9+)" clear9y)" Kclear9+)" Kon9+"y)" Khan#empty ) L

FORWARD CHANNING
S'e p E1 S'&'e Appl#5&ble Oper&'or! pic7up9A) un!tac79C".) Oper&'or Appl#e* pic7up9A)

onta le9A) M onta le9.) M on9C" .) M clear9A) M clear9C) M han#empty E% Konta le9A) M onta le9.) M on9C" .) M Kclear9A) M clear9C) M E, hol#ing9A) onta le9.) M on9C" .) M on9A" C) M clear9A) M Kclear9C) M han#empty M Khol#ing9A)

put#own9A) !tac79A"C)

!tac79A"C)

Matches goal state so

0AC,WARD CHANNING

,$%$, B'51ISTICS /&1 STAT'(SPAC' S'A1CB < Neither progre!!ion or regre!!ion are very efficient without a goo# heuri!tic$ Bow many action! are nee#e# to achieve the goalN '+act !olution i! NP har#" fin# a goo# e!timate Two approache! to fin# a#mi!!i le heuri!tic: < The optimal !olution to the rela+e# pro lem$ 1emove all precon#ition! from action! < The !u goal in#epen#ence a!!umption: The co!t of !olving a con=unction of !u goal! i! appro+imate# y the !um of the co!t! of !olving the !u pro lem! in#epen#ently$

3./ PARTIAL ORDER PLANNING T&TAL &10'1 v! PA1TIAL &10'1 PLANN'1 Any planner that maintain! a partial !olution a! a totally or#ere# li!t of !tep! foun# !o far i! calle# a 'o'&l or*er pl&$$er" or a l#$e&r pl&$$er$ Alternatively" if we only repre!ent partial(or#er con!traint! on !tep!" then we have a p&r'#&l or*er pl&$$er" which i! al!o calle# a $o$ l#$e&r pl&$$er$ In thi! ca!e" we !pecify a !et of temporal con!traint! etween pair! of !tep! of the form S1 O S% meaning that !tep S1 come! efore" ut not nece!!arily imme#iately efore" !tep S%$ *e al!o !how thi! temporal con!traint in graph form a! S1 PPPPPPPPPQ S% ST1IPS i! a total(or#er planner" a! are !ituation(!pace progre!!ion an# regre!!ion planner! Partial(or#er planner! e+hi it the property of lea!t commitment ecau!e con!traint! or#ering !tep! will only e in!erte# when nece!!ary$ &n the other han#" !ituation(!pace progre!!ion planner! ma7e commitment! a out the or#er of !tep! a! they try to fin# a !olution an# therefore may ma7e mi!ta7e! from poor gue!!e! a out the right or#er of !tep!$

0ifference! etween !ituation(!pace algorithm an# plan(!pace algorithm An alternative i! to !earch through the !pace of plans rather than a !pace of situations$ That i!" we !tart with a !imple" incomplete plan" which we call a p&r'#&l pl&$$ Then we con!i#er way! of e+pan#ing the partial plan until we come up with a complete plan that !olve! the pro lem$ *e u!e thi! approach when the or#ering of !u (goal! affect! the !olution$

Two type! of operator! are u!e#:


< 1efinement operator! ta7e a partial plan an# a## con!traint! to it$ They eliminate !ome plan!

from the !et an# they never a## new plan! to it$

10
< A mo#ification operator #e ug! incorrect plan! that the planner may ma7e" therefore we can

worry a out ug! later$ Key Difference Between Plan-Space Planning and Situation-Space Planning In Situation-Space planners all operations, all variables, and all orderings must be fixed when each operator is applied Plan-Space planners ma!e commitments "i e , what steps in what order# only as necessary $ence, Plan-Space planners do leastcommitment planning

HOW TO REPRESENT PLAN


A pl&$ i! formally #efine# a! a #ata !tructure con!i!ting of the following - component!: 1$ A !et of plan !tep! %$ A !et of !tep or#ering con!traint! ,$ A !et of varia le in#ing con!traint! -$ A !et of cau!al lin7! E:&mple9 'lan9 ST'PS:JS1:#p(ACTI&N: !tart)" S%:#p9ACTI&N: (inish" P1'C&N0: #nta,le9c)" #n9 "c)" #n9a" ) L" &10'1INGS: JS1 O S%L" .IN0INGS: JL" LIN3S: JL )

You might also like