LEVELS OF ABSTRACTIONS IN DESIGNING & PROGRAMMING SYSTEMS OF COGNITIVE AGENTS A. Ricci DISI, University of Bologna
OBJECTIVE
OBJECTIVE • Some glances about Agent-Oriented Programming and Multi- Agent Oriented Programming - examples using JaCaMo framework/technology
OBJECTIVE • Some glances about Agent-Oriented Programming and Multi- Agent Oriented Programming - examples using JaCaMo framework/technology • Main viewpoint - Level of abstraction, from design to runtime through programming
OBJECTIVE • Some glances about Agent-Oriented Programming and Multi- Agent Oriented Programming - examples using JaCaMo framework/technology • Main viewpoint - Level of abstraction, from design to runtime through programming • Some points for the discussion - AOP and (M)AOP for the web/hypermedia?
AGENT-ORIENTED PROGRAMMING • AI view - modeling/designing/programming autonomous systems, referred as agents • SE view - using agents as first-class modeling/designing/programming abstraction
AGENT ABSTRACTION
AGENT ABSTRACTION sensors feedback percepts PERCEPTION ENVIRONMENT DECISION a action to do c t i o n s ACTION effectors / actuators
AGENT ABSTRACTION sensors feedback percepts PERCEPTION • task/goal-oriented ENVIRONMENT • pro-active + reactive DECISION a • decision making action to do c t i o n s ACTION effectors / actuators
PARADIGMS & METAPHORS machines imperative => math functional => OOP => world of objects agents =>
PARADIGMS & METAPHORS machines imperative => math functional => OOP => world of objects world of humans agents =>
ACTIONS & PERCEPTS ENVIRONMENT ACTIONS OBSERVABLE STATE AGENT PERCEPTS
ACTIONS & PERCEPTS • control uncoupling ENVIRONMENT - action execution model is ACTIONS asynchronous ‣ success/failure events OBSERVABLE STATE - percepts as obs state events AGENT PERCEPTS
ACTIONS & PERCEPTS • control uncoupling ENVIRONMENT - action execution model is ACTIONS asynchronous ‣ success/failure events OBSERVABLE STATE - percepts as obs state events AGENT • vs. other models - vs. method/proc calls PERCEPTS - vs. async msg (actor) passing
AGENT COMMUNICATION AGENTS ENVIRONMENT ACTIONS OBSERVABLE STATE SPEECH ACTS PERCEPTS
AGENT COMMUNICATION AGENTS • Agent Communication ENVIRONMENT Languages ACTIONS - “speech acts” - ~asynchronous message OBSERVABLE STATE passing + action SPEECH ACTS semantics PERCEPTS
AGENT COMMUNICATION AGENTS • Agent Communication ENVIRONMENT Languages ACTIONS - “speech acts” - ~asynchronous message OBSERVABLE STATE passing + action SPEECH ACTS semantics • vs. other model PERCEPTS - vs. async (actor) msg passing
“COGNITIVE” MODEL
“COGNITIVE” MODEL • AOP as a computing paradigm - mentalistic and societal view of computation [Soham, 1993] - level of abstraction to design and program
“COGNITIVE” MODEL • AOP as a computing paradigm - mentalistic and societal view of computation [Soham, 1993] - level of abstraction to design and program • BDI (Belief-Desire-Intention) model/architecture (80ies) - inspired by the theory of human practical reasoning [Bratman, 1987] - Procedural Reasoning System (PRS) [Georgeff et al, 1988]
“COGNITIVE” MODEL • Beliefs - information state • Goals - tasks to do - achieve | maintenance • Plans - how to achieve the goals - modules of agent behaviour
“COGNITIVE” MODEL • Beliefs • Beliefs - information state - information state temp BELIEF BASE 15° • Goals • Goals my_name(“ag0”) state temp(15) - tasks to do - tasks to do idle state(idle) - achieve | maintenance - achieve | maintenance … startCooling • Plans • Plans startWarming stop HVAC - how to achieve the goals - how to achieve the goals ENVIRONMENT AGENT - modules of agent behaviour - modules of agent behaviour
“COGNITIVE” MODEL • Beliefs • Beliefs • Beliefs // examples in Jason - information state - information state - information state • Goals • Goals • Goals !achieve_temp(20). - tasks to do - tasks to do - tasks to do /* more declarative style */ - achieve | maintenance - achieve | maintenance - achieve | maintenance !temp(20). • Plans • Plans • Plans /* long-term task */ - how to achieve the goals - how to achieve the goals - how to achieve the goals !achieve_and_keep_temp(20). - modules of agent behaviour - modules of agent behaviour - modules of agent behaviour
“COGNITIVE” MODEL • Beliefs • Beliefs • Beliefs • Beliefs - information state - information state - information state - information state PLAN LIBRARY • Goals • Goals • Goals • Goals - tasks to do - what tasks to do - tasks to do - tasks to do @myplanX - achieve | maintenance - achieve | maintenance - achieve | maintenance - achieve | maintenance • Plans • Plans • Plans • Plans - how to achieve the goals - how to achieve the goals - how to achieve the goals - how to achieve the goals - modules of agent behaviour - modules of agent behaviour - modules of agent behaviour - modules of agent behaviour AGENT
PLAN MODEL | JASON EXAMPLE • Plan model • Plan model - pro-active plans - pro-active plans <event> : <context> - reactive plans - reactive plans <- <body>. • Hierarchical model • Hierarchical model - sub-goals - sub-goals
PLAN MODEL | JASON EXAMPLE +!achieve_temp(Target) : temp(Current) & Target > Current <- startWarming; • Plan model • Plan model • Plan model !warm_until(Target). - pro-active plans - pro-active plans - pro-active plans +!achieve_temp(Target) : <event> : <context> - reactive plans - reactive plans - reactive plans temp(Current) & Target < Current <- <body>. <- startCooling; • Hierarchical model • Hierarchical model • Hierarchical model !cool_until(Target). - sub-goals - sub-goals - sub-goals +!achieve_temp(Target) : temp(Current) & Target == Current <- stopHVAC.
PLAN MODEL | JASON EXAMPLE • Plan model • Plan model • Plan model • Plan model // long-term / maintenance task // target(T): belief used to track - pro-active plans - pro-active plans - pro-active plans - pro-active plans // the target temperature <event> : <context> - reactive plans - reactive plans - reactive plans - reactive plans <- <body>. +temp(Current) : • Hierarchical model • Hierarchical model • Hierarchical model • Hierarchical model target(Target) & Target != Current <- !achieve_temp(Target). - sub-goals - sub-goals - sub-goals - sub-goals
PLAN MODEL | JASON EXAMPLE +!achieve_temp(Target) : temp(Current) & Target < Current <- startWarming; • Plan model • Plan model • Plan model • Plan model • Plan model !warm_until(Target). // long-term / maintenance task // target(T): belief used to track - pro-active plans - pro-active plans - pro-active plans - pro-active plans - pro-active plans // the target temperature +!achieve_temp(Target) : <event> : <context> - reactive plans - reactive plans - reactive plans - reactive plans - reactive plans temp(Current) & Target > Current <- <body>. <- startCooling; +temp(Current) : • Hierarchical model • Hierarchical model • Hierarchical model • Hierarchical model • Hierarchical model target(Target) & Target != Current !cool_until(Target). <- !achieve_temp(Target). - sub-goals - sub-goals - sub-goals - sub-goals - sub-goals +!achieve_temp(Target) : temp(Current) & Target == Current <- stopHVAC.
“COGNITIVE” MODEL +!achieve_temp(Target) : temp(Current) & Target < Current • Intention <- startWarming; - a plan in execution !warm_until(Target). ‣ can fail => plan failure handling -!achieve_temp(Target) : <- print(“broken”); ‣ can be inspected, suspended, send_email. resumed, aborted +!warm_until(Target) : - multiple intentions can be in temp(Current) & Current > Target execution concurrently <- .drop_intention(warm_until); !achieve_temp(Target).
“COGNITIVE” MODEL // adding a plan action +!g1 <- • Reflection/meta-level features … .add_plan(“+b : true <- .print(b).”); ‣ adding/changing plans at runtime … ‣ inspecting/changing motivation // checking for an intention state +!g1 : .intend(g2) <- … ‣ … .suspend_intention(g2); …
CONTROL LOOP | REASONING CYCLE
CONTROL LOOP | REASONING CYCLE • Abstract/general AGENT see action next state ENVIRONMENT
CONTROL LOOP | REASONING CYCLE • (BDI) Reasoning cycle • Abstract/general AGENT begin 1 see action while true do 2 p ← perception () 3 B ← brf ( B , p ) ; // belief revision 4 D ← options ( B , I ) ; // desire revision next state 5 I ← filter ( B , D , I ) ; // deliberation 6 execute ( I ) ; // means-end 7 end 8 ENVIRONMENT
Recommend
More recommend