
From: AAAI Technical Report SS-99-02. Compilation copyright © 1999, AAAI (www.aaai.org). All rights reserved. Capture the Flag: Military Simulation Meets Computer Games Marc S. Atkin, David L. Westbrook and Paul R. Cohen Experimental Knowledge Systems Laboratory Department of Computer Science, LGRC,Box 34610 University of Massachusetts, Amherst, MA01003 {atkin,westy, cohen}@cs.umass.edu Abstract tOO. Someof the morecomplex AI testbeds are not that dif- This paper will describe a general framework for ferent from computergames. It seems that both sides, controlling agents, called Hierarchical Agent Control AI and game design, could profit from each other’s (HAC). Complementing it is a general simulator technology. Wego a first step in this direction by pre- physical processes, the Abstract Force Simulator (AFS). senting a very general agent control architecture (HAC: HACitself is a general skeleton for controlling agents. Hierarchical Agent Control), a toolkit for designing It can work with manykinds of simulators or even real- an action hierarchy. It supports action abstraction, life robots, as long as they adhere to a certain protocol. a multi-level computationalarchitecture, sensor inte- HACis written in CommonLisp. gration, and planning. It is particularly well suited to controlling large numbersof agents in dynamicen- vironments. Weconclude the paper with an example Hierarchical Agent Control of how HACwas applied to the game we use as our development domain: Capture the Flag. The problem HACsolves is providing a relative easy way to define the behavior of an agent. It can be viewed as a language for writing agent actions. HACtakes care Introduction of the mechanics of executing the code that controls an In the Experimental Knowledge Systems Laboratory, agent, passing messages between actions, coordinating we have developed a number of complex simulations. multiple agents, arbitrating resource conflicts between PHOENIX,a system that uses multiple agents to fight agents, updating sensor values, and interleaving cogni- fires in a realistic simulated environment,is perhaps the tive processes such as planning. best example (Cohen et al. 1989). We have also made One of the major issues in defining an action set for efforts to write general simulation substrates (Ander- an agent, and, arguably, one of the major issues in defin- son 1995; Atkin et al. 1998). Currently, we are work- ing any kind of intelligent behavior, is the problem of ing on creating a system, called COASTER,which will forming abstractions. No agent designer will want to allow army commanders to design and evaluate high specify the solution to a given problem in terms of prim- level plans ("courses of action") in a land-based cam- itive low-level actions and sensations. Instead, she will paign. Our domain is a variant of the game "Capture first build more powerful abstract actions, which encode the Flag." solutions to a range of problems, and use these actions It occurred to us that these simulators were just vari- when faced with a new problem. If a robot is supposed ations on a theme. Physical processes, military engage- to retrieve an object, we don’t want to give it individual ments, and a lot of computer games are all about agents commandsto move its wheels and its gripper; we want moving and applying force to one another (see, for ex- to give it a "pick-up" commandand have the robot fig- ample, (Tzu 1988) and (Karr 1981)). We therefore ure out what it needs to do. set ourselves the goal of constructing a domain-general HACsupports abstraction by providing the mecha- agent development toolkit and simulation substrate. nisms to construct a hierarchy of actions. In the hi- Regardless of the domain, agent designers must face erarchy, abstract actions are defined in terms of sim- the same kinds of problems: processing sensor informa- pler ones, ultimately grounding out in the agent’s ef- tion, reacting to a changing environment in a timely fectors. Although actions are abstract at higher lev- manner, integrating reactive and cognitive processes to els of the hierarchy, they are nonetheless executable. achieve an abstract goal, interleaving planning and ex- At the same time, the hierarchy implements a multi- ecution, distributed control, allowing code reuse within level computational architecture, allowing us, for ex- and across domains, and using computational resources ample, to have both cognitive and reactive actions efficiently. Since manygame developers are also agent within the same framework (Georgeff & Lansky 1987; designers, we think they could benefit from this toolkit, Cohenet al. 1989). The main part of HAC’sexecution module is an ac- Domain Mobile Offense tion queue. Any scheduled action gets placed on the Specific queue. The queue is sorted by the time at which the Actions 1 action will execute. Actions get taken off the queue and Harass executed until there are no more actions that are sched- uled to run at this time step. Actions can reschedule j’,, themselves, but in most cases, they will be rescheduled Physical Follow Attack when woken up by messages from their children. An Schemas 0 action is executed by calling its realize method. The realize method does not generally complete the action Move- o~lnt ... 1 on its first invocation; it just does what needs to be done on this tick. In most cases, an action’s realize method will be called manytimes before the action terminates. Primitive ly Wewill see an example of this later. Actions The Action Hierarchy Figure 1: Actions form a hierarchy; control information HACis a supervenient architecture (Spector & Hendler is passed down, messages and sensor integration occurs 1994). This means that it abides by the principle that bottom-up. higher levels should provide goals and context for the lower levels, and lower levels provide sensory reports and messages to the higher levels ("goals down, knowl- only be interested in whether or not the child termi- edge up"). A higher level cannot overrule the sensory nates. The parent can go to sleep while the child is information provided by a lower level, nor can a lower executing. In other cases, the parent may request peri- level interfere with the control of a higher level. Super- odic status reports from the child, and run concurrently venience structures the abstraction process; it allows with the child in order to take corrective measures. us to build modular, reusable actions. HACgoes a step The very lowest level of the hierarchy consists of very further in the simplification of the action-writing pro- primitive actions, like move and apply-force. These cess, by enforcing that every action’s implementation actions are little more than low-level robotic effectors; take the following form: they set the agent’s acceleration or attempt to do dam- 1. React to messages coming in from children. age to a neighboring agent. Using these primitives, we build a layer of slightly more complex, yet still domain- 2. Update state. general actions (called physical schemas (Atkin et al. 3. Schedule new child actions if necessary. 1998)), such as move-to-point, attack, and block. 4. Send messages up to parent. Above this layer we have domain-specific actions, if needed. It is interesting to note that as you go up the Let’s assume we wanted to build an action that allows hierarchy, the actions tend to deal with larger time and an agent to follow a movingtarget (see Figure 1). If space scales, and have more of a deliberative than a re- have a move-to-point action (which in turn uses the active character. But the transition to these cognitive primitive move), writing such an action is fairly easy. actions is a smooth one; no extra mechanismis needed Wecompute a direction that will cause us to intercept to implement them. the target. Then we compute a point a short distance along this vector, and schedule a child move-to-point action to move us there. We leave all the details of An Example Action Definition getting to this location, including such things as obsta- In the last section, we described in general terms how cle avoidance, up to the child. The child can send any actions are defined within HAC.This section will elu- kind of message up to its parent, including such things cidate the process using a concrete example and actual as status reports and errors. At the very least it will code. HACprovides a number of methods to make send a completion message (failure or success). When the process of writing actions easier. Across actions we the child completes, we compute a new direction vector must perform the same sort of tasks: generating mes- and repeat the process, until we are successful or give sages for the parent, advancing the action, etc. In HAC, up, in which case we send a message to our parent. actions are classes; each action defines a set of methods Note that the implementation of an action is left com- that address these tasks. pletely up to the user; she could decide to plan out all Figure 2 shows the implementation of a multi-agent the movementsteps in advance and simply schedule the action, swarm, which illustrates many of HAC’sfea- next one when the move-to-point child completes. Or tures. It is a simple action that causes a number of she could write a reactive implementation, as described agents to move around randomly within a circular re- above. Note also that every parent declares the set of gion. We use the simpler action move-to-point to messagesit is interested in receiving, essentially provid- implement this; it is invoked with the construct
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages5 Page
-
File Size-