Mas Simon Lynch [email protected]. intro the basics agent types small scale (eg: NetLogo) generic...

24
mas Simon Lynch [email protected]

Transcript of Mas Simon Lynch [email protected]. intro the basics agent types small scale (eg: NetLogo) generic...

Page 1: Mas Simon Lynch s.c.lynch@tees.ac.uk. intro the basics agent types small scale (eg: NetLogo) generic (eg: Jade, Boris…) BDI (2APL, Jason, Goal…) (BOID,

mas

Simon Lynch [email protected]

Page 2: Mas Simon Lynch s.c.lynch@tees.ac.uk. intro the basics agent types small scale (eg: NetLogo) generic (eg: Jade, Boris…) BDI (2APL, Jason, Goal…) (BOID,

intro

the basicsagent types• small scale (eg: NetLogo)• generic (eg: Jade, Boris…)• BDI (2APL, Jason, Goal…)• (BOID, BOID+N, ??)

Page 3: Mas Simon Lynch s.c.lynch@tees.ac.uk. intro the basics agent types small scale (eg: NetLogo) generic (eg: Jade, Boris…) BDI (2APL, Jason, Goal…) (BOID,

small scale agents

theoretical basisuses & limitationscommunicationdeliberation

Page 4: Mas Simon Lynch s.c.lynch@tees.ac.uk. intro the basics agent types small scale (eg: NetLogo) generic (eg: Jade, Boris…) BDI (2APL, Jason, Goal…) (BOID,

small scale agents – examples 1

moths• environmental• reactive• non-communicative

vants• environmental• non-communicative• complex / emergence• some agent-agent interaction

Page 5: Mas Simon Lynch s.c.lynch@tees.ac.uk. intro the basics agent types small scale (eg: NetLogo) generic (eg: Jade, Boris…) BDI (2APL, Jason, Goal…) (BOID,

small scale agents – examples 2

fox & hounds• reactive• interactive• non-communicative

Page 6: Mas Simon Lynch s.c.lynch@tees.ac.uk. intro the basics agent types small scale (eg: NetLogo) generic (eg: Jade, Boris…) BDI (2APL, Jason, Goal…) (BOID,

small scale agents – examples 3

ant packs• simple comms (phone a

friend)• some deliberation• social / independent?• lone –> group –> swarm

Page 7: Mas Simon Lynch s.c.lynch@tees.ac.uk. intro the basics agent types small scale (eg: NetLogo) generic (eg: Jade, Boris…) BDI (2APL, Jason, Goal…) (BOID,

small scale agents – examples 4

path building• simple comms (broadcast)• more deliberation• social / collaborative?

mine clearance• simple comms (phone a

cleaner)• deliberative• collaborative

Page 8: Mas Simon Lynch s.c.lynch@tees.ac.uk. intro the basics agent types small scale (eg: NetLogo) generic (eg: Jade, Boris…) BDI (2APL, Jason, Goal…) (BOID,

generic agents

eg...• Jade• Boris

...see Boris intro

uses...middleware, systems architectures,

resource allocation, brokering,mixed-metaphor agency, etc, etc

Page 9: Mas Simon Lynch s.c.lynch@tees.ac.uk. intro the basics agent types small scale (eg: NetLogo) generic (eg: Jade, Boris…) BDI (2APL, Jason, Goal…) (BOID,

BDI agents

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)

Page 10: Mas Simon Lynch s.c.lynch@tees.ac.uk. intro the basics agent types small scale (eg: NetLogo) generic (eg: Jade, Boris…) BDI (2APL, Jason, Goal…) (BOID,

BDI agents

beliefs vs facts

desires–> goals–> plans

plans–> intentions–> goals

agent

beliefsrules

run time

goal stack

Page 11: Mas Simon Lynch s.c.lynch@tees.ac.uk. intro the basics agent types small scale (eg: NetLogo) generic (eg: Jade, Boris…) BDI (2APL, Jason, Goal…) (BOID,

2APL: bomb disposal with Harry & Sally

Page 12: Mas Simon Lynch s.c.lynch@tees.ac.uk. intro the basics agent types small scale (eg: NetLogo) generic (eg: Jade, Boris…) BDI (2APL, Jason, Goal…) (BOID,

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 )

Page 13: Mas Simon Lynch s.c.lynch@tees.ac.uk. intro the basics agent types small scale (eg: NetLogo) generic (eg: Jade, Boris…) BDI (2APL, Jason, Goal…) (BOID,

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)}

Page 14: Mas Simon Lynch s.c.lynch@tees.ac.uk. intro the basics agent types small scale (eg: NetLogo) generic (eg: Jade, Boris…) BDI (2APL, Jason, Goal…) (BOID,

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()

}

Page 15: Mas Simon Lynch s.c.lynch@tees.ac.uk. intro the basics agent types small scale (eg: NetLogo) generic (eg: Jade, Boris…) BDI (2APL, Jason, Goal…) (BOID,

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)

}

}

Page 16: Mas Simon Lynch s.c.lynch@tees.ac.uk. intro the basics agent types small scale (eg: NetLogo) generic (eg: Jade, Boris…) BDI (2APL, Jason, Goal…) (BOID,

BDI implementation

beliefs (query, add, del)

goals (peek, push, pop, del)

rules (plan library)

message handling

deliberation cycles

agent

beliefsrules

run time

goal stack

Page 17: Mas Simon Lynch s.c.lynch@tees.ac.uk. intro the basics agent types small scale (eg: NetLogo) generic (eg: Jade, Boris…) BDI (2APL, Jason, Goal…) (BOID,

designing BDI rules

the rubbish eater example (or forager or… or… or…)

Rules… world-already-cleanstanding-next-to-rubbishrubbish-somewhere

slots… name, descriptor, type (action or plan)what it achieveswhen it can be used

modifications (add & del) to beliefs & goals

Page 18: Mas Simon Lynch s.c.lynch@tees.ac.uk. intro the basics agent types small scale (eg: NetLogo) generic (eg: Jade, Boris…) BDI (2APL, Jason, Goal…) (BOID,

designing BDI rules #1

the rubbish picker example (or forager or… or… or…)

Rule world-already-clean:

desc (world is clean)

achieves (clean world)

when (not (rubbish ?x ?y))

type action

del-goal (clean world)

Page 19: Mas Simon Lynch s.c.lynch@tees.ac.uk. intro the basics agent types small scale (eg: NetLogo) generic (eg: Jade, Boris…) BDI (2APL, Jason, Goal…) (BOID,

designing BDI rules #2

Rule standing-next-to-rubbish:

desc (eat rubbish at ?x ?y)

achieves (clean world)

when (rubbish ?x ?y)

(eater-at ?x ?y)

type action

del (rubbish ?x ?y)

Page 20: Mas Simon Lynch s.c.lynch@tees.ac.uk. intro the basics agent types small scale (eg: NetLogo) generic (eg: Jade, Boris…) BDI (2APL, Jason, Goal…) (BOID,

designing BDI rules #3

Rule rubbish-somewhere:

desc (walk to rubbish at ?x ?y)

achieves (clean world)

when (rubbish ?x ?y)

(not (eater-at ?x ?y))

type plan

post-goal (goto ?x ?y)

Page 21: Mas Simon Lynch s.c.lynch@tees.ac.uk. intro the basics agent types small scale (eg: NetLogo) generic (eg: Jade, Boris…) BDI (2APL, Jason, Goal…) (BOID,

designing BDI rules #4

other considerations (some of these are inter-dependent)…

• how to handle rules to respond to incoming messages?

• how to interact with an environment (eg: assume environment is NetLogo)

• how to write the deliberation cycle

• how to connect through to a messaging infrastructure layer (assume Boris)

• sketch & explanation of complete system (“beer-mat” version)

Page 22: Mas Simon Lynch s.c.lynch@tees.ac.uk. intro the basics agent types small scale (eg: NetLogo) generic (eg: Jade, Boris…) BDI (2APL, Jason, Goal…) (BOID,

BDI variations

BOID = BDI + Obligations

Norms - normative, legal behavior

obligations vs desires –> selfishness & altruism

strengths of legislations

Page 23: Mas Simon Lynch s.c.lynch@tees.ac.uk. intro the basics agent types small scale (eg: NetLogo) generic (eg: Jade, Boris…) BDI (2APL, Jason, Goal…) (BOID,

other issues

• meta-agents

• message types

• sessions & dialog

• social issues

• trust & reputation

• white & yellow pages

• brokering

Page 24: Mas Simon Lynch s.c.lynch@tees.ac.uk. intro the basics agent types small scale (eg: NetLogo) generic (eg: Jade, Boris…) BDI (2APL, Jason, Goal…) (BOID,

other issues

• types of agency – advantages/disadvantages

• examples

• cleudo

• (air) traffic control

• cloud delegation