Top Banner
ParCeL-5/ParSSAP: A Parallel Programming Model and Library for Easy Development and Fast Execution of Simulations of Situated Multi-Agent Systems Stéphane Vialle [email protected] Eugen Dedu [email protected] Claude Timsit [email protected] SNPD’02 Charles Hermite Center (France) ERSIDP Supélec (France)
16

Stéphane Vialle [email protected] Eugen Dedu [email protected]

Jan 20, 2016

Download

Documents

jalene

Charles Hermite Center (France). ERSIDP Supélec (France). ParCeL-5/ParSSAP: A Parallel Programming Model and Library for Easy Development and Fast Execution of Simulations of Situated Multi-Agent Systems. SNPD’02. Stéphane Vialle [email protected] - PowerPoint PPT Presentation
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Stéphane Vialle Stephane.Vialle@supelec.fr Eugen Dedu    Eugen.Dedu@prism.uvsq.fr

ParCeL-5/ParSSAP: A Parallel Programming Model and

Library for Easy Development and Fast Execution of Simulations of Situated

Multi-Agent Systems

Stéphane Vialle [email protected] Dedu [email protected]

Claude Timsit [email protected]

SNPD’02

CharlesHermiteCenter(France)

ERSIDPSupélec(France)

Page 2: Stéphane Vialle Stephane.Vialle@supelec.fr Eugen Dedu    Eugen.Dedu@prism.uvsq.fr

2

1 - Motivations1 - Situated MAS with fine modeling: complex to program (ex: simultaneity of agent actions and conflict resolutions)

2 - Fine or large situated MAS: very time consuming (for simultaneity modeling, fair conflict resolution, …)

3 - MAS: natural parallelism different of computer parallelism (efficient adaptation is difficult)

We need: • Parallel programming models allowing easy developments• Parallel development tools on modern MIMD parallel computers

??

C-library ….

Page 3: Stéphane Vialle Stephane.Vialle@supelec.fr Eugen Dedu    Eugen.Dedu@prism.uvsq.fr

3

2 - ParCeL-5 Model: Basic Components4 basic components : Environment, Resources, Agent/Cell, Arbitrator

1 - The Environment :

• 2D-Grid or 2D-Torus (torus = circular grid)

• 4-connectivity or 8-connectivity

• Only one agent per box

• An obstacle entirely fills a box

2D-Grid 2D-Torus

4-connectivity 8-connectivity

Page 4: Stéphane Vialle Stephane.Vialle@supelec.fr Eugen Dedu    Eugen.Dedu@prism.uvsq.fr

4

2 - ParCeL-5 Model: Basic Components4 basic components : Environment, Resources, Agent/Cell, Arbitrator

2 - The Resources :

• Resources store or consume some objects (ores)

• Any number of resources

Any number of kind of resources (any kind of ores)

• Only one resource per box, but an agent can still enter the box

Mines Factories

Page 5: Stéphane Vialle Stephane.Vialle@supelec.fr Eugen Dedu    Eugen.Dedu@prism.uvsq.fr

5

2 - ParCeL-5 Model: Basic Components4 basic components : Environment, Resources, Agent/Cell, Arbitrator

3 - The Agents/Cells :

• Local memory• Perception of their local environment• Private behavior (static)

• They are mobile agents :

• Declared before running

Dynamically created or destroyed :

Local memory(dynamically extensible)

Priority and SpeedPercepts of the environment

Behavior functionAgent skeleton

later

Page 6: Stéphane Vialle Stephane.Vialle@supelec.fr Eugen Dedu    Eugen.Dedu@prism.uvsq.fr

6

2 - ParCeL-5 Model: Basic Components4 basic components : Environment, Resources, Agent/Cell, Arbitrator

4 - The Arbitrator :

• A set of rules modeling the physical law of the environment

• Automatically applied: • when agents attempt to act• when environment is updated

• Manages all conflicts, with fairness and random choices

ArbitratorConflict ! Winneragent

Page 7: Stéphane Vialle Stephane.Vialle@supelec.fr Eugen Dedu    Eugen.Dedu@prism.uvsq.fr

7

2 - ParCeL-5 Model: Agent Behaviors

• Agents: Perceive their local environment Act on their local environment

• Actions on env.: move, take/drop objects, • Actions on agents: create/destroy other agents

• LOCAL actions

• Unlimited number of percepts• But any percept must be LOCAL

• Direct vision• Potential field detection, ….

Potential fielddetection

Direct vision

Agent Behavior:

Agent Percepts:

Agent actions:

Page 8: Stéphane Vialle Stephane.Vialle@supelec.fr Eugen Dedu    Eugen.Dedu@prism.uvsq.fr

8

2-ParCeL-5 Model: Cyclic Running

Step 1: Activation of agent behaviors, declaration of action intentions

Simulation beginning

Simulation end

Parallel initialisation step (environment, resources, percepts)

Step 2: Resolution of agent conflicts (by the arbitrator)

Step 4: Execution of parallel or sequential end-cycle function (user)

Step 5: Update of the environment and agent percepts

Sim

ulat

ion

loop

Step 3: Execution of actions of winners and non-conflicting agents

parallel sequential

Mainly Parallel

Page 9: Stéphane Vialle Stephane.Vialle@supelec.fr Eugen Dedu    Eugen.Dedu@prism.uvsq.fr

9

2-ParCeL-5 Model: Easy Situated MAS Developments

Behavior functions

ParCeL-5 model

UserAgent runConflict managementEnvironment updateCyclic running …Parallelization …

ParCeL-5 library

Page 10: Stéphane Vialle Stephane.Vialle@supelec.fr Eugen Dedu    Eugen.Dedu@prism.uvsq.fr

10

3 - Parallelization: Strategy• Domain partitioning strategy• SPMD paradigm• Multithreading implementation on shared memory

Synchronization barriers

Environment:domain

partitioning

Shared Memory

PE-0 PE-1 PE-2 PE-3

• Optimized parallel and sequential design of :• percept management• environment update

Classical

Specific and Optimized

Page 11: Stéphane Vialle Stephane.Vialle@supelec.fr Eugen Dedu    Eugen.Dedu@prism.uvsq.fr

11

3 - Parallelization: Wave Potential Field Propagation

Agent following an increasing potential pathAgent out potential field1

111

11

222

22

2 22

22 21

11

11

11

1

22

22

2

33

33

33

33

44

44 53

33

33

33

34

4 44

4

444

45

55

55

55

56

66

67

Potential field frontier

5 Medium source

7 Strong sourceObstacle

Potential propagation principles :

• Potentials emitted by resources (function of their features)• Spread, decrease, and bypass obstacles• Detected by agents (to avoid obstacles and reach resources)

• Fast and sufficient composition of potential fields (max( ) operator)

Page 12: Stéphane Vialle Stephane.Vialle@supelec.fr Eugen Dedu    Eugen.Dedu@prism.uvsq.fr

12

3 - Parallelization: Wave Potential Field PropagationParallelization :

• Automatic parallel use from agent behaviors

• Explicit parallel update:• Domain decomposition • Local propagation• Frontier sharing ; Re-propagation ; Until no change

• Several sequential algorithms Several complex combinations in parallel algorithm

Potentialfield

Potentialsource

Obstacle

P0slice

P1slice

FrontierComplex potential propagation

Page 13: Stéphane Vialle Stephane.Vialle@supelec.fr Eugen Dedu    Eugen.Dedu@prism.uvsq.fr

13

3 - Parallelization: Wave Potential Field Propagation

0

10

20

30

40

50

0 10 20 30 40 50Number of Processors

Spe

ed U

p vs

seq

. C Iterative & Recursive MixPure Iterative MethodS(P) = P

Ex : 1024x1024 boxes, 10000 resources, 0 obstacle, SGI-Origin2000

Breadth first recursive method: • most evolved, less efficiently implemented• re-propagation & numerous obstacles

Regular loop iterative method: • less evolved, most efficiently implemented• propagation re-propagation & numerous potential sources

02468

1012

0 2 4 6 8 10 12Number of Processors

Sp

ee

d U

p v

s s

eq

. C Iterative & Recursive Mix

Pure Iterative MethodS(P) = P

Page 14: Stéphane Vialle Stephane.Vialle@supelec.fr Eugen Dedu    Eugen.Dedu@prism.uvsq.fr

14

4 – Applications and Global Perfs

3 - Society of competitive selfish agents :Ishida – Yokoi – Kakazu, ECAL’99One agent : does nothing or cooperates = f(random, agent behaviors) How many cooperate ?

Same results than original simulationsCorrect situated MAS simulator

1 - Carrier robot simulation :1024 x 1024 boxes, 100 cycles10000 – 100000 agents Agents catch and carry some oresSearch efficient carrier population

S(32) = 15 (SGI)S(4) = 2.7 (SGI) – 3.5 (SUN)

Efficient parallel runs

% of cooperative agents

time

Stabilization phenomena

2 – Game of life (Conway) :Immobile agents …

Possible with ParCeL-5 !

Page 15: Stéphane Vialle Stephane.Vialle@supelec.fr Eugen Dedu    Eugen.Dedu@prism.uvsq.fr

15

5 - Conclusion and Future Works

Present results of ParCeL-5/ParSSAP:

• Good perfs : on high cost SGI-Origin2000: S(32) = 15 on small 4-processor SUN: S(4) = 3.5

• Allows quick developments of situated MAS

• Runs simulations with more than 100000 agents

• Open parallel programming model : vision, potential, …

In the future ….• Add direct communication between agents

• Add heuristic choice of wave propagation algorithms

• Continue to build large situated MAS for emergence search

• Optimize for low cost multiprocessor PC

Page 16: Stéphane Vialle Stephane.Vialle@supelec.fr Eugen Dedu    Eugen.Dedu@prism.uvsq.fr

16

ParCeL-5/ParSSAP: A Parallel Programming Model and

Library for Easy Development and Fast Execution of Simulations of Situated

Multi-Agent Systems

Questions ?