excersizes 11 Andreas van Cranenburgh 0440949, Niels Out 0435899 2. Bij de empty-delete-list heuristiek worden alle negatieve effecten (met NIET teken) van acties genegeerd, zo wordt een relaxed problem gemaakt. 3. m=married, sbm=sexbeforemarriage, s=sinner @x m(x) & sbm(x) <-> s(x) CNV: @x (s(x) -> m(x) & sbm(x)) & (m(x) & sbm(x) -> s(x)) @x (!s(x) | m(x) & sbm(x)) & (!m(x) | !sbm(x) | s(x)) !s(x) | m(x) & !s(x) | sbm(x) & !m(x) | !sbm(x) | s(x) conc. @y !m(y) -> !s(y) CNV: m(y) | !s(y) negated conc: !m(y) & s(y) {!s(x), m(x)} {!s(x), sbm(x)} {!m(x), !sbm(x), s(x)} {!m(y)} {s{y} \ / / \ met theta=UNIFY(x/y) / / \____________ {!s(x)} _______________/ / \ / \ / {} met theta=UNIFY(x/y) 4. {a,b} {a,!b} {!a,b} {!a,!b} | / / / {a} / / | \ / / | {b} / | \ / | {-a} | / | / [] 5. Action(Move2blocks(b,c,x,y), precond: On(b,x) ^ On(c,b) ^ Clear(c) ^ Clear(y) ^ Block(b) ^ Block(c) ^ (b != c) ^ (b != x) ^ (b != y) ^ (c != x) ^ (c != y) ^ (x != y), effect: On(b,y) ^ On(c,b) ^ clear(x) ^-On(b,x) ^-Clear(y)) 16. n*m boven 2 (dus combinatie van n*m en 2). Er zijn in totaal n*m combinaties, maar hier moeten de onmogelijke combinaties vanaf, want het moet in de goede volgorde staan. Dus we nemen dit getal boven 2, het aantal strings. 17. n0*n1*...*nm-1 boven m motivatie: idem als 16, maar hier is het aantal strings m ipv 2. 22a. bicycle, donkey, petshop, waterlooplein, home b. INIT(at(home), sells(bicycle, waterlooplein), sells(donkey, petshop)) GOAL(have(donkey), have(bicycle), at(home)) ACTION(go(x), EFFECT: at(x)) ACTION(buy(p, x), PRECOND: at(x), sells(p, x) EFFECT: have(p)) c. at(home) [ start ] [ go(w.plein) ] [ go(petshop) ] | | | at(w.plein) | at(petshop) | | v v [ buy(bicycle, w.plein) ] [ buy(donkey, petshop) ] at(home),have(bicycle),have(donkey) [ finish ] d. there are 2 optimal solutions, either buying the bicycle first or buying the donkey first. See f for the rest... e. No, this will create a conflict with the actions that require one not to be At(Home). The algorithm would fail since the conditions are impossible to satisfy. f. One can go to the shop and go back home without buying anything N times, and then buy the things. N is a natural number. Since there are infinitely natural numbers there are also infinitely many solutions.