Upload
tomas-jukin
View
194
Download
0
Tags:
Embed Size (px)
Citation preview
Tomáš Jukin@Inza
Multi-Agent Systems on Arduino & iOS
Znáte Half-Life?
Table
Robot
Tomáš Jukin@Inza
www.juicymo.cz@JuicymoCZ
Tomáš Jukin@Inza
Tomáš Jukin@Inza
#MachineRoomat #DevFestCZ
MachineRoom
Movement Agent
Movement Agent
Turning Agent
Movement Agent
Turning Agent
Border Agent
When to use MAS?And for what?
When to use MAS?
“When the solution is complex algorithm …”
When to use MAS?
“… which is difficult / impossible to
design or code”
When to use MAS?
Lets split complex behavior to simple
agents
HOW to use MAS?
A) MANY agents in ONE robot form population of ONE robot !
B) ONE agent per ONE robot form population of MANY robots
A) MANY agents per robot !
B) ONE agent per robot, MANY robots
HOW to use MAS?
A) MAS controls one robot !
B) MAS controls MANY robots
HOW to use MAS?
Today I will talk about A)
MANY agents in ONE robot form population of ONE robot
MAS controls one robot
HOW to use MAS?
When to use MAS?
Agents do not need to know HOW to solve the
problem
When to use MAS?
Let them accumulate money instead ;)
(for example)
When to use MAS?
Let the emergence do the dirty work for us!
Any dangers?
Emergence is not a cute girl…
To tune it properly can be tricky…
Examples?
Airplane navigationRobot control
Network diagnosticsPredictive systems
Simulations
Computer Games AI
MASculptor
Leden 2014Objective-C
Open Source
MASculptor
example screenshots, few infoiOS agnostic
demo iOS6 only
Swift
What is an agent?
Co je to agent?
Agent je entita zkonstruována za účelem kontinuálně a do jisté míry autonomně plnit své cíle v adekvátním prostředí na základě vnímání prostřednictvím senzorů a prováděním akcí prostřednictvím aktuátorů. Agent přitom ovlivňuje podmínky v prostředí tak, aby se přibližoval k plnění cílů.
“
”
Co je to agent?
Agent je entita zkonstruována za účelem kontinuálně a do jisté míry autonomně plnit své cíle v adekvátním prostředí na základě vnímání prostřednictvím senzorů a prováděním akcí prostřednictvím aktuátorů. Agent přitom ovlivňuje podmínky v prostředí tak, aby se přibližoval k plnění cílů.
“
”
Co je to agent?
Agent Prostředí
Senzory
Aktuátory
Co je to agent?
Agent Prostředí
Senzory
Aktuátory
Vnitřní architektura
Znalostní báze
Řídíci jednotka
Rozdíl je ve vnitřní architektuře
Agent Prostředí
Senzory
Aktuátory
Vnitřní architektura
Naive(communicating)
agentReactive
agent
Deliberative(planning)
agent
Hybridagent
(reactive + planning)
performReasoning() { // ...
}
WorldState1 -> Action1 WorldState2 -> Action2 WorldState3 -> Action3 else -> idle
Behavior Pattern TableAbstract Method
Desire > Goal > Intents > Plan > Steps
1) Generate (choose) Plan 2) Execute
Reactive + DeliberativeWorldState1 -> Action1 WorldState2 -> Action2 WorldState3 -> Action3 else -> Deliberative
1) Generate (choose) Plan 2) Execute
What is an MAS?
What is MAS?
Multi-Agent System is a system which uses group or population of agents interacting with environment in order to achieve global goal. Typically individual agents do not have a clue about the global goal. They have their own goals. The global goal is achieved by emergence.
What is MAS?
Multi-Agent System is a system which uses group or population of agents interacting with environment in order to achieve global goal. Typically individual agents do not have a clue about the global goal. They have their own goals. The global goal is achieved by emergence.
#Probee Robot
#Probee Robot
3x UltraSonic Sensor (Forward / Backward / Turret)
4x DC Motor
1x Motor Controller (Left / Right)
1x Arduino UNO (= brain)
1x Bluetooth Module
1x 2x16 I2C LCD (= status display)
MachineRoom
How our MAS in #Probee Robot works?
MAS in #Probee RobotWritten in Wiring/Processing (C dialect)Running on 8bit processor32KB program memory, 2KB RAM
Concurrency vs. Parallelism
Parallelism
time →
Parallelism
Agent 1
Agent 2
Agent 3time →
Parallelism
Agent 1
Agent 2
Agent 3
How much work can be done in parallel? !
Every agent…time →
Concurrency
time →
Concurrency
time →
Agent 1
Agent 2
Agent 3
Concurrency
time →
Agent 1
Agent 2
Agent 3
How much work is actually computed in parallel? !
Only one (serialization)
MAS in #Probee RobotWritten in Wiring/Processing (C dialect)Running on 8bit processor32KB program memory, 2KB RAM
MAS in #Probee RobotWritten in Wiring/Processing (C dialect)Running on 8bit processor32KB program memory, 2KB RAM
Parallelism
4
MAS in #Probee RobotWritten in Wiring/Processing (C dialect)Running on 8bit processor32KB program memory, 2KB RAM
Parallelism
4Concurrency
1 (serialization)
MAS in #Probee RobotWritten in Wiring/Processing (C dialect)Running on 8bit processor32KB program memory, 2KB RAM
Parallelism
4Concurrency
1 (serialization)
Agents
4
A1StopperAgent
A1StopperAgent
A2Communicating
Agent
A1StopperAgent
A2Communicating
Agent
A3PlannerAgent
A1StopperAgent
A2Communicating
Agent
A3PlannerAgent
A4Movement
Agent
Stop when collision would
happen
Connect with user
(send sensor data, receive motor data)
“Plan” the next action
Control movement based on orders
from A2/A3
A1 Stopper
A2 Communicator
A3 Planner A4 Mover
Environment
Sensors
Actuators
Sensors
Actuators
Sensors
Actuators
Sensors
Actuators
A1 Stopper
A2 Communicator
A3 Planner A4 Mover
Sensors
Actuators
Sensors
Actuators
Sensors
Actuators
Sensors
Actuators
Environment
Blackboard MotorsBluetooth
a1_vars
a2_vars a4_varsUltrasonic Sensors
a3_vars
MAS run even on places you do not expect!M
Anyone can make Software, try Hardware as well!A
Seize the opportunity and make your MAS today!S
M
A
M
S
A
M
S
A
MAS run even on places you do not expect!M
S
Anyone can make Software, try Hardware as well!A
MAS run even on places you do not expect!M
Seize the opportunity and make your MAS today!S
Anyone can make Software, try Hardware as well!A
MAS run even on places you do not expect!M
Interested?
Build or ImplementYOUR own MAS!
You can start right now……with any language…
…or on Arduino!
Questions?
Photo Credits
All photos used are CC from Flickr!