Page 7: Agent
Architecture
Contributed by Lisa Anthony
Revised by Xuan Thuy Tran
[Go back to Page 6: Communications Superstructure | Go on to Page 8: Agent Intelligence]
1 OverviewThe Agent(s) are autonomous units representing players in the game, from which the Engine receives the commands to update the world game state. Agent(s) use a Communication protocol (discussed in the Communications Superstructure section) which they use to send and receive messages to and from the main game engine, or Referee. They use their Heuristic (discussed in the Agent Intelligence section) to compare actions to take, and tell these actions to the Referee Engine (discussed in the Acquire Engine Architecture section). The Agent(s) are instantiated on separate machines and told where to find the game "server", or Controller (discussed in the User-Interaction Interface System section), thus allowing the system to be run in a distributed fashion so the Agents can plan while the other Agents take their turn.
2 Agent Architecture
Here is given a summary of the connections and communications that occur from an Agent's point of view during game play. The Agent begins running on its own machine, and is told where to locate the Controller (analogous to a game server in this example). The Controller assigns the Agent a number based on its "connect order" (1st, 2nd, 3rd, etc), and transmits the information about the type of Heuristic the Agent must instantiate and use, which the system's user has already set up via his/her input to the system Controller. The Agent can then retrieve the location of the Referee Engine. It "subscribes" to that engine via an Agent Connector, thereafter receiving any broadcast messages from the Referee concerning world state updates or personal messages from the Referee during its own turn. The Agent uses its Heuristic to evaluate the state of the world given by the Referee Engine and determine the appropriate Actions during the course of the game.
4 Acquire Agent Class StructureAgent: the autonomous program which represents
a Player in the game of Acquire
|
Fields: heuristic :: the name of the Heuristic which this Agent uses Methods: main( ) :: executable method to allow this Agent to be instantiated and run on a separate machine from the "referee"; it connects to the "controller" and waits for the game to begin Agent (string controller) :: constructor of the Agent class; the argument "controller" tells the Agent where to find the main game "server" getHeuristic( ) :: returns the name of the Heuristic which this Agent uses |
5 Class Relationship
Diagram
Figure 5-1: The UML Diagram for the Agent Architecture.
[Go back to Page 6: Communications Superstructure | Go on to Page 8: Agent Intelligence]