multi-agent systemseol/aiad/aulas/mas_sw.pdf10 jade vs. repast • jade is meant for building agent...
TRANSCRIPT
![Page 1: Multi-Agent Systemseol/AIAD/aulas/MAS_sw.pdf10 JADE vs. Repast • JADE is meant for building agent systems, but has no simulation infrastructure • Repast is meant for agent-based](https://reader034.vdocument.in/reader034/viewer/2022042319/5f08aec47e708231d4233675/html5/thumbnails/1.jpg)
1
Multi-Agent Systems Software Platforms/Frameworks
JADE
Repast
SAJaS
Jason
Jadex
Henrique Lopes Cardoso, DEI/FEUP, 2017
![Page 3: Multi-Agent Systemseol/AIAD/aulas/MAS_sw.pdf10 JADE vs. Repast • JADE is meant for building agent systems, but has no simulation infrastructure • Repast is meant for agent-based](https://reader034.vdocument.in/reader034/viewer/2022042319/5f08aec47e708231d4233675/html5/thumbnails/3.jpg)
3
JADE
• An open-source framework for developing multi-agent systems
• FIPA-compliant (http://www.fipa.org/)
• Written in JAVA, consists of an API with several packages
![Page 4: Multi-Agent Systemseol/AIAD/aulas/MAS_sw.pdf10 JADE vs. Repast • JADE is meant for building agent systems, but has no simulation infrastructure • Repast is meant for agent-based](https://reader034.vdocument.in/reader034/viewer/2022042319/5f08aec47e708231d4233675/html5/thumbnails/4.jpg)
4
JADE Architecture
Agent Management
System
Directory Facilitator
Agents
![Page 5: Multi-Agent Systemseol/AIAD/aulas/MAS_sw.pdf10 JADE vs. Repast • JADE is meant for building agent systems, but has no simulation infrastructure • Repast is meant for agent-based](https://reader034.vdocument.in/reader034/viewer/2022042319/5f08aec47e708231d4233675/html5/thumbnails/5.jpg)
5
JADE Main Features
• FIPA-compliant – Agent Platform – Agent Communication Language (ACL) – Interaction Protocols
• Distributed MAS
– Agents execute within containers (JVMs)
• Infrastructure
– Agent Management System (AMS) – Directory Facilitator (DF) – Message Transport System (MTS)
![Page 6: Multi-Agent Systemseol/AIAD/aulas/MAS_sw.pdf10 JADE vs. Repast • JADE is meant for building agent systems, but has no simulation infrastructure • Repast is meant for agent-based](https://reader034.vdocument.in/reader034/viewer/2022042319/5f08aec47e708231d4233675/html5/thumbnails/6.jpg)
6
JADE Agents
• 1 Agent = 1 Thread
• Agent mobility and cloning – Agents can migrate throughout containers
• Agents have behaviours – Tasks, executed concurrently
• Behaviour scheduling – Not preemptive, but “cooperative”
– Behaviours are executed in a “sequentially parallel” fashion
![Page 7: Multi-Agent Systemseol/AIAD/aulas/MAS_sw.pdf10 JADE vs. Repast • JADE is meant for building agent systems, but has no simulation infrastructure • Repast is meant for agent-based](https://reader034.vdocument.in/reader034/viewer/2022042319/5f08aec47e708231d4233675/html5/thumbnails/7.jpg)
7
JADE Agent Execution
![Page 8: Multi-Agent Systemseol/AIAD/aulas/MAS_sw.pdf10 JADE vs. Repast • JADE is meant for building agent systems, but has no simulation infrastructure • Repast is meant for agent-based](https://reader034.vdocument.in/reader034/viewer/2022042319/5f08aec47e708231d4233675/html5/thumbnails/8.jpg)
8
JADE Tools • Remote Monitoring Agent (JADE’s “GUI”)
• Dummy Agent
• Sniffer Agent
• Directory Facilitator GUI
• Introspector Agent
![Page 9: Multi-Agent Systemseol/AIAD/aulas/MAS_sw.pdf10 JADE vs. Repast • JADE is meant for building agent systems, but has no simulation infrastructure • Repast is meant for agent-based](https://reader034.vdocument.in/reader034/viewer/2022042319/5f08aec47e708231d4233675/html5/thumbnails/9.jpg)
9
http://repast.sourceforge.net/repast_3/
http://repast.sourceforge.net/
![Page 10: Multi-Agent Systemseol/AIAD/aulas/MAS_sw.pdf10 JADE vs. Repast • JADE is meant for building agent systems, but has no simulation infrastructure • Repast is meant for agent-based](https://reader034.vdocument.in/reader034/viewer/2022042319/5f08aec47e708231d4233675/html5/thumbnails/10.jpg)
10
JADE vs. Repast
• JADE is meant for building agent systems, but has no simulation infrastructure
• Repast is meant for agent-based simulations and not for developing multi-agent systems
• JADE is not a simulation framework: it has no scheduler, nor a notion of a "clock"
• Repast is not for building MAS, and is not FIPA compliant
• The agents within Repast are not the same kind of agents within JADE: both systems are designed for two entirely different purposes
![Page 11: Multi-Agent Systemseol/AIAD/aulas/MAS_sw.pdf10 JADE vs. Repast • JADE is meant for building agent systems, but has no simulation infrastructure • Repast is meant for agent-based](https://reader034.vdocument.in/reader034/viewer/2022042319/5f08aec47e708231d4233675/html5/thumbnails/11.jpg)
11
JADE vs. Repast
![Page 12: Multi-Agent Systemseol/AIAD/aulas/MAS_sw.pdf10 JADE vs. Repast • JADE is meant for building agent systems, but has no simulation infrastructure • Repast is meant for agent-based](https://reader034.vdocument.in/reader034/viewer/2022042319/5f08aec47e708231d4233675/html5/thumbnails/12.jpg)
12
Repast
• Agent-based modeling and simulation – An agent-based model (ABM) aims at simulating the actions and
interactions of autonomous agents with a view to assessing their effects on the system as a whole
• Recursive Porous Agent Simulation Toolkit (REPAST)
– Open-source framework for creating agent-based simulations
• Repast 3
– Three flavors: RepastJ, RepastPy, Repast.Net
• Repast Simphony
![Page 13: Multi-Agent Systemseol/AIAD/aulas/MAS_sw.pdf10 JADE vs. Repast • JADE is meant for building agent systems, but has no simulation infrastructure • Repast is meant for agent-based](https://reader034.vdocument.in/reader034/viewer/2022042319/5f08aec47e708231d4233675/html5/thumbnails/13.jpg)
13
Repast Features • Data collection and output
• Displaying agent interaction
![Page 14: Multi-Agent Systemseol/AIAD/aulas/MAS_sw.pdf10 JADE vs. Repast • JADE is meant for building agent systems, but has no simulation infrastructure • Repast is meant for agent-based](https://reader034.vdocument.in/reader034/viewer/2022042319/5f08aec47e708231d4233675/html5/thumbnails/14.jpg)
14
Repast Spaces • Purposes:
– Contain a collection of agents (spatial agents) – Define the spatial relationships of agents relative to each other
• Cellular
– Boundaries: Grid, Torus
– Shapes: rectangular, hexagonal
– Neighborhood: Von Neumann, Moore, rings (hexagonal)
• Network
• GIS
![Page 15: Multi-Agent Systemseol/AIAD/aulas/MAS_sw.pdf10 JADE vs. Repast • JADE is meant for building agent systems, but has no simulation infrastructure • Repast is meant for agent-based](https://reader034.vdocument.in/reader034/viewer/2022042319/5f08aec47e708231d4233675/html5/thumbnails/15.jpg)
15
Repast Simulations
• Discrete event simulator – Unit of time: tick – Events are scheduled for specific ticks
• Repast simulation
– Collection of agents – Model that sets up and controls the execution of agent actions according to a
schedule
• Schedule
– Execution of agent behaviors (actions) – Model actions, e.g. display updates, data recording, snapshots, …
![Page 16: Multi-Agent Systemseol/AIAD/aulas/MAS_sw.pdf10 JADE vs. Repast • JADE is meant for building agent systems, but has no simulation infrastructure • Repast is meant for agent-based](https://reader034.vdocument.in/reader034/viewer/2022042319/5f08aec47e708231d4233675/html5/thumbnails/16.jpg)
16
Repast GUI
• Repast 3
• Repast Simphony
![Page 17: Multi-Agent Systemseol/AIAD/aulas/MAS_sw.pdf10 JADE vs. Repast • JADE is meant for building agent systems, but has no simulation infrastructure • Repast is meant for agent-based](https://reader034.vdocument.in/reader034/viewer/2022042319/5f08aec47e708231d4233675/html5/thumbnails/17.jpg)
17
http://web.fe.up.pt/~hlc/doku.php?id=sajas
SAJaS Simple API for JADE-based Simulations
![Page 18: Multi-Agent Systemseol/AIAD/aulas/MAS_sw.pdf10 JADE vs. Repast • JADE is meant for building agent systems, but has no simulation infrastructure • Repast is meant for agent-based](https://reader034.vdocument.in/reader034/viewer/2022042319/5f08aec47e708231d4233675/html5/thumbnails/18.jpg)
18
SAJaS: why?
• JADE: – Multi-agent systems development – Not suited for multi-agent based simulation (MABS): scalability
• Repast:
– Agent-based simulation – Lack support for agent programming and multi-agent features
(communication, infrastructure, …)
• However:
– Need to simulate while developing a full-featured MAS, for testing purposes
![Page 19: Multi-Agent Systemseol/AIAD/aulas/MAS_sw.pdf10 JADE vs. Repast • JADE is meant for building agent systems, but has no simulation infrastructure • Repast is meant for agent-based](https://reader034.vdocument.in/reader034/viewer/2022042319/5f08aec47e708231d4233675/html5/thumbnails/19.jpg)
19
SAJaS Features
from the simulation scheduler point of view
![Page 20: Multi-Agent Systemseol/AIAD/aulas/MAS_sw.pdf10 JADE vs. Repast • JADE is meant for building agent systems, but has no simulation infrastructure • Repast is meant for agent-based](https://reader034.vdocument.in/reader034/viewer/2022042319/5f08aec47e708231d4233675/html5/thumbnails/20.jpg)
20
Usage
![Page 21: Multi-Agent Systemseol/AIAD/aulas/MAS_sw.pdf10 JADE vs. Repast • JADE is meant for building agent systems, but has no simulation infrastructure • Repast is meant for agent-based](https://reader034.vdocument.in/reader034/viewer/2022042319/5f08aec47e708231d4233675/html5/thumbnails/21.jpg)
21
SAJaS Overview JA
DE
Rep
ast
![Page 22: Multi-Agent Systemseol/AIAD/aulas/MAS_sw.pdf10 JADE vs. Repast • JADE is meant for building agent systems, but has no simulation infrastructure • Repast is meant for agent-based](https://reader034.vdocument.in/reader034/viewer/2022042319/5f08aec47e708231d4233675/html5/thumbnails/22.jpg)
22
Benchmark Scenario
• Service Consumer/Provider – 5 × 𝑛 providers; 2 × 𝑛 consumers (AllProv, ProvSel)
– DF, behaviours, FIPA-protocols, ACL, ontologies
Henrique Lopes Cardoso (2015). “SAJaS: Enabling JADE-Based Simulations”, Transactions on Computational Collective Intelligence XX, N.T. Nguyen et al. (Eds.), LNCS 9420, pp. 158-178, Springer.
![Page 23: Multi-Agent Systemseol/AIAD/aulas/MAS_sw.pdf10 JADE vs. Repast • JADE is meant for building agent systems, but has no simulation infrastructure • Repast is meant for agent-based](https://reader034.vdocument.in/reader034/viewer/2022042319/5f08aec47e708231d4233675/html5/thumbnails/23.jpg)
23
Main Advantages
• MABS programmer – has a rich set of multi-agent programming features offered by JADE
– may explore simulation-related features offered by the simulation infrastructure (e.g. Repast)
• Same implementation can be used both for simulation and deployment purposes – checkout MASSim2Dev
• Simulation performance gains in certain scenarios: high communication-to-computation ratio
![Page 24: Multi-Agent Systemseol/AIAD/aulas/MAS_sw.pdf10 JADE vs. Repast • JADE is meant for building agent systems, but has no simulation infrastructure • Repast is meant for agent-based](https://reader034.vdocument.in/reader034/viewer/2022042319/5f08aec47e708231d4233675/html5/thumbnails/24.jpg)
24
http://jason.sourceforge.net/
![Page 25: Multi-Agent Systemseol/AIAD/aulas/MAS_sw.pdf10 JADE vs. Repast • JADE is meant for building agent systems, but has no simulation infrastructure • Repast is meant for agent-based](https://reader034.vdocument.in/reader034/viewer/2022042319/5f08aec47e708231d4233675/html5/thumbnails/25.jpg)
25
Jason: interpreter for AgentSpeak
• Developing cognitive agents with the BDI (Beliefs-Desires-Intentions) architecture – Beliefs are information the agent has about the world – Desires are all the possible states of affairs that the agent might like to
accomplish – Intentions are the states of affairs that the agent has decided to work
towards
• Practical reasoning (directed towards actions): deliberation and
means-ends reasoning – Beliefs, goals, plans – AgentSpeak: a programming language for BDI agents guided by
practical reasoning – based on logic programming
![Page 26: Multi-Agent Systemseol/AIAD/aulas/MAS_sw.pdf10 JADE vs. Repast • JADE is meant for building agent systems, but has no simulation infrastructure • Repast is meant for agent-based](https://reader034.vdocument.in/reader034/viewer/2022042319/5f08aec47e708231d4233675/html5/thumbnails/26.jpg)
26
Jason/AgentSpeak Main Concepts
• Beliefs – Ako Prolog facts, which can be annotated
publisher(wiley).
colour(box1,blue)[source(bob)].
– Strong negation (no closed world assumption) ~colour(box1,white)[source(john)].
• Goals
– Achievement goals (!) !write(book)
– Test goals (?) ?publisher(P)
![Page 27: Multi-Agent Systemseol/AIAD/aulas/MAS_sw.pdf10 JADE vs. Repast • JADE is meant for building agent systems, but has no simulation infrastructure • Repast is meant for agent-based](https://reader034.vdocument.in/reader034/viewer/2022042319/5f08aec47e708231d4233675/html5/thumbnails/27.jpg)
27
Jason/AgentSpeak Main Concepts
• Plans trig_event : context <- body.
• Triggering events: changes in beliefs and in goals
• Context: applicability of the plan • Body: a course of action for addressing the
triggering event – Actions
» Environmental actions » Belief changes (mental notes) » Internal actions (.) do not change the
(physical) environment • Standard • User-defined
– (Sub)goals
![Page 28: Multi-Agent Systemseol/AIAD/aulas/MAS_sw.pdf10 JADE vs. Repast • JADE is meant for building agent systems, but has no simulation infrastructure • Repast is meant for agent-based](https://reader034.vdocument.in/reader034/viewer/2022042319/5f08aec47e708231d4233675/html5/thumbnails/28.jpg)
28
Jason Reasoning Cycle
![Page 29: Multi-Agent Systemseol/AIAD/aulas/MAS_sw.pdf10 JADE vs. Repast • JADE is meant for building agent systems, but has no simulation infrastructure • Repast is meant for agent-based](https://reader034.vdocument.in/reader034/viewer/2022042319/5f08aec47e708231d4233675/html5/thumbnails/29.jpg)
29
MAS and Environment • MAS configuration file:
• Simulated environment implementation: – Extend class jason.environment.Environment
MAS <name> {
infrastructure: [Centralised | Jade]
environment: <environment_simulation_class>
execuctionControl: <execution_control_class>
agents: <ag1>; …;
}
![Page 30: Multi-Agent Systemseol/AIAD/aulas/MAS_sw.pdf10 JADE vs. Repast • JADE is meant for building agent systems, but has no simulation infrastructure • Repast is meant for agent-based](https://reader034.vdocument.in/reader034/viewer/2022042319/5f08aec47e708231d4233675/html5/thumbnails/30.jpg)
30
• IDE: jEdit plugin
• MAS Console
• Mind Inspector
• Infrastructure: Jade – Jade Management Agent
– Jade Sniffer
Jason Tools
![Page 31: Multi-Agent Systemseol/AIAD/aulas/MAS_sw.pdf10 JADE vs. Repast • JADE is meant for building agent systems, but has no simulation infrastructure • Repast is meant for agent-based](https://reader034.vdocument.in/reader034/viewer/2022042319/5f08aec47e708231d4233675/html5/thumbnails/31.jpg)
31
http://www.activecomponents.org/
http://paginas.fe.up.pt/~eol/AIAD/jadex/doku.php
![Page 32: Multi-Agent Systemseol/AIAD/aulas/MAS_sw.pdf10 JADE vs. Repast • JADE is meant for building agent systems, but has no simulation infrastructure • Repast is meant for agent-based](https://reader034.vdocument.in/reader034/viewer/2022042319/5f08aec47e708231d4233675/html5/thumbnails/32.jpg)
32
Jadex BDI
• Jadex BDI is an agent-oriented reasoning engine for writing rational agents
• Agents represent active components with individual reasoning capabilities
• Agents can exhibit reactive behavior (responding to external events) as well as pro-active behavior (motivated by the agents own goals)
![Page 33: Multi-Agent Systemseol/AIAD/aulas/MAS_sw.pdf10 JADE vs. Repast • JADE is meant for building agent systems, but has no simulation infrastructure • Repast is meant for agent-based](https://reader034.vdocument.in/reader034/viewer/2022042319/5f08aec47e708231d4233675/html5/thumbnails/33.jpg)
33
Beliefs, Goals and Plans
• BDI – Beliefs capture informational attitudes, desires capture motivational
attitudes, and intentions capture deliberative attitudes of agents
• Execution model for software agents: beliefs, goals, and plans – Agents have beliefs (Java objects stored in a belief base)
– Goals represent motivations (e.g. states to be achieved) that influence an agent’s behavior.
– To achieve its goals the agent executes plans
![Page 34: Multi-Agent Systemseol/AIAD/aulas/MAS_sw.pdf10 JADE vs. Repast • JADE is meant for building agent systems, but has no simulation infrastructure • Repast is meant for agent-based](https://reader034.vdocument.in/reader034/viewer/2022042319/5f08aec47e708231d4233675/html5/thumbnails/34.jpg)
34
Jadex Agent Abstract Architecture
![Page 35: Multi-Agent Systemseol/AIAD/aulas/MAS_sw.pdf10 JADE vs. Repast • JADE is meant for building agent systems, but has no simulation infrastructure • Repast is meant for agent-based](https://reader034.vdocument.in/reader034/viewer/2022042319/5f08aec47e708231d4233675/html5/thumbnails/35.jpg)
35
Jadex Active Components
• Extension of the Service Component Architecture (SCA) – Components as active entities – agents – acting as service providers
and consumers
• Communication is done using service invocations
![Page 36: Multi-Agent Systemseol/AIAD/aulas/MAS_sw.pdf10 JADE vs. Repast • JADE is meant for building agent systems, but has no simulation infrastructure • Repast is meant for agent-based](https://reader034.vdocument.in/reader034/viewer/2022042319/5f08aec47e708231d4233675/html5/thumbnails/36.jpg)
36
Asynchronous Programming • Asynchronous programming is the basis of the Jadex active components
programming model
– Synchronous call
– Asynchronous call
![Page 37: Multi-Agent Systemseol/AIAD/aulas/MAS_sw.pdf10 JADE vs. Repast • JADE is meant for building agent systems, but has no simulation infrastructure • Repast is meant for agent-based](https://reader034.vdocument.in/reader034/viewer/2022042319/5f08aec47e708231d4233675/html5/thumbnails/37.jpg)
37
Jadex EnvSupport (Spaces)
• Agent applications consist not only of agents but also of an environment where the agents are situated in
![Page 38: Multi-Agent Systemseol/AIAD/aulas/MAS_sw.pdf10 JADE vs. Repast • JADE is meant for building agent systems, but has no simulation infrastructure • Repast is meant for agent-based](https://reader034.vdocument.in/reader034/viewer/2022042319/5f08aec47e708231d4233675/html5/thumbnails/38.jpg)
38
Jadex Control Center