Waltz Strips Scan

download Waltz Strips Scan

of 34

Transcript of Waltz Strips Scan

  • 8/12/2019 Waltz Strips Scan

    1/34

    In this chapter, you learn how symbolic constraint-proTtagation proce-dures car- determine the consequences of interacting constraints.

    By way of illustration, you learn about a program that interprets draw-' ings, and about another progEF.m that finds relations amotrg time iniervals'

    Once you have ffnished this chapter, you will knowthat, when a domainis well understood, it is often possibie to describe the objects in the domairin a way that u:rcovers usefirl, i:rteracting constraints. You will also lnowhow to use Man''s methodological prnciples when you work on difficultproblems.

    PROPAGATION OF LINE tABEtSTHROUGH DRAWING JUNCTIONS

    In this section, you learn about propagating symbolic labels through nets'In particular, you learn about symbolic constraint propagation i:r the con-text of understandi:rg drawings of plan+faced objects, such as those infigure 12-1. The main problem is to determine which lines are boun-ary iines that separate objects. You see that bou:rdary, convex' corlcave'shadow, and crack lines come together at junctions in oniy a few ways, andthen you see that this restriction on junction combinations determines theproper physical interpretation for each line in a drawing. Once correct lineinterpretations a.re known, it is easy to use known bogndary lines to divide

    P {+ \ R^^t^ c?,4e

    249

  • 8/12/2019 Waltz Strips Scan

    2/34

    50 Chapter 12 SymbolicConstraintsand PropagationThr

    -FiEure12.;of boundarylines. he inconcave or c

    -

    t:::.

    ;,;Figure21:',,solidillustrai:l':lineinterPre

    lines, marke

    .,concave tiniir-minuslabelti;lines,rnarke;iilabels.;ij

    E.r*12.1 Part of drawingtysis is to decide how each

    i.iir

    r:a;:ll;::ri

    .a:l:;

    e in a drawingshould beerpreted.

    the drawingintoobjects. Alongthe way,you see that some impossible

    drawingscan be a"t"ttJ,i;;;" there is nl wav to interpret allthe lines

    here AreOnlyFour Way-s to Label a Line inil;h*;'racd'vertexworldConsider a worldpopulated by crack-fteepolvhedra

    withlightingarranged

    to eliminate,It ,htd;;;'-ii"G;t in.&"iogsof this'worlJ'represen

    variousnaturallyo".,i","-Gt*o.A simplJpartitioningof these lines**iLtffi:i"',fiinto boundary \es and interiortines. Bo*ndarv

    lines occur where #;1;des tne otn"t. tu" two regionsin the

    drawingsepa.rated ty " il""a*ylinedo not ubot along the boundaryline'

    Interiorlines are 'h;;twhichthe two separated regions d'o abut ose

    another. the interioilines"'etho'" that aresociated withconcave edges

    and those that are associated withconvex edees'Fornotation"r."""""iu"ce,rineinterpretitionsareidentifiedondraw-

    "* Uo. t"Utl"'There are three such labels:

    consistentlY.

    Line Label

    Convex+ConcaveBoundary>

    r J--' hich sideYou determinethe direction of the boundary

    linelabel by noting w

    of the line .orr"rnoo""1""t"t theobject causing the boundary line'

    lmagine taking u .t'oilil#; Un9' keen-inrtbe boundary-lineobject on

    the right.The directii"*Jfuftiosii tU. ail .tionofthe oundary label'

  • 8/12/2019 Waltz Strips Scan

    3/34

    There Are Only.tr'our'Waysto Label a Linin'the Three-Faced-Veite*W'orld. ,25

    Figutt 2.2 Drawings consistof boundary lines and interiorlines. The interiorlines may beconcave or convex.

    Figure 2.3 An L-shapedsolid illustrates the three basiclne interpretations:convex

    lines, marked withplus labels;concav lnes, marked withminus labels; and boundarylines, marked wth boundarylabels.

    Combinations ofline labels surrounding junctions are called junctionlabels. Naturalconstraints severely lirnitthe n 'mber of junctionlabelsthat are physicallyrealizable.

    It is easy to label each of the lines in figure 12.3 such that all thejuactionlabels are physicallyrealizalls by using your intuition.By solabelinga drawing,you exploiiyour understanding of the physicalsituationto arrive at interpretationsfor the lines. The key ideato pursue now is thatof turningthe process around, using knowiedgeabout allowablejunctionlabels to derive an understanding of the physical reality.

    Accordingly,you need a catalog of physicallyrealizable junctions.Tokeep straight thedistinctionbebween a drawing aridthe actual physicalworld,note that junctions ia drawiags denote physical vertexes in iheworld,and lines denote physical edges.

  • 8/12/2019 Waltz Strips Scan

    4/34

    Figure 12.4 The commonjunctions.Those on the rightare excluded ifvertexes are allthree-faced verloxes and therear no shadows or cracks.

    252 Chapter L2 SymbolicConstraintsand Propagation

    Julctionscan be categorized accorrlingto the number of lines 6smingtogether and the size of the angles between the lines. Figure 12.4 assiglsmttemonicna.mes to the commoncategories.

    Fortunately the followingsimple assumptions excludeall junctionsother than Forls, Atrows,Ls, a,nd Ts:r Limitedline i::terpretations:There are no shadows or cracks.I Three faced vertexes:Allvertexes a.re the intersection of exactly three

    object faces. The verbexes at the top of the Great Pyramidsof Egrptare forbidden. Thevertexes in figure12.5 are allowed.

    Figuwithevrte)I

    Figto g

    excluconfipertLposilindicthe view

    -

  • 8/12/2019 Waltz Strips Scan

    5/34

    There Are OnlyFour'Ways to Label a Line in the Three-Faced-Vertex World 253

    Figurc12.5 Some objectswithexclusivelythree'facedvertexes.

    Figure 2.6 The criteriono general viewingposition

    excludes both otheseconigurationsbecause anyperturbationo tha viewingposition changes the junctionsindicated. On the left,you seethe ront and topof a cube,viewed withoutparspective.

    I General position: Thechoice of viewpointis such that no jgnctionschange grpe witha small change of viewpoint-The viewpointsin fig-ure 12.6 are forbidden.

    These assumptions are in force only tempora,rily;later, they willbe relaxed.The reason that these assumptions help you is that they reduce the ngmberof junctionpossibilitiesand hence the mrmber of interpretations possibiefor junction-sr:rroundinglines.

    Now,because there are fourways to label any given line-, there mustbe 42 :16 ways to label 31 l. irnil6sly,there must be 43 : 64 waysto label any pa,rticularFork,Arrow,or T. Thus, the upper bound on thenumber of junctionlabels is 208. Curiously, only18 of these combi:oationsa^re physicallyrealizable.It is not possible, 1s1 sxample, to findthe junc-

  • 8/12/2019 Waltz Strips Scan

    6/34

    2# Chapter L2 SymbolicConstraintsand Propagation

    Figurc 2.7 Some junctionlabels not found in drawingso polyhedra withthree'facedvrt6xes.

    \,/t ,rt- IT-\,/r _iz

    \ l- ,/\ 1,/_\t,'tion labels of figure12.7 in drawings of real polyhedralobjects, givea

    our

    assumptionsThenextjobistocollectthejrrnctionlabelsthatarepossible.There

    r." oJi ,x ft ls, n* to' Forics,iour forTs' and three forArrovrs'Oncei""n"i"iU.*,analyzing drawings is likeworkingea'sy jigsawpuzzles'

    There Are Only18 Ways to Labela Three-Faced Junction

    Atfrrst,itmightseemcrazytothinkthatyoucanbuildajunctioncatalogsealainingaU phyric.[y-rii,ablejunctionlabelsby lookingat every possi-blethree-facedphysicalvertexfromeverypossibledirection.Fortunately,forbiddingall but geo*r"Iviewingpositionsmakes the task manaieable,and assuming that ar"*i"g,l";tinonlytbree.faced vertexes makes thetask easY.

    Thethreefacesofanytbree.facedvertexdefinethreeintersectingplroer, and three intersecti'ngplanes dividespace intoeight octants' as

    ,i"'i" figure12.g. An object forminga vertex plainlymust occupy oueor more of the eighioctants so formed.A.geldinglyyou can make

    a com-

    oi*l"ri"o""i"logby a twestep process:consider all ways of fillingup

    '"ight'""dtr.itn o:"tmaterialfand vieweach of the resultingvertexesfromthe unfiIledoctants'Of course, if"o

    *i*ts are fllled,or ifall are filled'then there is novertex, and consequently, there i" lo t"-S^'oconsider' But suppose

    seven'

    ;it;Eh,are AUea,i,, tnu ittthalf of figure 12'9'. Evidently'the seven-octant situation*[d;;-;F"rkjunctionlabel in whicheach of the threeIines involvedbears ,-*il labei. Note that the only junctionof interestin the drawirg i. th" ;;; the center. The surroundingdrawingis onlya visualaid to understand.ing how the seven filledoctants produce

    a single

    drawingjunction.Note furtr that, because seven octants are fllled'therecanbeoulyoneo"t*t-to*whitolookatthevertex,Thejunction

    ilTI

    l.riiii.{:ii:r.i,ii,.l:iii:ii

    ::i i:ir.:l

    ,l:l Lexicallyand structurally,certain fr 'e classes iden-

    tiya finitelist ofapplication-specifcinterpreta-tions.

    > Proceduraily, demon procedures enforce compatibil-ityconstraints arnoug connected fra,mes.

    stariingwithcontractionaets, it is easy to specify a labeled draw-ing. Here is one such specification-one that happens to be limitedto theoriginalfour line iabels:

  • 8/12/2019 Waltz Strips Scan

    18/34

    266 Chapter LZ Symbolic Constraints and Propagation

    Figure 12.21Withoutshdows, there are severalways to interpret a cube: ltmay be susPended, it maY besupported bY the floo or it maYbe attached to a wall' m ffi=-L,m\

    A labeled drawing is a representationThat is a contractionnetIn nhich> Lexicall5 there are line fra'sres and junction frames' Lines

    may be cosvex' concave' or boundary lines' Junctions- y U L, Fork, T, or Arrowjunctions'

    > StructurallS junction fra'mes a're connected by line fr 'nes'-Alr;,each iction frame qsalains a list of interpretationcombinations for its connecting lines'

    > SenanticallS line frames denote physical edges' Junctiouframes denote PhYsicalvertexes'

    > Procedurally, demon procedures enforlg the constraint- il;*hction Iabel must be compatible withat leastoie of thelunction labels at each of the neighboring

    junc-

    ManyLine and Junction tabls ArcNeeded toii* Shadows and cracksSo far, by assumption, all the examples involveobjecis that

    are hanging

    ;#d; i ;; . li tout is resiing on a table' however' the bottomlines represent .oo * ag;'; thel f9 not

    represent boundaries' Ifa cube

    ;ilJ;; t*t a wall,*i r-2.21shows, other lines r:p:esent concaveedges. 'Without o aaitiooal

    clue or assumption' several interpretations

    a,re equallY Plausible'

  • 8/12/2019 Waltz Strips Scan

    19/34

    Illuminationrncreases Label count and Tightens constraint 267

    Figure 12.22 Shadows helPdetermine where an object restsaganst others.

    -

    x:ffimF-Lje \14ilNote, however, that introducngshadows resolves the a;obiguity. The

    block in inu -iaat of figure12.22 definiielyseems supported by a horizon-

    tal surface, whereas the ones to the leftand right, althoughless fa,miliar,

    seem attacled vertically.Evidently,expanding labeling iheory to includelabels for shadows should add furiherconstraint and reduce a'mbig:uity'

    Take note that the shadow labels introduced in fr'gue 12.22 indicatea direction, just as boundary labels do: shadow labels are small arrowsplaced so that they point into the shadowed region'

    Now let us recousider concave lines. Because concave lines are oftenfound where objecis come together, the concaveJabel category cal be splitiato subcatego.1 , indicating the number of objects involvedand identi-fyingwhichUlect is in front.Suppose &concave edge represents a placewheie two objects come together. Then, imagine pulting apart the twoobjects slighily.The concave edge becomes a boundary edge with ihe label

    pointing ii o*of two possible directions, as shown on the left and.in the t

    *iaat -ot eg* t2.23. The two possibilitiesare indicated by compouud,y*tot 'aJu op of the originalminus

    label and the new boundary label.t Uy cnr.nce, there are thre objects, again a compound symbol is used'refletingwhat is seen when the objects are pulled apart, as shown on the

    '*tt ffi#;',*r rwo objecrs can be treared au{ogouslr:Eachcrark is labeied witha c, together witha boundary label that indicateshow the two objects involvedfit together. withcracks between objectsallowed,you haul the possibiiities shown in figure L2.24- There a,re nonr 11ways that any particular line may be labeled'

    Itluminationtncreases Label Count and Tightens ConstraintThe illuminationon any face of an object can be classified, as shown in fig-, ,el2.25,as directlyilluminated,shadowed by another object, or-shadowed

    becarue it faces away from the light. The three possibilitiesare denoted byi, for directlyillumnaied, S foighadowed by another object, and SS forfacins * yiro- the light-ihat

    is, qelf-shadowed'Line labels can car| knowledge about these illuminationstates ia ad-

    ditionto informationaout edge type. If the illuminationstates and lineinterpretations were to combiae freely, there would be 32 : 9 illumination

  • 8/12/2019 Waltz Strips Scan

    20/34

    Chapter L2 SymbolicConstraintsand Propagation

    Figure 12.23 Concaveedges often occur where twoor three objects meet. lt isuseful to distinguish Amongthepossibilitiesby combiningtheminus label withthe ons or twoboundary labels that are seenwhen the objects are seParated.

    Figure 12.24 The elevenline interpretationsand thecorresponding labels.

    -\

    Fitnus:-l5

    ,st,, tl, ol, Vi ,, licl:: I

  • 8/12/2019 Waltz Strips Scan

    21/34

    IlluminationIncreases Label Countand Tightens Constraint 269

    Figure 12.25 llluminationinformatonotten Providesusefulconstraint.lf thereis a single lightsource, it isconvenient to recognize threesurface categories: illuminated;shadowed by interveningobjects;and selshadowed bYvirtueof acngawaYrom thelightsource.

    combinations foreach of the 11 line interpretations,gtving99 total possibilities.onlyabout 50 of these combinations,however, a,re possible. somecombinationsare forbiddenbecause they wouldrequire aa iacrediblecoin-cidence, likethe projectionof a shadow line exactly onto a concave edge.Other combinationsare excluded by definition;there cannot be, for exaln-ple, a combination in whichboth sides of a shadow line are illuminated.

    Now,let us review. Irritially,only basic lines were considered:boundary

    Iines, and interiorconcave and convex lines. Then, shadows were.added.

    Concave lines were splitup to reflectthe m:mberof objects csrningtogetherand the way those objects obscure one another.- Crac}sbetween objectswere introducedand handled analogousiy. Finally,line informationwascombinedwithillumhationinformation.Just over 50 line labelsemergefron this finalopansiel'

    These changes make the uunber of physicallyreelizable junctionslarge,both for the originalFork,Arrow,L, and T bypes, and forother verlexf,ypes allowedby relaxing the three-faced-vertexes and general positioncon-straints. 'What is gained in return for this increased number?

    First,consider how the set of physicallyrealizable junctionlabels com-pa,res to that of the unconstrained junctionlabels. The followingtablegives the results for the originalset of linelabels:

    Vertextype

    Numberof uaconstrainedpossible junctions

    Numberof physically

    realizabiejunctions

    Ratio(%)

    LForkTArrow

    37,57.86.24.7

    6543

    16646464

  • 8/12/2019 Waltz Strips Scan

    22/34

    270 Chapter t2 Symbolic Constraints and Propagation

    The percentages shown all indicate constlaint, but they do not iadicateextraordinary constrailt. 'When the line categories are expanded, howevet,all nu:nbers grow large and the coustlaint becomes incredibie. The numberof jg:rction labels in the expanded set, known as '\il'altzts set, is largeabsolutelS but the nunber is small compared wiih what ii might be:

    Vertex Approximate m:mber Approximate number Ratiotype of unconstrained of physicalty ( )

    possible junctions realizable junctions

    lli ii;:

    iti.:.j,,:r .l':l:j

    tiir

    LFork

    TArrowPsiKxMultiPeakKK

    2.5 x 1031.2 x 10s

    1.2 x 1051.2 x 1056.2 x 1066.2 x 1066.2 x 1066.2 x 1066.2 x 1063.1 x 108

    8050050070

    3001001001001030

    3.24.0 x 10-l4.0 x 10-15.6 x 10-24.8 x 10-31.6 x 10-31.6 x 10-31.6 x 10-31.6 x 10-a9.6 x 10-6

    Figue 12.4 shows what all these junction t1ryes look like. For the Kkjgnction, only about one junction label in 10 million is physically realizable.To be sure, the total number of labels has increased to a size too large to useby hand, but still the constraints are so'extreme,that. a computer Programusing the large set can converge on an untmbiguous solution.

    In this progression from small set, large fractiol to large set, smallfraction, you can observe the following powerfi:l idea at work:

    The describe-to-explain principle:> The act of detailed description may turn probabilistic reg-

    ularities into entireiy determ in istic constraints.

    The Flow of Labels Can Be Dramatic\Matching 6, film is the best way to appreciate.what can happen when'waltz's

    set, instead of the dwarfish set for the three.faced vertex world, isused to label a drawing.

    Lacking a flm, glancing at the drawing in figure 12.26 and at thetrace in table L provides some feel for how the Waltz procedure works with'Waltz's set. It would be tedious to follow the trace in detail, but someoverail points are obvious without much effort.

    In each of the 80 steps, the step number is foliowed by a letter denotingthe junction involved. The letter is followed by the old number of junction

    labels in the pile and the new number in the pile.

  • 8/12/2019 Waltz Strips Scan

    23/34

    K

    The Ftowof Labels Can Be Dramatic 271

    Figure 12'26 A drawinganalyzed successf u IIYbYWaltz's labelingProcedure.

    i: Table 1. A trace of waltz'si labeling procedure inaction.

    ::,

    ,iiliii:i:r

    LL

    L23511,

    388'

    20441

    $-+9--+

    L23 +5+3 ---+b+-+

    388 -+20+6=2-+

    1391 -+5+--)

    L23 --+l+4-+{+

    1A +12331C 20 + 261 P2AI234 7632 B t4 + 262 O3B -+ ?9334 20 263 a4B 79 + 5234 i{ -+ 7964 a.5A 764 g2 35II 79 + 16546C ---+38836[ -+I23 66L7C 388+ 7837I L23 + 267 K8B 52 + g4 38J --+59368R9A 32 + 26 39J 593+ 969R10D + 7940 K -4 7970 R

    11D 79 + 1541 K 79 + 77L Jt2 C 78 -+ 2042 J 9+ 872 K138 34 + 1443 L -"+59373 S14 A '26 + 20 M L 593 + 1274 S15E -+ 7945 K l+ 575S168 79 4 3346 J 8+ 6767t7 D 15+ 14471 2 + I77 T18F -+123 48M -+59378 T19F L23+ 2849 M593+ 479 J20 G 4 59350M l-'+ 180R21 G593+ 42 51L L2+ 322 G 42 + 1852 B 2-+ 123 F 28 -r 11 53A N+ I'24E33+764CN+125D 14 + 655N --+ 7926 F 11+ 256 N 79 I27 G 18+ I57 O -4L2328El-+158Ot23-+229 D $+ 159P -+ 7930F '+ 160P 79 -' 5

    - + 13911

    L234111

  • 8/12/2019 Waltz Strips Scan

    24/34

    :liii.r:,1::l r , rii.i,; i:. : ri-l I

    272 Chapter L2Symbolic Constraintsand Propagation

    Note that the border junctionsare visitedfust. This order exploitsthe extra constraintavailableat the border. F\rrtherinspection shows thatconvergence is rapid. Afteronly two orthree visits,most ofthe junctionshave onlyone unique junctionlabel associated withthem. la step 74, forexample, junctionS starts with1391 possibilities.The number is reducedto 5 by constraintscoming in fromone neighbor. Then, constraintsfromanother neighbor reduce the nunber to 1, leaviag but a single interpreta-tion.The ComputationRequired ls Proportionalto DrawingSizeExperiments using Waltz sset show that the workrequired to analyze adrawing grows in roughly linear proportionwiththe number of lines in thedrawing.To see why, informally,suppose that drawingscan be split intoareas of more or less fixedsize in terms of the liaes and junctionscontainedil.each area. If the areas are such that constraintdoes not flowacrosstheir froutiers,then the total time required to analyze a drawhg is lineariyproportionalto the number of a,reas, and hence is Iinearlyproportionaltothe mrmber of junctions.

    Flow-impedingfrontiers exist because the T junctions,coTnrnon at ob-ject boundaries, have littleabilityto transmitconstraint:Anobscuringbouadary can lie in frontof any kindof edge.

    PROPAGATIONOFTIME.INTERVAL.RELATIONSi

    in this section, you learn about anothgl s)camFl of symbolicconstraintpropagation; this one involves time intervalsand the relationsa,mong timeintervals.The general idea is to use existinghormationabout the rela-tions nmong time intervals to reach conclusionsbout other relations.Fors;semple, if iaterv-al A is before interv alB, and intenal B is before interv alC, then pla.inlyinterv-alAhas to be before C.

    Time relationsare easier to understand visually,especially as theybecome more complicated.As shown in the upper part of figureL2.27, timeintervalsca,n be depicted as objects resting ona time iine. Alternatively,as shown in the lowerpart of figureL2.27,a pd,ir of time intervalsand therelationthat iies between them can be depicted as twonodes, aad a labeled ,

    link.There Are 3 Ways to Label a LinkbetreenlntervalNodes Yielding169 ConstraintsAssuming that no interv alis allowedto start and stop at the same time,ihen the interval before, rclaton is just one of 13 possible relations betweentwo intervals: seven of whichare shown in figure 12.28. The other six aremembers of symmetricpairs. One such symmetricpair is the belore pair,because intervalA may be before interra.lB or i:rterrralB may be beforeintervalA.

  • 8/12/2019 Waltz Strips Scan

    25/34

    BackwardChainingCan Reduce Effort 327

    Figurc15.2 A simple, butbad approach to Plannng. Youtry every possible operatorsequnc, usng breadth'irstsearch. The heavy line marks aplan that reaches the goal.

    -

    /Nv:rS oiDc ->\ orOE-.,*o?%of.;On9.8.._'-.-y'V{'{{

    7l

    OnADonBTsur OnBA

    Or CA

    PV{{

    just fourmoves, but ifyou were to scatter, qay, eight irrelerranttwo'blockio* r.on the table, then there wouldbe 100 alternatives for the firstmovealoue.

    Plainly,you need to be smarter about how to conduct a search for asuitable operator sequence.

    Backward ChainingCan Reduce Effousually, the goal is described by onlya few asserbions that must holdfor a problertobe solved, whereas any firlldescriptionof a situation h-volvesma,ny more a.ssertions. Accordingly,you maywa,:rt to chain backwardthrough operators, ratber than forward.To badrs'ard chain, you look for

    ao operattthat, when instantiated, has a.n addpattern thatmatches your

    goal. Then, if that operator's prerequisites a.re not satisfied, you backwa.rdiUaintlrougUother operators untilyou reach a.ssertions that describe theinitialstate of the world.

    For exa,mple, consider that part of the example problem that requiresblockAto be on blockB. For the mometrt, forget about gettingblock Bon blockC.

    At the top of figure15.3, you see the initialstate on the left, thesingle goal , . ttiooon the right,and an attempt to start bridgiagthe

    F. H. ^n ^l-^ d,.zlr

  • 8/12/2019 Waltz Strips Scan

    26/34

    328 Chapter 15 Planning

    gap between the two by movingblockA fromblockc to blockB. Mores=pecifically,an Establishes linkextends fromthe oN(A,B) assertion in the

    dtirtof the instantiated movement operator to the oN(A,B)assertion

    in the goal descriPtion.Movingbiock A ftomblockc to blockB is not the onlychoice, of

    cogrse; it is just one of ihree possibities,because blockA could,in princi-ple, come frmblo&D or the table. Ifmovingit to its goal position fromto t C does not workout, those other possibilitiescould be checked bybreadth-firstsearch'

    Given that movingblockA fromblockc to blockB is the choice tobe considered, two prerequisites have to be satisfied:both block A andblockB must be clear. one way to clear blockB is to move blockD to thetable. As shown ia the middleof figUre15.3, this move links together twoiastantiated gperators; an Establishe5linkjoins the cr,ren(B)assertion iuthe add listof operator 2's instantiationto the cLeee(B) prerequisite inoperator l's instantiation.

    Again,satisfying the clrea(B)prerequisite using an instantiated operator that moves blockD to the table is just one of many choices. Inprinciple,any other block could be in the way'

    Note that the Esiablishes lists m'sans that the operator that establishesan assertion must appear in the finalplan before the operator that needsthe assertion. The establisher does not need to appear rightbefore theestablishee, however. There may be other operators in between, as long as

    none of those interposedoperators add or delete the established assertion.once btock B is clear, no other operator is needed, for the flpeining

    prerequisites of both operators are satisfiedin the iniiialsituation, as shownat the bottomof figure15.3. once again, this way of dealing withthoseprerequisites is not ihe only one.it is the direct way, and it is a reasonableway rmder the circumsta;nces, but in principle,you could, for example,uslessly stali by mwingblockD on and offblockB many tjmes to createa louger bridge betwe o thu initialstate and the movement of blockA toblockB.

    Alternativechoices have been mentioned frequentlyin this discttssion16 smphasize that sear& is involved.'ffhatyou see in figure15.3 is justone path through a search tree.

    In general, a pariialpath may involvechoices that cannot possiblyIead to a workableplan bcause of devastating operator interactions'Tosee why, consid.er the firllexa,mple, witha goal involvingtwo assertions'oN(A,;*a oN(B,C),rather than onlyoN(A,B)'Ifvou temporarilyignred ihu ,..oo of the goal assertions, you could certaniy nake thecoices that previouslyled to the placement of blockA on blockB, leadingto the partiJ plan shown at the top of figure15'4'

    wiihthe problem of movingA onto B solved, you could then attemptto euable the movement of B onto c by movingB fromthe table onto c.

  • 8/12/2019 Waltz Strips Scan

    27/34

    Backward ChainingCarr Reduce Effort

    Figur? 53 Thr eeps

    toward constructinga plan for achieving a simplo goal using baclcwardchaining. Alllinksshown are Establishes links.Most of them tie an additionin one instantaled operator to a preequisite inanother instantiated operator, thus creating an ordering constraint between the two operators. Other Establisheslinks are connected to initial'situationassertions or goal assertions.

    I on(A,c) II Cl6a() |i onto,tr II claD) II on, , r o, l II ontr, rro' t I

    I on(A,c) II crar(A)II on(D, B) II crea,to) |I o t., t o' r II on(B, rabla) |

    Oparator 1

    lf on(4, clClea(A)Clea(B)

    Add On(A, B)Clea(C)

    Dlsteon(A,c)Clear(B)

    OpErato 2

    l on(D, B)Clea(D)

    Add On(D , Table)Claar(B)

    Dlele On(D,B)

    Opsator1

    l On(A,c)Clear(A)

    Add On(A,B)Clea(c)

    Dlet on(A,c)Clear(B)

    lnltialsituation

    On(4, C) -ClEa(A)_on(D,B)-Cla(D) -On(C, Table)

    On(8, Table)

    OpBrato 2

    { on(D,B)----> Clsar(D)Add On(D , Table)

    Cloa(B)-Dalste On(D, Bl

    Opoator I

    -l--->on(4, c)-----) Clear(A)---- CIear(B)Add On(A,B)

    Clea(C)

    Dolsreon(4, c)Clee(B)

    Goals

    -> on(4, B)

  • 8/12/2019 Waltz Strips Scan

    28/34

    Chapter 15 Planning

    Figure5.4Constructionofaplanforachievingtwogoalassertions,.are Establishes links.The top portion deals withmovng blockAonto blockBihe bottom portionoos an operationintendd to move bockB onto blockC. he plan is lawed because operator 1 interferes witnan ElbffiJi;[between operator 2 and operator 3.

    dd On D , Tabls)Cl6ar B)

    Dlete On D, B)

    On 4, C)

    Clea A)Clea B)

    Add On A, B)Cla C)

    Dlot6 0n A, c)ClEa B)

    Add On D , Tabt)Clea B)

    Dlete On D, B)

    on A, c)Clear A)

    Clea B)Add on A, Bl

    Cla C)Dlleon A, c)

    Clear B)

    -

    on 8, Tabta)Clea B)Claa C)

    Add On B, C)Delt On 9, TablE)

    Clea C)

  • 8/12/2019 Waltz Strips Scan

    29/34

    Impossible Plans Can Be Detected 331

    Then, to satisfy the prerequisites required to move block B fromthe

    table onto block C, y i;;i; be sure that both blocksa're clea'r' Atfirstglance, lookingonfy at the diagra'mand forgetting

    about real blocks'

    you might thinkyou coutd satisfy tese prerequisitesby takingad'rantage

    of ihe initialsituationand the additions to it nade by other operators'using Establishes linksestablish order, you might

    thinkyou could move

    blockD onto the t*t; - t-Uf9 5'lt o1o blockB' and finallvmoveblockB onto blockC' ;; bad for first-glance-looks:Movingblock

    A

    ur' tBinterfereswithmovingbtockBanywhere.Thus, you are faced witha major problem'Asyou try to add an

    assertion demaaded o;;i ;;t;;tttt oioo oPerator' vou maywithdrawan assertion that you' JJa pt*f99tqto satisfy a goal or

    to esiablisha

    prerequisite ro, *otn ilf;;#;' .9l Jtt:voootld a method fordetecting

    such interference as ;J; possible' so that you can terminate uselessp*titfPlens withoutfurtherwork'lmpossiblePlans Can Be DetectedForiunately,it is easy to ideuiifypoJentialproblems in

    the plan itself'with-

    out appealing to vour;;;# rli*r' 'v u simplvmoniloleach Establishes link,eckingf ;r;fir ih t coutd invalidatethe link'

    'whenvou

    findsuch a iink-invatia iingoperator'-youimPose an additional ordering

    constraint that preveiis thJ oierator fromdoingany d -age'

    In the bottomof figure15'4' for exa'mple' tf,ereisan Establishes link

    between operator t ;3;;or 3' because operator 2 add-s' cLEAR(B)and operator 3 needs ootgl' Operator t dletes ctEAR(B)'however'and ifoperatot r t * ilo* iioo *afber operator 2 and before

    oPera-

    tor B, then operator i * JJ f rftdatethe Esiablishes link'Accordingly'

    -i t i iato be a threat to the linlc'

    fs seafain , * ii J i',-yoo* a onllto introducean additionalor-deringconstrai-nt:1,iu tl' ttoingoperator must appear

    before the estab

    Iisher or after the 'i UtitU '* -tv oot ueg utb;T:i:Y' In the

    exam.ple, this constraintmeilIsthat operatoi 1 mustappear in the plan

    i* idfot operator2 or after operator 3'

    Unfortunately,;;fth;;.noi. iorks, as shown by figure-15'5'in which

    impliedBeforeu*' t*il;4bl u ;orderingnet' As 'h;;; 'u r rt

    portiouof the figure'operator 1 ca'u-

    not appear befored;;;;';; *'; tne nstablisues linkfron operator2

    to operator r has dreJy' JlUu u athat operator2 appea'rs before oper-

    ator 1. Similarly,'-t#; h ihe rightpoiiooof the figure'-operator3

    canaot appeax Utgo*p tor1' bL1'r5e an Establisheslinkfromopera'

    tor 1 to operator s n*'JJv establistredthat operato: 1 appea'rsbefore

    operator B, The i;*$; conciusion-isthat-the oices made so far

    ca.uot lead to a workable Plan'The possibility;il;;i; ce is not the certainty of interference,

    how-

    ever' Consid , Ogu' 15'6' In the top portion'yousee the initialstate on

  • 8/12/2019 Waltz Strips Scan

    30/34

    332 Chapter 15 Planning

    Figure 5.5 You canprotect a threatenedEstablishes linkbyinstallingan additionalBeore link.Here,however, operator 1cannot appear beoreoperator 2, as n theleftportion,or ateropeator 3, as in therightportion,withoutcreating a Before loop.

    the left,the goal assertions on the right.This time,the choice is to moveblock

    A fromthe table

    to blockB;instead

    of'fromits initialrestingplace

    on block C.In the bottom portion,you see how theprerequisites ofthe operator that noves blockA fromthe table can be satisfiedby the assertionsin the initialstate augmented by assertions placed by one instantiationofoperator 2 that moves blockA fromblockC to the table, and by anotherinstantiation ofoperator 2 that moves blockD from blockB to the table.At this point, there are no threats.

    Althoughthere are no threats, there is a questionofhow to get block Bonto block C.One choice is to instantiate operator 3 again, as shown in thetop portionof figure15.7, thereby movingblockB from thetable, where itlies initially.Followingthat choice, you need only to decide how to satisfythe prerequisitesthat require blockB to be on the table and both blockBand block Cto have clea,r tops. One set of oices is shown in the bottomportion of figureL5.7.

    Note, however, that there is, once again, a threat to whichyou must at-tend. Operator 3a, the firstof the two instantiationsof operator 3, deletesthe cr,nan(B) a.ssertion that operator 2a adds and that operator 3b needs.Thus, operator 3a threatens the Establishes linkbetween operator 2a and,operator 3b. Evidently,operator 3a must be placed before operator 2aor afleroperator gf. plainlRoperator 3a cannot be placed before opera-tor 2a, because operator 2a establishes one of operator 3a's prerequisites.

    Operator 2

    l On{D,B)Clar(D)

    dd On(D , Tabl)Cla(B)

    0eletB on(D, B)

    BEore

    +Eetora

    Opator 1

    l On(A,C)Clea(A)ClBa(B)

    dd on(A, B)Cla(c)

    Delote On(A,C)Clar(B)

    Opsato 2

    l On(D,B)Cle(D)

    Add On(D , Table)Cla(B)

    Delete on(D, B)---->

    Beore

    Oporator 1

    l On(^, C)Cla()Clea(B)

    Add on(A,B)Clea(C)

    Oslato On(4, C)Claa(B)

    tAore

    +: Beos

    Opsrator 3

    ll On(B, TablelCloa(B)Clea(C)

    Add On(B,C)Dalot6 On(8, Tabl6)

    Clea(C)

    g tor. I

    +Operator 3l On(B, Table)

    Clr(B)

    Clsa(C)

    Add On(S, c)Doleto 0n(8, Tabla)

    Cla(C)

  • 8/12/2019 Waltz Strips Scan

    31/34

    Impossible Plans Can Be Detected

    Opralo3

    l On(A,TablslClea(A)Clea(B)

    Add On(A,B)Delete On(4, Table)

    Clea(B)

    0n(A,Tabl)

    Clea(A)

    Clea(B)

    Add on(A' B)Dolto On(A' Tabl)

    Clear(B)

    Add On(D, Table)Cleat(B)

    Dlat6on(D, B)

    AddOn(4,

    Cla(C)

    oelta on(A, c)

    n of operator 3; in the bottom, two instantia-

    tions oopratorz are ad'ded to d l*ithoP@

  • 8/12/2019 Waltz Strips Scan

    32/34

    i:,::.i:r-:1.l:r:l;: r':

    r..li't'334 Chapter 15 Planning

    0p6ato 3a

    on(A, Table)

    Cla(A)

    Clsa(B)Add On{A' B}OlEtsOn(A. Table)

    CIa(B)

    Opsalo3b

    ll Of,(B,Table)Clear(B)Claa(C)

    Add On(B, C)DaliaOn(B, Tabl)

    Clear(C)

    On{A,Tabla)

    Clea(A)

    Cla(B)

    Add on(A.B)OelloOn(A, Tabl)

    Clar(g) -

    On(8, Tabla)

    Clsa(8)Cloa(C)

    Add on(8, c)DltsOn(8, Table)

    Cleer(c)

    iont'Tilloppor.tion shows how workmight

    start on the problem o settins blockB onto bloctt"c'il::TTJ:i:::t"J::t::,i'::::flilti::H:?t::;ii.,ffilqr'ffi:::::i: "ilntiationor operaror i. e"."u'"or ths addirion, operator 3athreatens the Establish",iint'ntt "*

  • 8/12/2019 Waltz Strips Scan

    33/34

    li::,"tjti:.t...'i:l'r':'.j,.::.

    :+t

    ifij ;

    +'t,:::

    ::r; l;l'i.:i::::,: '

    Impossible Plans Can Be Detected 335

    Operator 3a

    lf On(A,Table)Clea(A)

    Clear(B)

    Add On(A,B)Delete on(A,Table)

    Clea(B)

    Operator 2a

    lf On(D,B)Clear(D)

    Add On(D,Table)Clear(B)

    Delete On(D,B)

    A Beore

    Operator2b

    lf On(A,C)Clear(A)

    Add On(A,Table)Clear(C)

    Delete On(A,C)

    Before+

    Operator3b

    l On(B,Table)Clea(B)

    Clea(C)Add On(B,C)Delete on(B, Table)

    Clea(C)

    Plan 2

    Figure 5.8 You can Protectthe threatened Establisheslinkshown in figure 15.7 bYinstallingan additionalBeforelnk.Here, a new Beforelinklorcingoperator 3b to occurbefore oPerator 3a Preventstrouble.

    FortunatelS as shown in figure15.8, operator 3a can be after opelatol3bwithoutcrating any impossiblechain of Before iinks'

    The plan .o*in tUe bottom of figure15.8 is called a completeplan because all goal assertions a.re asserted, all operator prerequisites arelatisfied,and the impliedBefore linksformno loops. Apartialplan isany other plan in whichthe impiiedBefore links formno loops.' Note tlat a complete phn oes not completelyspecify* -"1"iorder-i"goe ,t"pr. Block .ro be moved to the table before blockD, or viceversa, whichever You like:

    Plan 1MoveA to the tableMoveD to the tableMoveB to CMoveA to B

    MoveD to the tableMoveA to the tableMoveB to CMoveA to B

  • 8/12/2019 Waltz Strips Scan

    34/34