Upload
juan-a-suarez-romero
View
686
Download
2
Tags:
Embed Size (px)
DESCRIPTION
Presentation at IAT 2006
Citation preview
An add-on for managing behaviours with priority in JADE
Juan A. Suárez-RomeroAmparo Alonso-BetanzosBertha Guijarro-Berdiñas
Laboratory for Research and Development in Artificial Intelligence
Department of Computer Science, University of A Coruña, Spain
IAT 2006 2
A n a d d – o n f o r m a n a g i n g b e h a v i o u r s w i t h p r i o r i t y i n J A D E
Hong Kong
JADE
• Java Agent DEvelopment Framework
• FIPA compliant
• Agent tasks encapsulated in Behaviours
.
.
.public void action();
public boolean done();...
IAT 2006 3
A n a d d – o n f o r m a n a g i n g b e h a v i o u r s w i t h p r i o r i t y i n J A D E
Hong Kong
JADE
• Behaviours can be formed by smaller sub-behaviours– Parallel scheduling– Sequential scheduling
.
.
.public void action();
public boolean done();...
.
.
.public void action();
public boolean done();...
.
.
.public void action();
public boolean done();...
.
.
.public void action();
public boolean done();...
IAT 2006 4
A n a d d – o n f o r m a n a g i n g b e h a v i o u r s w i t h p r i o r i t y i n J A D E
Hong Kong
ParallelBehaviour
• Executes children in a parallel way
B1 B2 B3 B4
ParallelBehaviour
IAT 2006 5
A n a d d – o n f o r m a n a g i n g b e h a v i o u r s w i t h p r i o r i t y i n J A D E
Hong Kong
ParallelBehaviour
• Executes children in a parallel way
B1 B2 B3 B4
ParallelBehaviour
IAT 2006 6
A n a d d – o n f o r m a n a g i n g b e h a v i o u r s w i t h p r i o r i t y i n J A D E
Hong Kong
SequentialBehaviour
• Executes children in a sequential way
B1 B2 B3 B4
SequentialBehaviour
IAT 2006 7
A n a d d – o n f o r m a n a g i n g b e h a v i o u r s w i t h p r i o r i t y i n J A D E
Hong Kong
SequentialBehaviour
• Executes children in a sequential way
B1 B2 B3 B4
SequentialBehaviour
IAT 2006 8
A n a d d – o n f o r m a n a g i n g b e h a v i o u r s w i t h p r i o r i t y i n J A D E
Hong Kong
SequentialBehaviour
• Executes children in a sequential way
B1 B2 B3 B4
SequentialBehaviour
IAT 2006 9
A n a d d – o n f o r m a n a g i n g b e h a v i o u r s w i t h p r i o r i t y i n J A D E
Hong Kong
Behaviours with priority
• Each Behaviour are assigned with a priority
• Priority is a positive number
• The lesser the number, the greater the priority
• Two priorities
– Static priority: assigned by the user
– Dynamic priority: used only by the
ParallelPriorityBehaviour
IAT 2006 10
A n a d d – o n f o r m a n a g i n g b e h a v i o u r s w i t h p r i o r i t y i n J A D E
Hong Kong
ParallelPriorityBehaviour
• Executes children in a parallel way
B1 B2 B3 B4
2 1 0 1
2 1 0 1
ParallelPriorityBehaviour
IAT 2006 11
A n a d d – o n f o r m a n a g i n g b e h a v i o u r s w i t h p r i o r i t y i n J A D E
Hong Kong
ParallelPriorityBehaviour
• Executes children in a parallel way
B1 B2 B3 B4
2 1 0 1
2 1 0 1
ParallelPriorityBehaviour
IAT 2006 12
A n a d d – o n f o r m a n a g i n g b e h a v i o u r s w i t h p r i o r i t y i n J A D E
Hong Kong
ParallelPriorityBehaviour
• Executes children in a parallel way
B1 B2 B3 B4
2 1 0 1
1 0 0 0
ParallelPriorityBehaviour
IAT 2006 13
A n a d d – o n f o r m a n a g i n g b e h a v i o u r s w i t h p r i o r i t y i n J A D E
Hong Kong
ParallelPriorityBehaviour
• Executes children in a parallel way
B1 B2 B3 B4
2 1 0 1
1 1 0 0
ParallelPriorityBehaviour
IAT 2006 14
A n a d d – o n f o r m a n a g i n g b e h a v i o u r s w i t h p r i o r i t y i n J A D E
Hong Kong
ParallelPriorityBehaviour
• Executes children in a parallel way
B1 B2 B3 B4
2 1 0 1
1 1 0 1
ParallelPriorityBehaviour
IAT 2006 15
A n a d d – o n f o r m a n a g i n g b e h a v i o u r s w i t h p r i o r i t y i n J A D E
Hong Kong
ParallelPriorityBehaviour
• Executes children in a parallel way
B1 B2 B3 B4
2 1 0 1
0 0 0 0
ParallelPriorityBehaviour
IAT 2006 16
A n a d d – o n f o r m a n a g i n g b e h a v i o u r s w i t h p r i o r i t y i n J A D E
Hong Kong
ParallelPriorityBehaviour
• Executes children in a parallel way
B1 B2 B3 B4
2 1 0 1
2 0 0 0
ParallelPriorityBehaviour
IAT 2006 17
A n a d d – o n f o r m a n a g i n g b e h a v i o u r s w i t h p r i o r i t y i n J A D E
Hong Kong
SequentialPriorityBehaviour
• Executes children in a sequential way
• Policy regarding blocked children
B1 B2 B3 B4
2 1 0 1
SequentialPriorityBehaviour
IAT 2006 18
A n a d d – o n f o r m a n a g i n g b e h a v i o u r s w i t h p r i o r i t y i n J A D E
Hong Kong
SequentialPriorityBehaviour
• Executes children in a sequential way
• Policy regarding blocked children
B1 B2 B3 B4
2 1 0 1
SequentialPriorityBehaviour
IAT 2006 19
A n a d d – o n f o r m a n a g i n g b e h a v i o u r s w i t h p r i o r i t y i n J A D E
Hong Kong
SequentialPriorityBehaviour
• Executes children in a sequential way
• Policy regarding blocked children
B1 B2 B3 B4
2 1 0 1
SequentialPriorityBehaviour
IAT 2006 20
A n a d d – o n f o r m a n a g i n g b e h a v i o u r s w i t h p r i o r i t y i n J A D E
Hong Kong
SequentialPriorityBehaviour
• Executes children in a sequential way
• Policy regarding blocked children
B1 B2 B3 B4
2 1 0 1
SequentialPriorityBehaviour
IAT 2006 21
A n a d d – o n f o r m a n a g i n g b e h a v i o u r s w i t h p r i o r i t y i n J A D E
Hong Kong
SequentialPriorityBehaviour
• Executes children in a sequential way
• Policy regarding blocked children
B1 B2 B3 B4
2 1 0 1
SequentialPriorityBehaviour
IAT 2006 22
A n a d d – o n f o r m a n a g i n g b e h a v i o u r s w i t h p r i o r i t y i n J A D E
Hong Kong
Example of application
• Agent that uses its full time
– In normal time, it executes several specific tasks
– When it is idle (i.e. these tasks can not be executed)
it runs other tasks of maintenance.
Specific Tasks Idle Tasks
IAT 2006 23
A n a d d – o n f o r m a n a g i n g b e h a v i o u r s w i t h p r i o r i t y i n J A D E
Hong Kong
Example of application
• Encapsulate specific tasks and idle tasks in two different ParallelPriorityBehaviour
ST1
p1
ST2
p2
ST3
p3
IT1
p1
IT2
p2
IT3
p3
IAT 2006 24
A n a d d – o n f o r m a n a g i n g b e h a v i o u r s w i t h p r i o r i t y i n J A D E
Hong Kong
Example of application
• Insert both parallel behaviours in a SequentialPriorityBehaviour with priorities 1 and 2, and policy to skip blocked behaviours
ST1
p1
ST2
p2
ST3
p3
IT1
p1
IT2
p2
IT3
p3
SequentialPriorityBehaviour
1 2
IAT 2006 25
A n a d d – o n f o r m a n a g i n g b e h a v i o u r s w i t h p r i o r i t y i n J A D E
Hong Kong
Summary
• Two new priority-based scheduler
Behaviours are proposed
– ParallelPriorityBehaviour
– SequentialPriorityBehaviour
• They are able to run as the current
scheduler implementations
An add-on for managing behaviours with priority in JADE
Juan A. Suárez-RomeroAmparo Alonso-BetanzosBertha Guijarro-Berdiñas
Laboratory for Research and Development in Artificial Intelligence
Department of Computer Science, University of A Coruña, Spain