Upload
aubrey-simmons
View
215
Download
2
Embed Size (px)
Citation preview
2APL
Simon Lynch [email protected]
NB: examples & code taken from 2APL user guide & tutorial (Dastani 2007)
2APL is BDI
BDI = Beliefs, Desires, Intentions- what??
erm... informational, motivational& deliberative states -what??
ok... assumed info about the world (B)main objectives (D)plan of things to achieve (I)
eg: bomb disposal with Harry & Sally
harry
example initial belief base of harry...
Beliefs:
bomb(3,4).
clean(blockWorld) :- not bomb(X,Y), not carry(bomb).
example goal base...
Goals :
clean( blockWorld )
harry...
example belief updates...
BeliefUpdates:
{bomb(X,Y)} RemoveBomb(X,Y) {not bomb(X,Y)}
{true} AddBomb(X,Y) {bomb(X,Y)}
{carry(bomb)} Drop() {not carry(bomb)}
{not carry(bomb)} PickUp() {carry(bomb)}
harry...
example of planning goal rules
PG-rules :
clean(blockWorld) <- bomb(X,Y) |
{ goto(X,Y);
@blockworld( pickup(), L1 );
PickUp();
RemoveBomb(X,Y);
goto(0,0);
@blockworld( drop(), L2 );
Drop()
}
harry...
example of procedural rules of harry...
PC-RULES :
message(sally, inform, bombAt(X,Y)) <- true |
{ if (not bomb(A,B) ) then
{ AddBomb(X,Y);
adoptz( clean(blockWorld) )
}
else
{ AddBomb(X,Y)
}
}