80 likes | 96 Views
Agent Communications BDI Definitions. CPSC 601.68/CPSC 599.68 Rob Kremer Department of Computer Science University of Calgary. Based on: Michael Wooldridge. Reasoning about Rational Agents. MIT Press, Cambridge, Mass. 2000. Chapter 2. Plan. BDI Agent. A simple BDI agent.
E N D
Agent CommunicationsBDI Definitions CPSC 601.68/CPSC 599.68 Rob Kremer Department of Computer Science University of Calgary Based on:Michael Wooldridge. Reasoning about Rational Agents. MIT Press, Cambridge, Mass. 2000. Chapter 2.
Plan CPSC 609.68/599.68: Agent Communications
BDI Agent CPSC 609.68/599.68: Agent Communications
A simple BDI agent B := B0; I := I0; /* B0 are initial beliefs; I0 are initial intentions */ while true do { p := getNextPercept(); B := brf(B,p); D := options(B,I); I := filter(B,D,I); := plan(B,I); execute() } Stuck to a plan:If the plan fails (becomes unsound) then the agent really should change the plan. CPSC 609.68/599.68: Agent Communications
BDI Agent that reacts if plan is unsound B := B0; I := I0; /* B0 are initial beliefs; I0 are initial intentions */ while true do { p := getNextPercept(); B := brf(B,p); D := options(B,I); I := filter(B,D,I); := plan(B,I); while not empty() do { a := hd(); execute(a); := tail(); p := getNextPercept(); B := brf(B,p); if not sound(,I,B) then := plan(B,I); } } Deals with unsound plans, but won’t drop intentions:What if we have unexpected early success or conditions arise that make our intentions useless or unobtainable? We might want to change our intentions. CPSC 609.68/599.68: Agent Communications
BDI Agent that may drop intentions B := B0; I := I0; /* B0 are initial beliefs; I0 are initial intentions */ while true do { p := getNextPercept(); B := brf(B,p); D := options(B,I); I := filter(B,D,I); := plan(B,I); while not (empty() or suceeded(I,B) or impossible(I,B)) do { a := hd(); execute(a); := tail(); p := getNextPercept(); B := brf(B,p); if not sound(,I,B) then := plan(B,I); } } But if the environment changes, we may need to reconsider intensions. CPSC 609.68/599.68: Agent Communications
Cautious Agent that reconsiders after each action B := B0; I := I0; /* B0 are initial beliefs; I0 are initial intentions */ while true do { p := getNextIntention(); B := brf(B,p); D := options(B,I); I := filter(B,D,I); := plan(B,I); while not (empty() or suceeded(I,B) or impossible(I,B)) do { a := hd(); execute(a); := tail(); p := getNextPercept(); B := brf(B,p); D := options(B,I); I := filter(B,D,I); if not sound(,I,B) then := plan(B,I); } } But this agent might spend almost all of it’s time considering intensions and no time actually doing useful stuff. CPSC 609.68/599.68: Agent Communications
BDI Agent that attempts to strike a balance B := B0; I := I0; /* B0 are initial beliefs; I0 are initial intentions */ while true do { p := getNextPercept(); B := brf(B,p); D := options(B,I); I := filter(B,D,I); := plan(B,I); while not (empty() or suceeded(I,B) or impossible(I,B)) do { a := hd(); execute(a); := tail(); p := getNextPercept(); B := brf(B,p); if reconsider(I,B) then { D := options(B,I); I := filter(B,D,I); } if not sound(,I,B) then := plan(B,I); } } This is only useful if reconsider() is a lot cheaper than options() and filter(). CPSC 609.68/599.68: Agent Communications