Presentation is loading. Please wait.

Presentation is loading. Please wait.

McGill University School of Computer Science Ph.D. Student in the Modelling, Simulation and Design Lab Eugene Syriani Hans Vangheluwe.

Similar presentations


Presentation on theme: "McGill University School of Computer Science Ph.D. Student in the Modelling, Simulation and Design Lab Eugene Syriani Hans Vangheluwe."— Presentation transcript:

1 McGill University School of Computer Science Ph.D. Student in the Modelling, Simulation and Design Lab Eugene Syriani Hans Vangheluwe

2 McGill University School of Computer Science Ph.D. Student in the Modelling, Simulation and Design Lab Eugene Syriani Hans Vangheluwe

3 OVERVIEW Background In the context The Modular Timed Graph Transformation (MoTiF) language Case Study: Reactive PacMan Game Modelling, Simulation and Synthesis Modelling of transformation and its environment Simulation for optimization Synthesis of application Conclusion and Future Work 3

4 IN THE CONTEXT Model Transformation Graph Transformation Controlled Graph Rewriting (rewriting rules) Control Primitives : Sequencing, Branching, Looping, Parallelism, Hierarchy Time is inherent in our transformation models Modelling, Simulation and Synthesis 4

5 IN THE CONTEXT 5

6 MoTiF: SEMANTIC DOMAIN The Discrete Event System Specification [1] (DEVS) formalism Highly compositional simulation framework DEVS: – Blocks – Ports – Events Semantics: Parallel composition of blocks/models 6 [1] Zeigler B.P., Multifacetted Modelling and Discrete Event Simulation/ Academic Press, London (1984)

7 MoTiF: SEMANTIC DOMAIN Atomic DEVS: – Time Advance – Output Function – Internal Transition –External Transition ATOMIC 7

8 MoTiF: SEMANTIC DOMAIN Coupled DEVS 8 C1 A1 A2 C2

9 MoTiF [2] Blocks – Atomic: encapsulate a graph rewriting rule – Coupled: encapsulate a set of rules (graph grammar) Events – Inport: receive the host graph – Outport(s): send the transformed graph 9 [2] Syriani E. and Vangheluwe H.: Programmed Graph Rewriting with DEVS. AGTIVE 2007, LNCS (2008)

10 MoTiF MODELLING ENVIRONMENT IN AToM 3 [3] 10 [3] de Lara J., Vangheluwe H., AToM 3 : A tool for multi-formalism and meta-modelling. FASE, LNCS 2306 (2002), 174-188

11 MoTiF EXECUTION COMPILE GENERATE IMPORT SIMULATE class Pacmaneat: def match(): … def execute(): … class Pacmaneat: def match(): … def execute(): … class Kill(ARule): def __init__(self): ARule.__init__(self, name=Kill') self.state = ARuleState(Pacdie()) def weightFunction(self): return 1.0 class Kill(ARule): def __init__(self): ARule.__init__(self, name=Kill') self.state = ARuleState(Pacdie()) def weightFunction(self): return 1.0 class Pacmanmoveri: def match(): … def execute(): … class Pacmanmoveri: def match(): … def execute(): … class Pacmandie: def match(): … def execute(): … class Pacmandie: def match(): … def execute(): … 11

12 CASE STUDY: REACTIVE PACMAN GAME Simplified PacMan formalism [4] [4] Heckel R., Graph Transformation in a nutshell. FoVMT, ENTCS 148 (2006), 187-198 12

13 CASE STUDY: REACTIVE PACMAN GAME Build the Graph Rewriting Rules 13 1 4 2 1 2 5 pacLink 3 ghostLink 3 1: Match[1].score + 1 1 2 3 1 2 3 5 4 pacLink foodLink 6 4 pacLink

14 CASE STUDY: REACTIVE PACMAN GAME Build the Graph Rewriting Rules 14 4 12 3 5 gridLeft ghostLink 12 3 4 6 gridLeft ghostLink 4 12 6 gridRight pacLink 12 4 5 gridRight pacLink 3 3

15 15

16 MODELLING OF THE TRANSFORMATION: SYSTEM User – Controller – Autonomous loop Feed-back to User On User interrupt: User Controlled Feed-back to User Autonomous User Controlled 16

17 MODELLING OF THE TRANSFORMATION: AUTONOMOUS CRule Priorities 17

18 MODELLING OF THE TRANSFORMATION: GHOSTMOVE CRule Decider finds the next move for the ghost Decider consumes time 18

19 MODELLING OF TRANSFORMATION: SYSTEM Autonomous User Controlled 19

20 MODELLING OF THE TRANSFORMATION: USERCONTROLLED CRule Conditional rule execution 20

21 MODELLING OF THE TRANSFORMATION: SYSTEM Autonomous User Controlled 21

22 MODELLING OF ENVIRONMENT: USER CoupledBlock User Behavior User Interaction Customization Modularity 22

23 MODEL OF THE PLAYER: STRATEGY 23 Random

24 MODELLING OF ENVIRONMENT: USERBEHAVIOR CoupledBlock Back-tracking Collector consumes time 24

25 MODELLING OF ENVIRONMENT: TRYMOVE CRule 4 12 5 gridRight pacLink 12 4 6 gridRight pacLink 3 3 1 7 8 ghostLink 25 Non-determinism

26 MODEL OF THE PLAYER: SPEED Player reaction time [5]: – Thinking time – Motorics time 26 [5] Zaitev A.V., Skorik Y.A., Mathematical description of sensorimotor reaction time distribution, Human Psychology 28(4) (2002), 494-497 Slow Normal Fast Very Fast

27 27

28 WHY DO WE NEED SIMULATION? A.I. Strategy Random – Smart – Very Smart Speed Too Slow – … – Too Fast Very Smart Fix Strategy: Very Smart Find optimal speed We want to build a playable game 28

29 SIMULATION RESULTS Finding the optimal game speed 29

30 30

31 SYNTHESIS OF APPLICATION Synthesis of a reactive game Discard the UserBehavior block Runs on a web browser using AJAX and SVG Real-time model transformation 31 User Interaction User Behavior User Interaction

32 SUMMARY MoTiF MoTiF allows for Modelling and Simulation-Based Design – Graph transformation rules – Timed transformation system – User Synthesis of applications – Reactive – Real-time 32 Autonomous User Controlled

33 FUTURE WORK Model A.I. behavior: backtracking Re-use and parametrisation of transformation models MORE COMPLEX EXAMPLES 33

34 34 ?


Download ppt "McGill University School of Computer Science Ph.D. Student in the Modelling, Simulation and Design Lab Eugene Syriani Hans Vangheluwe."

Similar presentations


Ads by Google