Presentation is loading. Please wait.

Presentation is loading. Please wait.

Formal Modelling of Reactive Agents as an aggregation of Simple Behaviours P.Kefalas Dept. of Computer Science 13 Tsimiski Str. 546 24 Thessaloniki Greece.

Similar presentations


Presentation on theme: "Formal Modelling of Reactive Agents as an aggregation of Simple Behaviours P.Kefalas Dept. of Computer Science 13 Tsimiski Str. 546 24 Thessaloniki Greece."— Presentation transcript:

1 Formal Modelling of Reactive Agents as an aggregation of Simple Behaviours P.Kefalas Dept. of Computer Science 13 Tsimiski Str. 546 24 Thessaloniki Greece kefalas@city.academic.gr

2 TOPICS OF PRESENTATION  Introduction to Formal Modelling  Motivation  Modelling Component X-Machines  Building a Communicating X-Machine System  Evaluation  Conclusion P.Kefalas, CITY Liberal Studies

3 FORMAL MODELLING Agents, as highly dynamic systems, are concerned with: (i)a set of appropriate environmental stimuli or inputs, (ii) a set of internal states of the agent, and (iii) a set of rules that relate the two above and determines what the agent state will change to if a particular stimulus arrives while the agent is in a particular state. P.Kefalas, CITY Liberal Studies

4 Although Agent-Oriented Software Engineering aims to manage the inherent complexity of software systems, there is still no evidence to suggest that any methodology proposed so far leads towards correct systems. It is argued that Formal Methods can (to some extend) solve the problem, under the following conditions:  they can deal successfully with complexity of single or multi agent systems, and  they are practical. Agent Oriented Software Engineering P.Kefalas, CITY Liberal Studies

5 Formal Methods  Z  VDM  Finite State Machines  Petri Nets Modelling of data types Modelling of control P.Kefalas, CITY Liberal Studies

6 The Challenge is to develop agent models and implementations that are correct Criteria for correctness:  the initial agent model should match with the requirements  the agent model should satisfy any necessary properties in order to meet its design objectives  the implementation should pass all tests constructed using a complete functional test generation method. MODELLING VERIFICATION TESTING P.Kefalas, CITY Liberal Studies

7 FORMAL MODELLING OF AGENTS In order to be useful to modelling of intelligent agents a formal method should be able:  to model both the data and the changes of an agent,  to model separately the behaviours of an agent and the ways the behaviours interact with each other,  to be intuitive, practical and effective towards implementation of an agent, and  to facilitate development of correct agents. P.Kefalas, CITY Liberal Studies

8 A FSM-like model seems to capture most of the requirements … but no data, no separate behaviours P.Kefalas, CITY Liberal Studies

9 X-MACHINES X-Machines is:  A General Computational Machine  Based on Finite State Machines, but also:  it has a MEMORY structure  its transitions are labeled with FUNCTIONS Therefore: X-Machines is a formal method which employs a diagrammatic approach to modelling and is capable of modelling both DATA and CONTROL of a system. P.Kefalas, CITY Liberal Studies

10 σ γ S1S1 S2S2 S3S3 S4S4 M=(m 1, m 2, …, m n ) φ1φ1 φ3φ3 φ2φ2 φ5φ5 φ4φ4 φ4φ4 φ2φ2 X-Machine Diagrammatical Notation P.Kefalas, CITY Liberal Studies

11 COMMUNICATING X-MACHINES X-Machines can also communicate with each other:  Functions can read an input from a communication input stream, i.e. a “message” sent by the annotated model name  Functions can writes a “message” to the communication input stream of machine with the annotated model name. The “message” is sent after all the output parameters are instantiated. Therefore: X-Machines is a formal method can be used to separately model behaviours of an agent system that communicate. P.Kefalas, CITY Liberal Studies

12 Communicating X-Machine Diagrammatical Notation P.Kefalas, CITY Liberal Studies xm-1xm-2 Channel for receiving message from xm-1 Channel for sending message to xm-2 σ γ S1S1 S2S2 M=(m 1, m 2, …, m n ) φ1φ1 S3S3 S4S4 φ2φ2

13 Formal Definition X-Machines is a 8-tuple M = (Σ, Γ, Q, M, Φ, F, q 0, m 0 )  Σ, Γ is the input and output finite alphabet respectively  Q is the finite set of states  M is the (possibly) infinite set called memory  Φ is the type of the machine M, a finite set of partial functions φ that map an input and a memory state to an output and a new memory state, φ: Σ  M  Γ  M  F is the next state partial function that given a state and a function from the type Φ, denotes the next state. F is often described as a transition state diagram, F:Q  Φ  Q  q 0, m 0 are the initial state and memory respectively. P.Kefalas, CITY Liberal Studies

14 Example: A reactive agent that collects objects, records any objects found on its way and sets up its goal according to the list of objects found. P.Kefalas, CITY Liberal Studies

15 Formal Definition Σ = ({space, base}  OBSTACLE  OBJECT)  COORD  COORD Γ={"moving freely", "moving to base", "dropping food",...}. Q={At Base, Searching, At Obstacle, Going Back, Directed to Object} M = (OBJECT  {none})  (COORD  COORD)  seq (COORD  COORD) m 0 = (none, (0,0), nil) q 0 = "At Base" … lift_object( (obj,x,y),(none,(x,y),objectlist) )  ("lifting object",(obj,(x,y), )), if obj  OBJECT find_object( (obj,x,y),(item,(x,y),objectlist) )  ("record object position",(item,(x,y), )), if item  none  obj  OBJECT  (x,y)  objectlist … P.Kefalas, CITY Liberal Studies

16 Agents as an aggregation of behaviours  identification of the individual behaviours,  modeling of individual behaviours,  aggregation of behaviours in order to construct the whole agent model Methodology: P.Kefalas, CITY Liberal Studies

17 Behaviour 1 Behaviour 2 Behaviour 3 Behaviour 4 Communication Agent type 1 Behaviour 1 Behaviour 4 Communication Agent type 2 Communication Multi-Agent System The methodology is useful for building multi-agent systems in which agents have common behaviours P.Kefalas, CITY Liberal Studies

18 Example: The same reactive agent as before but with a set of distinct behaviours (a) searching for an object, (b) moving directly to an object, (c) lifting and dropping objects, (d) avoiding obstacles (e) traveling back to the base, (f) building a map of the environment Step 1: Identifying individual behaviours: P.Kefalas, CITY Liberal Studies

19 Step 2: Modelling individual behaviours: moving directly to an objectbuilding map of the environment P.Kefalas, CITY Liberal Studies

20 Step 3 (a): Communication of individual behaviours: moving directly to an objectbuilding map of the environment P.Kefalas, CITY Liberal Studies

21 Step 3 (b): Aggregation of behaviours: P.Kefalas, CITY Liberal Studies

22  X-Machines is a FORMAL METHOD but also it  INTUITIVE and EXPRESSIVE as well as  PRACTICAL P.Kefalas, CITY Liberal Studies DISCUSSION AND EVALUATION XMDL (X-Machine Description Language) is a declarative mark-up language, which permits the designer to write ASCII code in order to describe a X-machine model. XMDL model XMDL communication += Communicating XMDL model

23 The approach has several advantages for the developer who:  does not need to model a communicating system from scratch,  can re-use existing models (behaviours),  can consider modelling and communication as two separate distinct activities in the development of a communicating system based on behaviours,  can use existing tools for both stand-alone and communicating X-machines. … Discussion and Evaluation … P.Kefalas, CITY Liberal Studies

24  a COMPLETE TESTING strategy that guarantees to find all faults in the implementation  a MODEL CHECKING strategy that guarantees to verify that specific properties hold (XmCTL) X-Machines is supported by: … Discussion and Evaluation … P.Kefalas, CITY Liberal Studies

25 CONCLUSIONS  X-Machine is a suitable formal method for specifying and building correct reactive agents.  Tools are continuously built in order to facilitate agent development based around X-Machines.  Communicating X-Machines encourage the modular development of agents based on an aggregation of behaviours.  Communicating X-Machines lead towards the specification of large scale multi-agent systems. P.Kefalas, CITY Liberal Studies

26 Formal Modelling of Reactive Agents as an aggregation of Simple Behaviours P.Kefalas Dept. of Computer Science 13 Tsimiski Str. 546 24 Thessaloniki Greece kefalas@city.academic.gr


Download ppt "Formal Modelling of Reactive Agents as an aggregation of Simple Behaviours P.Kefalas Dept. of Computer Science 13 Tsimiski Str. 546 24 Thessaloniki Greece."

Similar presentations


Ads by Google