Presentation is loading. Please wait.

Presentation is loading. Please wait.

SYSC5103 Software Agents RoboCup and BDI Architecture Fall 2006 Yousif Al Ridhawi Morvarid Sehatkar Walter Kung Gayathri Jayaraman.

Similar presentations


Presentation on theme: "SYSC5103 Software Agents RoboCup and BDI Architecture Fall 2006 Yousif Al Ridhawi Morvarid Sehatkar Walter Kung Gayathri Jayaraman."— Presentation transcript:

1 SYSC5103 Software Agents RoboCup and BDI Architecture Fall 2006 Yousif Al Ridhawi Morvarid Sehatkar Walter Kung Gayathri Jayaraman

2 Multi-Agent System and BDI Architecture; Jason and AgentSpeak(L); RoboCup; Design and Implementation of Jason Environment; Design and Implementation of soccer player behavior; Performance Results; Evaluate Jason as a BDI Programming system; Outline

3 Multi-Agent System and BDI Architecture Multi-agent system is the sub field of artificial intelligence, which studies systems involving multiple agents and their coordination. When a group of agents in a multi-agent system share a common long-term goal, they can be said to form a team. The BDI architecture is being widely used in dynamic and complex scenarios where agents may need to act under incomplete and incorrect information about other agents and the environment where they are situated. The BDI model has some philosophical basis in the Belief-Desire-Intention theory of human practical reasoning.

4 Jason and AgentSpeak(L) Jason is a Java-based platform for the development of multi-agent systems Jason is one of the interpreter for an extended version of AgentSpeak(L). AgentSpeak(L) is the abstract languages based on BDI architecture. AgentSpeak(L) maintains a set of beliefs and a set of plans. The set of beliefs represents the information an agent presently has about the world A plan is a sequence of steps the agent needs to execute in order to handle some perceived event. A AgentSpeak(L) plan has –A head: triggering event –A context: predicate for the plan to be considered applicable. –A body: a sequence of basic actions –head : context <- body –e.g. “+e : true <- !g”

5 RoboCup Soccer Server –Provides a virtual field that simulates all movements of a ball and players. –Send field information to Clients via UDP/IP socket. Soccer Monitor –Display graphical representation of the game. –Initial kick-off command. Clients –client controls movements of one player by sending commands through UDP/IP socket to the server.

6 Design and Implementation of Jason Environment

7 Communication between threads Activity Chart Send "Init" Add Perception to Jason init() Process Perception. Generate actions RoboCUP Server Thread NewBrain(n) Thread SoccerPlayer Jason receive team side s e n d t e a m i n f o Send player visual info executeAction handle the actions Send actionsProcess actions

8 Issues and Lessons Learned Issue: Perceptions were added before the previous action could be completed. Solution  Introduced a time delay between an action and the next perception received. Open Issue: In multiplayer environment, multiple threads (one for each player) access the same environment methods resulting in socket overwrite. Recommendation (from Jomi Hubner)  Use of Agent Architecture class (for each agent) instead of using environment class (Work in Progress) Open Issue: Lack of good explanation of the APIs and examples in Jason documentation. Open Issue: Debugging the code using breakpoints.

9 State Diagram for Soccer Player Behavior

10 AgentSpeak(L) Code //BELIEFS checking(ball). //PLANS // If the ball is not visible. go to checking(ball) state +ball(null) : true <- -ball(null); -ball(Dist, Dir, DistChang, DirChng); turn(40); +checking(ball); -checking(goal). // If kickOff occurs. +kickOff <- ?ball(Dist, Dir, DistChang, DirChng); -ball(Dist, Dir, DistChang, DirChng). // The ball Dir is not correct, turn to match dir +ball(Dist, Dir, DistChang, DirChng) : not (Dir = 0) & not checking(goal) <- -ball(null); turn(Dir). // If ball is out of reach, run toward it. +ball(Dist, Dir, DistChang, DirChng) : Dist > 1 <- -ball(null); -checking(goal); -ball(Dist, Dir, DistChang, DirChng); dash(Dist * 25);.wait(kickOff). // REACHBALL: The ball Dir is correct and dist is okay. Search for the goal +ball(Dist, Dir, DistChng, DirChng) : Dist <= 1 <-+checking(goal); !kick(goal); -ball(null). // Sub Goal 1: see goal, then kick ball +!kick(goal): goal(GDist, GDir, GDistChng, GDirChng) & checking(goal) <- kick(100, GDir); -goal(GDist, GDir, GDistChng, GDirChng); -checking(goal). // Sub Goal 2: do not see goal, then search for goal +!kick(goal): goal(null) & checking(goal) <- turn(40). // if I see the goal, that means is not goal(null) +goal(GDist, GDir, GDistChng, GDirChng) <--goal(null). // vice versa +goal(null) <--goal(GDist, GDir, GDistChng, GDirChng).

11 Time Comparison Jason Implementation vs Krislet Time(ms) for first goal in each Trial Run KrisletSoccerPlayer 539927 553976 455960 447955 4521019 465967 522915 4861014 507975 5141047

12 BDI Programming System Requirements The programming language has to be expressive –Able to describe the agent behavior without regarding how agent is implemented. Reasoning of system has to be flexible –Able to decide, moment by moment, which action to perform in the furtherance of its goals. Has to be responsive to the environment –Interpreter must be fast. –Must have correct response to all situations.

13 Expressive: AgentSpeak(L) describe agent using abstract notions. // FOUND BALL: The ball Dir is correct and dist is okay. Search for the goal +ball(Dist, Dir, DistChng, DirChng) : Dist <= 1 <- +checking(goal); !kick(goal); -ball(null). // Kick if the agent see the goal. +!kick(goal): goal(GDist, GDir, GDistChng, GDirChng) & checking(goal) <- kick(100, GDir); -goal(GDist, GDir, GDistChng, GDirChng); -checking(goal); +checking(ball). // Turn if the agent do not see the goal. +!kick(goal): goal(null) & checking(goal) <- turn(40).

14 Flexibility : Deliberate to Select Achievable Option. // Option 1: If the ball is in range, kick the ball +ball(Dist, Dir, DistChng, DirChng) : Dist <= 1 <- +checking(goal); !kick(goal); -ball(null). // Option 2: If the ball is in range, find goal +ball(Dist, Dir, DistChng, DirChng) : Dist <= 1 <- +checking(goal); !check(goal); -ball(null). // SubGoal 1: Kick ball to goal +!kick(goal): goal(GDist, GDir, GDistChng, GDirChng) & checking(goal) <- kick(100, GDir); -goal(GDist, GDir, GDistChng, GDirChng); -checking(goal). // SubGoal 2: Check the goal location +!check(goal): goal(null) & checking(goal) <- turn(40). The following perceptions are added –+ball(0.5, 0, 0, 0) –+goal(null) There are two options that could be triggered. –Option 1 has an unachievable sub goal (!kick(goal)) which required the goal location is known. –Option 2 has achievable sub-goal. (!check(goal)). The interpreter should pick option 2. However, Jason pick option 1 and generate the following error. –[ test1] Found a goal for which there is no applicable plan: –+!kick(goal) – @l__4[source(self)] +ball(Dist,Dir,DistChng,DirChng)[source(percept )] : (Dist <= 1) <- !kick(goal); -ball(null). : {Dist=1, Dir=0, DirChng=0, DistChng=0} –[test1] No fail event was generated for +!kick(goal)

15 Flexibility (cont’) // REACHBALL: The ball Dir is correct and dist is okay. Search for the goal +ball(Dist, Dir, DistChng, DirChng) : Dist <= 1 <- +checking(goal); !kick(goal); -ball(null). // SubGoal 1: kick ball to goal +!kick(goal): goal(GDist, GDir, GDistChng, GDirChng) & checking(goal) <- kick(100, GDir); -goal(GDist, GDir, GDistChng, GDirChng); -checking(goal). // SubGoal 2: check goal location +!kick(goal): goal(null) & checking(goal) <- turn(40). Jason was successful in picking the achievable plan if the condition is specified in the context part of the plan.

16 Responsive to the Environment // If ball is out of reach, run toward it. +ball(Dist, Dir, DistChang, DirChng) : Dist > 1 <- -ball(null); -ball(Dist, Dir, DistChang, DirChng); dash(Dist * 25). Jason handled goal as event. When event occurs, it triggers plans. Advantage: responds quickly to the environment. It behaves like reflex action. Disadvantage: there is no check whether the goal is accomplished or not. Jason does not respond to incomplete goal. RobuCupJason Send Perception Action ProcessingSend Command Before Kick-Off ball(20, 10, 0, 0) dash(500) Dash(500) and failed ball(20, 10, 0, 0) No response to the old perception

17 Conclusions Successfully implement soccer player in RoboCUP using BDI development framework. Noticeable performance difference in terms of speed between the Java code implementation of Krislet and the Jason version; Agent Speak(L) can express agent behavior using abstract notions; Jason BDI reasoning engine is not flexible with the option deliberation; Jason has no verification whether the goal has been accomplished;

18 Backup slide: Jason Environment

19 Backup slide: An interpretation cycle of an AgentSpeak(L) program


Download ppt "SYSC5103 Software Agents RoboCup and BDI Architecture Fall 2006 Yousif Al Ridhawi Morvarid Sehatkar Walter Kung Gayathri Jayaraman."

Similar presentations


Ads by Google