Presentation is loading. Please wait.

Presentation is loading. Please wait.

Memory-driven dynamic behavior checking in Logical Agents Stefania Costantini Arianna Tocchio CILC 2006 - 26-27 giugno 2006, Bari Università degli Studi.

Similar presentations


Presentation on theme: "Memory-driven dynamic behavior checking in Logical Agents Stefania Costantini Arianna Tocchio CILC 2006 - 26-27 giugno 2006, Bari Università degli Studi."— Presentation transcript:

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

2 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 REACTIVITY PRO-ACTIVITY SOCIAL ABILITY LEARNING OTHERS INTELLIGENCE 1/24

3 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

4 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

5 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

6 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

7 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

8 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

9 Defining agent experience Agent = and H = E I A We introduce a function Y T (X) that takes in input an X H and transforms it in the corresponding past form X P T (X) = X P T We can indicate the generation process of past events as the agent history h. h : init X 0P T0 X 1P T1... X nP Tn while the set of past events P h related to this specific history is: P h ={X 0P T0, X 1P T1,…, X nP Tn } X 0 HX 1 HX n H 8/24

10 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: X kP : T k,...,X mP : T m = X sP : T s,...,X zP : T z, {C 1,...,C n }. Each condition C i can express either time or knowledge constraints.. 9/24

11 Managing past events (2) An example: put_apple_in_the_tableP : T 1 = put_apple_in_the_fruit_dishP : T 2, {T 2 > T 1 }. A generic past event X P T will be transformed into X PNV T iff there exists a Past Constraint in PC related to X P T whose conditions expressed in the body are satisfied. PNV h ={X 0PNV T0, X 1PNV T1,…, X nPNV Tn } P PNV. 10/24

12 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_payment first = Δ P PNV first (pay instalment(Value,Date)) 11/24

13 Why using PNV (2) –Past event occurrences in a time interval. Instalments = Δ PNV March,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 KB facts } The agent experience synthesized by the sets P and PNV constitutes the starting point for our behavior checking approach. 12/24

14 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. X kP : T k,...,X mP : T m X sP : T s,...,X zP : T z, {C 1,...,C n }. if X sP : T s,...,X zP : T z are in P, C 1,..,C n are true and almost one of X kP : T k,...,X mP : T m is in P we are in presence of an anomaly. ANOMALY 13/24

15 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. X kP : T k,...,X k+mP : T k+m ¬ X sP : T s,...,X zP : T z, {C 1,...,C n }. if X sP : T s,...,X zP : T z are in P, C 1,..,C n are true and then if only an item of X kP Tk,…,X k+mP Tm 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

16 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 : T 1 put_inside_fishP : T 2, {T 2 < T 1 }. 15/24

17 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 : T 1 and open the umbrellaP :T 2 with T 1 > T 2. –In order to detect this anomaly, we employed an inquiring constraint. open_the_umbrellaP : T 1, ¬ rainP : T 2, {T 1 < T 2 }. 16/24

18 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 T k the past event take fishing rodP : T k is absent, we can deduce that the corresponding action has been omitted. take_fishing_rodP : Tk, ¬ bait_hookP : T 2, drop_fish_hookP : T 3, {T k < T 2 + Th 2, T k < T 3 + Th 3, Th 2

19 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 : T 1 enter_in_blue_roomP : T 2, {T 1 > T 2 }. 18/24

20 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 : T 1 push_red_buttonP : T 2, {T 1 = T 2 +Th}. 19/24

21 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

22 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

23 Semantics of Past and Behavioral Constraints Given a program P Ag, the semantics is based on the following. –1. An initialization step where P Ag is transformed into a corresponding program P 0 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 P i into P i+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

24 Semantics of Past and Behavioral Constraints Then, one has a Program Evolution Sequence PE = [P 0,..., P n ] and a corresponding Semantic Evolution Sequence [M 0,...,M n ] where Mi is the model of P i. 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

25 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 Sergots 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


Download ppt "Memory-driven dynamic behavior checking in Logical Agents Stefania Costantini Arianna Tocchio CILC 2006 - 26-27 giugno 2006, Bari Università degli Studi."

Similar presentations


Ads by Google