160 likes | 307 Views
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 Stephane.Vialle@supelec.fr
E N D
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 VialleStephane.Vialle@supelec.fr Eugen Dedu Eugen.Dedu@prism.uvsq.fr Claude Timsit Claude.Timsit@prism.uvsq.fr
?? C-library …. 1 - Motivations 1 - 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
2D-Grid 2D-Torus 4-connectivity 8-connectivity 2 - ParCeL-5 Model: Basic Components 4 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
Mines Factories 2 - ParCeL-5 Model: Basic Components 4 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
Local memory (dynamically extensible) Priority and Speed Percepts of the environment Behavior function later 2 - ParCeL-5 Model: Basic Components 4 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 : Agent skeleton
Winner agent Conflict ! Arbitrator 2 - ParCeL-5 Model: Basic Components 4 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
Potential field detection Direct vision 2 - ParCeL-5 Model: Agent Behaviors Agent Behavior: • Agents: Perceive their local environment • Act on their local environment Agent Percepts: • Unlimited number of percepts • But any percept must be LOCAL • Direct vision • Potential field detection, …. Agent actions: • Actions on env.: move, take/drop objects, • Actions on agents: create/destroy other agents • LOCAL actions
2-ParCeL-5 Model: Cyclic Running Simulation beginning parallel sequential Parallel initialisation step (environment, resources, percepts) Step 1: Activation of agent behaviors, declaration of action intentions Step 2: Resolution of agent conflicts (by the arbitrator) Simulation loop Step 3: Execution of actions of winners and non-conflicting agents Step 4: Execution of parallel or sequential end-cycle function (user) Step 5: Update of the environment and agent percepts Simulation end Mainly Parallel
Agent run Conflict management Environment update Cyclic running … Parallelization … User ParCeL-5 model ParCeL-5 library Behavior functions 2-ParCeL-5 Model: Easy Situated MAS Developments
Shared Memory PE-0 PE-1 PE-2 PE-3 3 - Parallelization: Strategy • Domain partitioning strategy • SPMD paradigm • Multithreading implementation on shared memory Classical Environment: domain partitioning Synchronization barriers • Optimized parallel and sequential design of : • percept management • environment update Specific and Optimized
Agent following an increasing potential path 1 2 1 Agent out potential field 1 1 2 3 2 2 3 4 3 1 5 3 4 4 2 1 1 2 1 Obstacle 4 5 6 5 3 2 1 2 3 2 1 6 5 6 5 3 2 3 4 3 2 1 4 Strong source 7 7 4 5 6 5 4 3 2 3 4 4 3 2 1 5 Medium source 3 4 5 4 3 2 1 2 3 4 3 2 1 5 Potential field frontier 3 - Parallelization: Wave Potential Field Propagation • 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)
Parallelization : • Automatic parallel use from agent behaviors • Explicit parallel update: • Domain decomposition • Local propagation • Frontier sharing ; Re-propagation ; Until no change Frontier Complex potential propagation P0 slice Potential field P1 slice Potential source Obstacle 3 - Parallelization: Wave Potential Field Propagation • Several sequential algorithms • Several complex combinations in parallel algorithm
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 3 - Parallelization: Wave Potential Field Propagation Ex : 1024x1024 boxes, 10000 resources, 0 obstacle, SGI-Origin2000
1 - Carrier robot simulation : • 1024 x 1024 boxes, 100 cycles • 10000 – 100000 agents • Agents catch and carry some ores • Search efficient carrier population • S(32) = 15 (SGI) • S(4) = 2.7 (SGI) – 3.5 (SUN) Efficient parallel runs % of cooperative agents time 4 – Applications and Global Perfs • 2 – Game of life (Conway) : • Immobile agents … • Possible with ParCeL-5 ! • 3 - Society of competitive selfish agents : • Ishida – Yokoi – Kakazu, ECAL’99 • One agent : does nothing or cooperates = f(random, agent behaviors) • How many cooperate ? • Same results than original simulations • Correct situated MAS simulator Stabilization phenomena
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
ParCeL-5/ParSSAP: A Parallel Programming Model and Library for Easy Development and Fast Execution of Simulations of Situated Multi-Agent Systems Questions ?