Presentation is loading. Please wait.

Presentation is loading. Please wait.

Agents, Mobility, Ubiquity & Virtuality Gregory O’Hare Department of Computer Science, University College Dublin Belief & Commitment Management within.

Similar presentations


Presentation on theme: "Agents, Mobility, Ubiquity & Virtuality Gregory O’Hare Department of Computer Science, University College Dublin Belief & Commitment Management within."— Presentation transcript:

1

2 Agents, Mobility, Ubiquity & Virtuality Gregory O’Hare Department of Computer Science, University College Dublin Belief & Commitment Management within Agent Factory COMP 4019 Multi-Agent Systems Lectures: Gregory O’Hare School of Computer Science & Informatics, University College Dublin (UCD)

3 A Necessary Synergy Agents Virtuality Mobility

4 Agent Factory Layers AF-APL A cohesive framework that supports a structured approach to the development and deployment of multi-agent systems.

5 What is Agent Factory?  Agent Factory is… “a cohesive framework that delivers structured support for the development and deployment of agent-oriented applications.”  Organised over four layers:  Programming Language  Run-Time Environment  Development Environment  Software Engineering Methodology

6 What is Agent Factory?  Agent Factory is… “a cohesive framework that delivers structured support for the development and deployment of agent-oriented applications.”  Organised over four layers:  Programming Language  Declarative  Formalised through a Multi-modal logic  Agent-specific Constructs  Run-Time Environment  Development Environment  Software Engineering Methodology

7 What is Agent Factory?  Agent Factory is… “a cohesive framework that delivers structured support for the development and deployment of agent-oriented applications.”  Organised over four layers:  Programming Language  Run-Time Environment  Distributed  FIPA Compliant  Agent Platforms + Infrastructure  System Agents: AMS + DF  Development Environment  Software Engineering Methodology

8 The Run-Time Environment Remote Management Interface Remote Command Shell Command Line Interface

9 What is Agent Factory?  Agent Factory is… “a cohesive framework that delivers structured support for the development and deployment of agent-oriented applications.”  Organised over four layers:  Programming Language  Run-Time Environment  Development Environment  AF-APL Compiler  Netbeans & Eclipse Plugins  VIPER – Protocol Editor  Software Engineering Methodology

10 AF NetBeans Plugin

11 VIPER – Visual Protocol Editor

12 What is Agent Factory?  Agent Factory is… “a cohesive framework that delivers structured support for the development and deployment of agent-oriented applications.”  Organised over four layers:  Programming Language  Run-Time Environment  Development Environment  Software Engineering Methodology

13 Development Methodology

14 What is Agent Factory?  Agent Factory is… “a cohesive framework that delivers structured support for the development and deployment of agent-oriented applications.”  Organised over four layers:  Programming Language  Run-Time Environment  Development Environment  Software Engineering Methodology  Implemented in Java  Personal Java, J2ME and J2SE-Compliant  Deployed on PDAs / PCs  Open Source:  Downloadable from http://agentfactory.sourceforge.net

15 AF-APL  AF-APL Programs define:  Actuators  Perceptors  Modules  Commitment Rules  Initial Mental State

16 Executing AF-APL  AF-APL is executed on a purpose-built agent interpreter.  The agent class is loaded into the interpreter when the agent is created.  Control functions can be used to suspend, resume, and terminate the operation of the agent.  The interpreter processes the agent program by analysing the model of the environment (beliefs) and making decisions about how to act (commitments).  Two problems arise from this:  How to ensure that the model of the environment is up-to-date?  How to make the decision about how and when to act?  These problems are known as the belief management and commitment management problems respectively.

17 Belief Management  Belief Management = Belief Update + Belief Query Belief Update Perception Temporal Update Current Beliefs Temporal Beliefs Sensor Data Belief Update. Dynamic Environment -> Transitory beliefs Persistence can be supported through temporal operators (eg ALWAYS, NEXT) Belief update = gathering perceptions + updating the temporal beliefs.

18 Belief Management  Belief Management = Belief Update + Belief Query Belief Update Perception Temporal Update Current Beliefs Temporal Beliefs Belief Rules Belief Query Sensor Data Belief Queries Belief Query. Beliefs = Facts + Implications (Belief Rules). Resolution-based reasoning on current beliefs

19 Representing Beliefs in AF-APL  AF-APL supports three forms of belief:  Current Beliefs. Beliefs that are true at the current time point.  Temporal Beliefs. Beliefs that persist over more than one time point.  Belief Rules. Rules that define inferences that can be made on the current beliefs.  In AF-APL a belief is represented as a first-order structure enclosed within a BELIEF operator:  BELIEF(happy(rem)) – a belief that rem is happy  BELIEF(likes(?person, beer)) – a belief that some person likes beer  BELIEF(bid(fred, 50)) – a belief that fred has bid 50  These beliefs are current beliefs and apply only at the current time point. As a consequence, they are wiped at the start of each iteration of the AF-APL interpreter.

20 Temporal Beliefs  ALWAYS – the belief is a current belief and will persist until the temporal belief is dropped.  ALWAYS(BELIEF(happy(greg))) – always believe that greg is happy  UNTIL – the belief is a current belief and will persist until either the temporal belief is dropped or the associated condition is satisfied.  UNTIL(BELIEF(drinking(wine,greg)), !BELIEF(available(wine))) – believe that greg is drinking wine until do not believe that there is wine available.  NEXT – the belief will be a current belief at the next time point.  NEXT(BELIEF(finished(wine))) – at the next time point belief that the wine is finished.  These beliefs are maintained until they are explicity dropped.

21 Belief Rules  Belief Rules define inferences that can be made over the current beliefs of the agent.  They take the form of logical implications:  BELIEF(likes(?food)) & BELIEF(has(?food)) => BELIEF(want(?food))  BELIEF(has(rem, icecream)) => BELIEF(happy(rem))

22 Commitment Management  It is formed from a number of sub-processes which implement a set of strategies that specify how an agent:  Adopts new commitments.  Maintains its existing commitments  Refines commitments to plans into additional commitments.  Realises commitments to action.  Handles failed commitments.  A Commitment Management Strategy is a specific set of strategies that can be employed by an agent.  E.g. blind commitment, single-minded commitment, social-minded commitment.  The default strategy in Agent Factory is single-minded commitment.  An agent maintains a commitment so long as it believes it is still acheivable.

23 Commitment Maintenance  Commitments are maintained using a maintenance condition that is associated with each commitment.  E.g. BELIEF(has(?food)) => COMMIT(Self, Now, BELIEF(true), eat(?food))  This condition outlines what must remain true for the agent to keep the commitment (like terms and conditions and a contract).  In the above example, the maintenance condition will always be true. This is sometimes known as blind commitment.  The maintenance condition is evaluated at each time point.  If the condition becomes false at any time point, then the commitment is said to have “failed”.

24 Commitment States

25 Commitment Structure Example Rem, 2005/01/20-8:00:00, BELIEF(true), SEQ(doA, doB), INACTIVE

26 Commitment Structure Example Rem, 2005/01/20-8:00:00, BELIEF(true), SEQ(doA, doB), PLANNED Rem, 2005/01/20-8:00:00, BELIEF(true), doB, WAITING Rem, 2005/01/20-8:00:00, BELIEF(true), doA, INACTIVE

27 Commitment Structure Example Rem, 2005/01/20-8:00:00, BELIEF(true), SEQ(doA, doB), PLANNED Rem, 2005/01/20-8:00:00, BELIEF(true), doB, WAITING Rem, 2005/01/20-8:00:00, BELIEF(true), doA, ACTIVE

28 Commitment Structure Example Rem, 2005/01/20-8:00:00, BELIEF(true), SEQ(doA, doB), PLANNED Rem, 2005/01/20-8:00:00, BELIEF(true), doB, WAITING Rem, 2005/01/20-8:00:00, BELIEF(true), doA, SUCCEEDED

29 Commitment Structure Example Rem, 2005/01/20-8:00:00, BELIEF(true), SEQ(doA, doB), PLANNED Rem, 2005/01/20-8:00:00, BELIEF(true), doB, INACTIVE

30 Commitment Structure Example Rem, 2005/01/20-8:00:00, BELIEF(true), SEQ(doA, doB), PLANNED Rem, 2005/01/20-8:00:00, BELIEF(true), doB, ACTIVE

31 Commitment Structure Example Rem, 2005/01/20-8:00:00, BELIEF(true), SEQ(doA, doB), PLANNED Rem, 2005/01/20-8:00:00, BELIEF(true), doB, SUCCEEDED

32 Commitment Structure Example Rem, 2005/01/20-8:00:00, BELIEF(true), SEQ(doA, doB), SUCCEEDED

33 Failure Example Rem, 2005/01/20-8:00:00, BELIEF(true), SEQ(doA, doB), PLANNED Rem, 2005/01/20-8:00:00, BELIEF(true), doB, WAITING Rem, 2005/01/20-8:00:00, BELIEF(true), doA, ACTIVE

34 Failure Example Rem, 2005/01/20-8:00:00, BELIEF(true), SEQ(doA, doB), PLANNED Rem, 2005/01/20-8:00:00, BELIEF(true), doB, WAITING Rem, 2005/01/20-8:00:00, BELIEF(true), doA, FAILED

35 Failure Example Rem, 2005/01/20-8:00:00, BELIEF(true), SEQ(doA, doB), FAILED Rem, 2005/01/20-8:00:00, BELIEF(true), doB, FAILED

36 Key AF-APL Agent Concepts  Agent = Mental State + Commitment Rules + Embodiment Config.  Mental State:  Beliefs. Subjective knowledge about the current state of the environment.  Commitments. Mental contract describing which activity, at what time, for whom, and under what conditions.  Activities may be either primitive actions or plans (SEQ, OR, PAR).  Commitment Rules:  Map situations (possible environment states) to commitments that should be adopted should the situation arise.  Embodiment Configuration  Perceptors. Computational units that convert raw data into beliefs.  Actuators. Computational units that define how to realise primitive actions.

37 Commitment Failure Handling  If any commitment fails, the failure handling strategy defines how the agent should respond to the failure.  In AF-APL, the strategy is simple:  The failure of a secondary commitment is passed to the parent commitment. The impact of this failure is assessed with respect to the parent commitment.  The failure of a commitment that has children causes the children to fail. There is no assessment here!  During the failure handling process, this strategy is applied recursively through the commitment structure.  This recursive process, while potentially computationally expensive, is essential to ensure the agent does not continue to try and fulfil commitments that are now redundant.

38 Commitment Realisation & Refinement  At some point in time, the agent will try to fulfill its commitments.  Commitments to action are fulfilled through actuator activation.  The agent finds the corresponding actuator and activates it.  If not corresponding actuator exists, then the commitment fails.  Commitments to plans are fulfilled through commitment refinement.  The agent adopts a set of secondary commitments that correspond to the activities specified in the plan.  Plan operators may be used to place an order on the achievement of these commitments.  We label the set of commitments adopted when fulfilling a primary commitment to be a commitment structure.

39 Representing Activities  Activities describe what the agent can do:  Actions. Primitive abilities that are directly executable by the agent.  Plans. A recipe that consists of a partially ordered set of activities.  AF-APL supports the definition of actions and explicit plans.  Actions are defined in the constructor of the associated actuator unit. The definition consists of a unique identifier (e.g. eat(?food) ), a pre- condition (e.g. BELIEF(has(?food)) ) and a post-condition (not used).  Explicit plans are defined within the activity field of a commitment. They take the form of a plan operator (SEQ or PAR for AF-APL) together with a list of activities that may be either additional plan operators or actions.  E.g. SEQ(PAR(boilWater, addCoffee), pourWater, PAR(addSugar, addMilk))

40 Commitment Adoption  Commitments are adopted as a result of the triggering of Commitment Rules.  A commitment rule defines a situation in which the agent should adopt a commitment.  E.g. BELIEF(has(?food)) => COMMIT(Self, Now, BELIEF(true), eat(?food))  Each of the commitment rules is checked during each iteration of the AF-APL interpreter.  If the situation (left-hand side) of any rule is evaluated to true, then the rule is said to have been triggered.  Whenever a rule is triggered, there exists (at least one) set of variable bindings.  Each set of bindings is applied to the commitment construct on the right-hand side of the commitment rule, and the corresponding primary commitment is adopted by the agent.

41 Downloading Agent Factory  You can download the latest version (for you only) from:  http://www.agentfactory.com/ums http://www.agentfactory.com/ums  The NetBeans plugin can be downloaded from:  http://www.agentfactory.com/netbeans http://www.agentfactory.com/netbeans  To use Agent Factory, you will need to set the following environment variables:  AF_HOME = location of the base agentfactory-0.2.0 folder  JAVA_HOME = location of a Java 2 SDK  PATH = add the location of %AF_HOME%\bin  An example BAT file can be found at http://www.agentfactory.com/umshttp://www.agentfactory.com/ums  To run Agent Factory, type:  “agentfactory –config queue.cfg –script queue.aps”  Typing “afgui” will start up the remote management interface (you will have to configure a site).

42 AF-APL Interpreter Cycle Commitments Commitment Rules World Belief Update Query Perceptors Actuators Beliefs Commitment Management Migrate? Belief Management


Download ppt "Agents, Mobility, Ubiquity & Virtuality Gregory O’Hare Department of Computer Science, University College Dublin Belief & Commitment Management within."

Similar presentations


Ads by Google