memory-driven dynamic behavior checking in logical agents

25
Memory-driven dynamic behavior checking in Logical Agents Stefania Costantini Arianna Tocchio CILC 2006 - 26-27 giugno 2006, Bari Università degli Studi dell'Aquila Dipartimento di Informatica

Upload: latoya

Post on 11-Jan-2016

49 views

Category:

Documents


1 download

DESCRIPTION

CILC 2006 - 26-27 giugno 2006, Bari. Memory-driven dynamic behavior checking in Logical Agents. Stefania Costantini Arianna Tocchio. Università degli Studi dell'Aquila Dipartimento di Informatica. REACTIVITY. PRO-ACTIVITY. AUTONOMY. SOCIAL ABILITY. OTHERS. LEARNING. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Memory-driven dynamic behavior checking in Logical Agents

Memory-driven dynamic behavior checkingin Logical Agents

Stefania Costantini Arianna Tocchio

CILC 2006 - 26-27 giugno 2006, Bari

Università degli Studi dell'AquilaDipartimento di Informatica

Page 2: Memory-driven dynamic behavior checking in Logical Agents

The hard life of agents

• Like in human communities, agents can only count upon their capabilities for facing complex tasks and maintaining a high performance in dynamic environments where they are put at work.

AUTONOMY

REACTIVITYPRO-ACTIVITY

SOCIAL ABILITY

LEARNING

OTHERS

INTELLIGENCE

1/24

Page 3: Memory-driven dynamic behavior checking in Logical Agents

How much does the intelligence cost?

• Pro-activity and learning increase intelligence but introduce a risk factor in the agent evolution process

• What will it happen? Will agents perform their tasks correctly?

• Is it possible to represent an agent evolution for dynamically checking the agent behavior?

• The agent evolution can be studied by means of the agent ‘memory’ …

• In order to be sure that an agent will adopt the expected behavior we can introduce some control constructs aimed at verifying the agent evolution process…

2/24

Page 4: Memory-driven dynamic behavior checking in Logical Agents

Some existing approaches

• Typically, developers have applied techniques to system abstract models thus neglecting the verification of behavioral anomalies during the agent life:

• Model-checking paradigm (AgentSpeak(L), CTLK,…)

• Deductive approach through modal and temporal logics (CASLve,…)

• Behavior observation approach through test scenarios (Wallace,…)

• Event Calculus, used in conjunction with abduction (Kowalski and Sergots )

3/24

Page 5: Memory-driven dynamic behavior checking in Logical Agents

Our approach

• We propose a method for checking the agent behavior correctness based on:

the introduction of specific constraints, aimed at checking if the entity has performed actions that it should not have done or has not performed actions that it should have done in a certain time and/or under some conditions.

CONSTRAINTS + MEMORY

4/24

Page 6: Memory-driven dynamic behavior checking in Logical Agents

Some Behavioral Anomalies

• In order to define a framework for verifying the agent behavior correctness, we concentrate on six possible behavioral anomalies partially inspired by the work of Wallace:

– Incorrect time execution: An action or goal is accomplished at the incorrect time.

– Incorrect duration: An action or goal lasts beyond a reasonable time or a specific related condition.

– Omission: The agent fails to perform the required action or to pursue its goal.

– Intrusion: The agent performs a goal or action that is not proper.– Duplication: An action or a goal is repeated inappropriately.– Incoherency: An action or goal is executed a number of times greater

than an expected threshold.

5/24

Page 7: Memory-driven dynamic behavior checking in Logical Agents

Agent memory

• Imagine an agent that is capable of remembering the received external stimuli, the reasoning process adopted and the performed actions.

• Through “memory”, the agent is potentially able to learn from experiences and ground what it knows through these experiences.

• Most methods to design agent memorization mechanisms have been inspired by models of human memory: short-term memory and long-term memory (Atkinson and Shiffrin),working memory (Gero and Liew),…

• We can observe that experience and knowledge are strongly related.

6/24

Page 8: Memory-driven dynamic behavior checking in Logical Agents

Past events

• Past events record the external stimuli perceived, the internal conclusions reached and the actions performed.

• “Static” agent memory= original knowledge + past events

• Past events in our view, have at least two relevant roles:• describe the agent experience;• keep track of the state of the world and of its changes,

possibly related to the agent performed actions.

• We define the set P of current “valid” past events that describe the state of the world as perceived by the agent and the set PNV of all previous ones.

Experience = P PNV

7/24

Page 9: Memory-driven dynamic behavior checking in Logical Agents

Defining agent experience

Agent =< Ag, Prg,E, I,A > and H = E I A

• We introduce a function YT(X) that takes in input an XH and

transforms it in the corresponding past form XPT (X) = XP

T

• We can indicate the generation process of past events as the agent history h.

h : init X0PT0 X1P

T1 ... XnPTn

while the set of past events Ph related to this specific history is:

Ph={X0PT0, X1P

T1,…, XnPTn }

X0 H X1 H Xn H

8/24

Page 10: Memory-driven dynamic behavior checking in Logical Agents

Managing past events (1)

• Past Constraints define which past events must be eliminated and under which conditions.

• They are verified from time to time to maintain the agent memory consistent with the external world.

• Definition 1 (Past Constraint). A Past Constraint has the syntax:

XkP : Tk, ...,XmP : Tm = XsP : Ts, ...,XzP : Tz, {C1, ...,Cn}.

• Each condition Ci can express either time or knowledge constraints.

.

9/24

Page 11: Memory-driven dynamic behavior checking in Logical Agents

Managing past events (2)

An example:

put_apple_in_the_tableP : T1= put_apple_in_the_fruit_dishP : T2,

{T2 > T1}.

• A generic past event XPT will be transformed into XPNV

T iff there exists a Past Constraint in PC related to XP

T whose conditions expressed in the body are satisfied.

PNVh={X0PNVT0, X1PNV

T1,…, XnPNVTn }

P PNV

.

10/24

Page 12: Memory-driven dynamic behavior checking in Logical Agents

Why using PNV (1)

• Past events in PNV may still have a relevant role for the entity decisional process. For this reason, we introduced some operators capable of deducing from PNV data useful to draw internal conclusions:

– How often an action, a reaction or an internal conclusion has been performed:

N = #ΔPNV n (pay instalmentA(Value,Date))

– The first or last past event occurrence:

First_paymentfirst = Δ PPNV first (pay instalment(Value,Date))

11/24

Page 13: Memory-driven dynamic behavior checking in Logical Agents

Why using PNV (2)

– Past event occurrences in a time interval.

Instalments = ΔPNVMarch,June(pay instalment(Value,Date))

• Finally, in order to formalize the consideration for which experience and knowledge concur to generate agent “memory”, we formally define the agent memory M as:

M = {X P PNV KBfacts}

• The agent experience synthesized by the sets P and PNV constitutes the starting point for our behavior checking approach.

12/24

Page 14: Memory-driven dynamic behavior checking in Logical Agents

Constraints for behavioral anomalies checking

• Given that past events resume previous agent behavior, as skillful archaeologists we propose a method based on several behavioral constraints useful to discover specific traces. What kind of traces?

• We introduce the following kinds of behavioral constraints:

– Existential Constraint: they contain a reference to the past, one to the present and a set of conditions useful to describe the class of histories that we are considering.

XkP : Tk, ...,XmP : Tm XsP : Ts, ...,XzP : Tz, {C1, ...,Cn}.

if XsP : Ts, ...,XzP : Tz are in P, C1,..,Cn are true and almost one of XkP : Tk, ...,XmP : Tm is in P we are in presence of an anomaly.

ANOMALY

13/24

Page 15: Memory-driven dynamic behavior checking in Logical Agents

Constraints for behavioral anomalies checking

– Inquiring Constraint: This kind of behavioral constraint checks past events that,considered some conditions, must be in P at a certain time.

XkP : Tk, ...,Xk+mP : Tk+m ¬ XsP : Ts, ...,XzP : Tz, {C1, ...,Cn}.

if XsP : Ts, ...,XzP : Tz are in P, C1,..,Cn are true and then if only an item of XkP

Tk,…,Xk+mPTm is lacking, we are in presence of an anomaly.

• In the next slides we show how to detect the anomalies suggested by Wallace.

ANOMALY

14/24

Page 16: Memory-driven dynamic behavior checking in Logical Agents

Incorrect time execution

– An action or goal is performed at the incorrect time. Suppose for instance that our agent bought a goldfish and an aquarium. To keep the fish safe, it is necessary that it first fills the aquarium up with water and then puts the animal inside.

– In order to check the actions execution correctness, we must verify that agent does not perform the second action before the first one.

– If the action sequence is not correct and we are in the presence of Incorrect time execution anomaly.

fill_the_aquariumP : T1 put_inside_fishP : T2, {T2 < T1}.

15/24

Page 17: Memory-driven dynamic behavior checking in Logical Agents

Incorrect duration

– An action or goal last beyond a reasonable time or a specified condition. Consider the following simple program:

rainE:>open_umbrellaA.

– in P we cannot have the past events rainP : T1 and open the umbrellaP :T2 with T1 > T2.

– In order to detect this anomaly, we employed an inquiring constraint.

open_the_umbrellaP : T1, ¬ rainP : T2, {T1 < T2}.

16/24

Page 18: Memory-driven dynamic behavior checking in Logical Agents

Omission

– The agent fails to perform the required action or pursue the required goal. Suppose that our agent is on an island and must go fishing for surviving. For reaching its purpose, the agent must take the fishing-rod, then must bait the hook and finally must drop the fish-hook in the sea.

– If at the time Tk the past event take fishing rodP : Tk is absent, we can deduce that the corresponding action has been omitted.

take_fishing_rodP : Tk, ¬ bait_hookP : T2, drop_fish_hookP : T3, {Tk < T2 + Th2, Tk < T3 + Th3,

Th2<Th3}.

17/24

Page 19: Memory-driven dynamic behavior checking in Logical Agents

Intrusion

– The agent performs a goal or action that is not allowed. Suppose that our agent is situated in a critical environment where we need be sure that it never performs a dangerous action.

– We can verify if this happens by using an existential constraint.

– In particular, consider an agent that, if enters into the blue room, must not push the red button. The corresponding constraint will be:

push_red_buttonP : T1 enter_in_blue_roomP : T2,

{T1 > T2}.

18/24

Page 20: Memory-driven dynamic behavior checking in Logical Agents

Duplication

– An action or a goal is repeated inappropriately. This anomaly can be detected by searching for two past events corresponding to the same action, reaction or conclusion having the same time Ti.

– The existential constraint capable of detecting this incorrect behavior is:

push_red_buttonP : T1 push_red_buttonP : T2,

{T1 = T2+Th}.

19/24

Page 21: Memory-driven dynamic behavior checking in Logical Agents

Incoherency

– An action or goal is executed a number of times greater than an expected threshold. This anomaly is strictly related to PNV events. Consider again the agent that bought the car. It must pay twelve instalments in the current year. If it pays a further instalment, the expected behavior is violated:

pay_instalment(Value,Date))P : T {N = ΔPNV n (pay_instalment(Value,Date)),N = 20, T > 0}.

20/24

Page 22: Memory-driven dynamic behavior checking in Logical Agents

About behavioral constraints

• Behavioral constraints are to be checked from time to time by the system in order to point out the anomalies.

• When an incorrect behavior takes place, a particular past event can be generated. This event may contain information about the kind of violation for allowing the agent to activate possible recovery strategies.

• Moreover, by inspecting the sets P and PNV, one can discover the motivation of the entity anomalous behavior examining all past events generated by the system.

• We have put our idea at work in a real multi-agent system called DALI, a logic language.

21/24

Page 23: Memory-driven dynamic behavior checking in Logical Agents

Semantics of Past and Behavioral Constraints

• Given a program PAg, the semantics is based on the following.

– 1. An initialization step where PAg is transformed into a corresponding program P0 by means of some sort of knowledge compilation (which can be understood as a rewriting of the program in an intermediate language).

– 2. A sequence of evolution steps, where the reception of an event or a certain expired time threshold is understood as a transformation of Pi into Pi+1, where the transformation specifies how the event affects the agent program (e.g., it is recorded).

• The time threshold allows one to verify the behavioral constraints if no event is happened.

22/24

Page 24: Memory-driven dynamic behavior checking in Logical Agents

Semantics of Past and Behavioral Constraints

• Then, one has a Program Evolution Sequence

PE = [P0, ..., Pn] and a corresponding Semantic Evolution Sequence [M0, ...,Mn] where Mi is the model of Pi.

• This model can be adapted by transforming the initialization step into a more general knowledge compilation step, to be performed:

(i) At the initialization stage, as before. (ii) When a new behavioral constraint is added. (iii) In consequence to a violation evidence.

23/24

Page 25: Memory-driven dynamic behavior checking in Logical Agents

Conclusions

• Today we have presented an approach to update agent memory and to detect behavioral anomalies by using logic constraints.

• Alberti et al. have adopted a similar approach based on social constraints in order to model the interactions among (possibly heterogeneous) agents that form an open society.

• Another interesting class of techniques for agent behavior verification is based on variations of Kowalski and Sergot’s Event Calculus, used in conjunction with abduction. We intend in the future to perform a comparison between our behavioral constraints and these techniques.

24/24