1 / 42

Component-Based Agent Frameworks And SoccerBeans

This paper discusses the development techniques and specifications of a component-based agent framework for SoccerBeans, focusing on the design and integration of domain-specific components. The framework aims to simplify MAS design and provide a set of context-free components for agent development.

chrisc
Download Presentation

Component-Based Agent Frameworks And SoccerBeans

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Component-Based Agent Frameworks And SoccerBeans Hrishikesh J. Goradia CSCE 782 Fall 2003 University of South Carolina CSCE 782 – CBAF & SoccerBeans

  2. Component-Based Software Engineering Techniques Current Agent Framework Development Techniques Component-Based Agent Framework Component-Based Agent Framework CSCE 782 – CBAF & SoccerBeans

  3. Applications Domain specific Agent Framework CBAF specifications Development Environment Component Based Agent Framework Component-Based Agent Framework CSCE 782 – CBAF & SoccerBeans

  4. Applications Domain specific Agent Framework CBAF specifications Development Environment Component Based Agent Framework Component-Based Agent Framework • Components encapsulate the underlying complexities of the framework • Designing MAS using CBAF is simple • CBAF is domain-specific CSCE 782 – CBAF & SoccerBeans

  5. CBAF Specifications • Agent framework must be designed as a set of independent, self-contained, highly specialized components. • Commonalities of various applications in a domain must be discovered and developed as domain-specific components in the framework. • A component must be interface-centric and architecture-centric. • Components must be designed such that each performs a unique, singular function. Conversely, every function to be performed by an agent in a domain application must be defined as a component in the framework. CSCE 782 – CBAF & SoccerBeans

  6. CBAF Specifications • Framework designers must strive for the development of “context-free” components. • The agent framework must provide a look-up service for the agents. Message transport must be facilitated through event triggering. • The framework must facilitate the integration of its components to create different agent plans (also called as activities). It must also provide a way to compose these activities with the individual agents. • Agent framework must include the following types of components: • Agent component(s) • Activity component(s) • Decision components • Behavior components CSCE 782 – CBAF & SoccerBeans

  7. Behavior Components Decision Components kick dash spatial location catch AND move OR Activity 2 Activity 1 Activity n . . . Pool of Activities 1 n Agent component Activity component Individual Agent Sample CBAF Implementation (RoboCup domain) CSCE 782 – CBAF & SoccerBeans

  8. Behavior Components Decision Components kick dash spatial location catch AND move OR Activity 2 Activity 1 Activity n . . . Pool of Activities 1 n Agent component Activity component Individual Agent Sample CBAF Implementation (RoboCup domain) Behavior components • A behavior component must represent an agent’s action • Each rule set in a plan must be mapped to a behavior component • The framework must provide every possible atomic action for an agent in the particular domain as a behavior component CSCE 782 – CBAF & SoccerBeans

  9. Behavior Components Decision Components kick dash spatial location catch AND move OR Activity 2 Activity 1 Activity n . . . Pool of Activities 1 n Agent component Activity component Individual Agent Sample CBAF Implementation (RoboCup domain) Decision components • Represents a rule used during plan generation for an agent • The framework must facilitate the combining of various decision components to define new rules • The framework must include all the decision components to accommodate the creation of any rule for a plan CSCE 782 – CBAF & SoccerBeans

  10. Behavior Components Decision Components kick dash spatial location catch AND move OR Activity 2 Activity 1 Activity n . . . Pool of Activities 1 n Agent component Activity component Individual Agent Sample CBAF Implementation (RoboCup domain) Activity component(s) • Agent plans are generated as a concatenation of rules rooted by an Activity component • Interface between an agent component and it’s plans • Fully support the agent component capabilities. CSCE 782 – CBAF & SoccerBeans

  11. Behavior Components Decision Components kick dash spatial location catch AND move OR Activity 2 Activity 1 Activity n . . . Pool of Activities 1 n Agent component Activity component Individual Agent Sample CBAF Implementation (RoboCup domain) Agent component(s) • Represents an individual agent in the MAS • Knows how to locate and communicate with other agents in the system. • Defines the scheduling mechanism for handling its plans. • A user has to associate the agent component with plans to complete the agent design • Different agent architectures are represented as separate agent components in the framework CSCE 782 – CBAF & SoccerBeans

  12. Challenges for CBAF Design • Which components should we develop in the agent framework for a given domain? • The components have to be functionally independent, but they also rely on each other for accomplishing their tasks and hence should be interactive and cohesive. How do we achieve that? • How do we achieve component integration to create new components? • How do we deploy the whole system with multiple agents? CSCE 782 – CBAF & SoccerBeans

  13. RoboCup Domain • Simulated soccer • Based on a client/server architecture • Provides an environment that is • Complex • Distributed • Real-time • Collaborative • Adversarial CSCE 782 – CBAF & SoccerBeans

  14. Domain Analysis for CBAF Design (SoccerBeans) • Which components should we develop in the agent framework for a given domain? • All agents created as beans, have a scheduling mechanism that supports both BDI and Subsumption architectures • Agent component: PlayerFoundation bean • Only one architecture to be supported • Activity component: Activity bean • Decision criteria in different agent plans for various soccer teams • Decision components: DBallDistance, DSelfPosition, DClosePlayers, etc. • All agent actions • Behavior components: BDash, BDribble, BShoot, BMove, BTurn, etc. CSCE 782 – CBAF & SoccerBeans

  15. Domain Analysis for CBAF Design (SoccerBeans) • The components have to be functionally independent, but they also rely on each other for accomplishing their tasks and hence should be interactive and cohesive. How do we achieve that? • Java’s Delegation Event Model for event handling • Communication between adjacent components only • ActivityEvent event • Agent – Activity component communication • FunctionalityEvent event • Activity – Decision component communication • Activity – Behavior component communication • Decision – Behavior component communication CSCE 782 – CBAF & SoccerBeans

  16. Domain Analysis for CBAF Design (SoccerBeans) • How do we achieve component integration to create new components? CSCE 782 – CBAF & SoccerBeans

  17. Domain Analysis for CBAF Design (SoccerBeans) • How do we deploy the whole system with multiple agents? • Sun’s Bean Development Kit (BDK) provides a runtime environment for deploying live beans • Distributed programming issues handled by UDP sockets • One JVM per agent CSCE 782 – CBAF & SoccerBeans

  18. SoccerBeans – CBAF Implementation for RoboCup Domain • Uses the Sun’s JavaBeans technology • Agent component supports decision-making based on BDI and Subsumption architectures • SoccerBeans components - • Agent component • PlayerFoundation bean • Activity component • Activity bean • Decision components • DBallDistance, DBallPosition, DPlayerPosition, etc. • Behavior components • BDash, BKick, BTurn, BMove, etc. CSCE 782 – CBAF & SoccerBeans

  19. Agent and Activity Components for SoccerBeans CSCE 782 – CBAF & SoccerBeans

  20. Decision Components for SoccerBeans CSCE 782 – CBAF & SoccerBeans

  21. Decision Components for SoccerBeans CSCE 782 – CBAF & SoccerBeans

  22. Behavior Components for SoccerBeans CSCE 782 – CBAF & SoccerBeans

  23. Behavior Components for SoccerBeans CSCE 782 – CBAF & SoccerBeans

  24. A Sample Team CSCE 782 – CBAF & SoccerBeans

  25. Common Activities • All 11 players share the Observe and StartPlay activities • Observe incorporates the new sensory information from the server into the player’s world model • StartPlay is for relocating the player to its starting position before kickoff and after a goal CSCE 782 – CBAF & SoccerBeans

  26. Goalie • Goalie activities • Observe (5) • StartPlay (8) • Catch (10) • Pass (11) • GoalKick (5) • GotoPosition (9) • Used 50 components to create the goalie CSCE 782 – CBAF & SoccerBeans

  27. Goalie Activities • Catch activity for allowing the goalie to catch the ball • Pass allows the goalie to move to a corner on the penalty box after catching the ball, or kick the ball away CSCE 782 – CBAF & SoccerBeans

  28. Goalie Activities • GoalKick handles the “goal_kick_*” play mode • GotoPosition positions the goalie to the most appropriate position, based on the ball’s current position CSCE 782 – CBAF & SoccerBeans

  29. Defenders • Defender activities • Observe (5) • StartPlay (8) • Pass (8) • GotoPosition (25) • Used 47 components to create each defender CSCE 782 – CBAF & SoccerBeans

  30. Defender Activities • Defenders simply shoot the ball away towards the opponent’s half whenever possible through the Pass activity • GotoPosition activity CSCE 782 – CBAF & SoccerBeans

  31. Defensive Midfielders • Defensive midfielder activities • Observe (5) • StartPlay (8) • Dribble (6) • Pass (9) • GotoPosition (21) • Used 50 components to create each defensive midfielder CSCE 782 – CBAF & SoccerBeans

  32. Defensive Midfielder Activities • Midfielders dribble the ball whenever possible • Pass the ball if dribble is inappropriate CSCE 782 – CBAF & SoccerBeans

  33. Defensive Midfielder Activities • GotoPosition activity CSCE 782 – CBAF & SoccerBeans

  34. Offensive Players • Offensive player activities • Observe (5) • StartPlay (8) • Dribble (7) • Pass (8) • GotoPosition (13,13,11,15,15) • Used an average of 42 components to create each offensive player CSCE 782 – CBAF & SoccerBeans

  35. Offensive Player Activities • Dribble activity • Pass activity CSCE 782 – CBAF & SoccerBeans

  36. Offensive Midfielder Activities • GotoPosition activity for offensive midfielders CSCE 782 – CBAF & SoccerBeans

  37. Offensive Central Midfielder Activities • GotoPosition activity for offensive midfielders CSCE 782 – CBAF & SoccerBeans

  38. Forwards’ Activities • GotoPosition activity for forwards CSCE 782 – CBAF & SoccerBeans

  39. Testing and Results • Gamecocks beat Chikomalos 18-0! CSCE 782 – CBAF & SoccerBeans

  40. Improving SoccerBeans • SoccerBeans has a lot of scope for improvement • Decision beans concerning locations of other agents on the field • Inter-agent communication – “say” messages • Better dashing – use of “turn_neck” instead of “turn” wherever possible • Better kicking – tighter dribbling, better computation of “kick_power” CSCE 782 – CBAF & SoccerBeans

  41. Developing New Beans • Beans are just special Java classes! • Implement Serializable class • Define get/set accessor methods for its properties • All decision and behavior beans have similar structures • Differ only in their instance variables and implementations of decide() or behave() methods • Online references: • http://java.sun.com/docs/books/tutorial/javabeans/index.html • http://developer.java.sun.com/developer/onlineTraining/Beans/ CSCE 782 – CBAF & SoccerBeans

  42. Developing New Beans in SoccerBeans • Write the bean code • MyBean.java and MyBeanBeanInfo.java files • Save these files in the $PACKAGE_HOME/soccerbeans folder, $PACKAGE_HOME is where the soccerbeans package is extracted • Compile the complete package with the bean • From $PACKAGE_HOME, say javac soccerbeans/*.java regexp/*.java • Update the manifest file • Add the following to the soccerbeans.mft file Name: MyBean.class Java-Bean: True • Update the soccerbeans package • From $PACKAGE_HOME, say jar cfm soccerbeans.jar soccerbeans.mft soccerbeans/*.class regexp/*.class CSCE 782 – CBAF & SoccerBeans

More Related