In game development and similarly in other dynamic software projects, scrum is the dominating approach [14, 9] for developing products in a managed way. The scrum process model is based on the agile philosophy, supporting alterations to the product late in the project; a situation often required in game development. “scrum for games” , an approach specifically adjusted for games, discusses four phases which partition the development, i.e. concept, pre-production, production, post-production. The phases have defined milestone points that are generated at the start of each project. Even for non-industrial game development or game AI design, process models are useful. They provide a common framework that can support the integrating different parties into a shared project that converges on a common goal. However, “scrum for games” is described only on a high abstraction level not aiding the design of specific game components such as the game AI system. In contrast to scrum
which focuses only on a high-level approach, game character development requires the integration of lower level design and approaches as well. Thus, for story generation which often includes the low level design of character AI driving the story, an approach is needed that integrates both high and low level design. This paper introducesAgile Behaviour Design (A-BeD) an agile design methodology that embeds both levels into its approach including the need for a better author integration. The approach also provides another solution to the authoring problem for interactive storytelling . Traditional game development phases impact and direct the creative process and freedom of designers and influence the system design. The more mature the system or game becomes, the more restrictive are deviations from the initial design. Thus, features need to be known early and should not emerge late in the design. This affects character and interaction design massively as alterations to them emerge during interacting with the system and user testing. In those instances, A-BeD can support the process and the development of behaviour-based agent AI responsible for creating dynamic and ”living” stories.
2 Background & Related Work
A-BeD is based on the Behavior-Oriented Design (bod) methodology, a top-down analysis of a desired behaviour combined with a bottom-up generation of plans and a behaviour library111Behaviour plans are designed to be human readable/amendable. The behaviour library is compiled game engine or agent framework specific program code.. The bod top-down analysis starts with the definition of a high-level task the agent wants to achieve, an undertaking for generating a single agent in a well-defined environment by an expert. Next, the plans are built bottom-up by implementing primitives and enriching the behaviour plan. Primitives are clustered into behaviours according to their usage of shared memory/state objects. New goals and sub-trees are added until the agent is capable of performing the initially defined task. An existing systems analysis, comparing three Intelligent Virtual Agent (IVA) approaches—bod, ABL & FaTiMa  , found that the decomposition and plan creation to be a challenging process . The process requires authors to able to express themselves within a specific tool while at the same time maintaining their creative design goal under the system’s restrictions. Supporting this process is crucial for reducing the burden on novice or less technical users. Similar observations were made during an undergraduate AI course, taught at the University of Bath, where student as part of their coursework created ivas using bod. Novices tended to generate either flat shallow plans or deep narrow plans, restricting the resulting agent immensely. These observations also apply to other approaches such as BehaviorTree (bt)  as they are part of authorial burdens . When using bod/creating a [BT], iterating over the plan[tree] and creating behaviour primitives[nodes] results in a tight coupling of programmer and designer as the entire behaviour library and plan structure is in flux. This is undesirable as it locks both parties into very restrictive patterns of interaction. Additionally, increased agent sizes or story depth such as the narrative in Façade  lead to growing complexity of the underlying structure as well which requires a lot of careful design. Thus, selecting the right system architectures and approach is important. A system based on finite-state machines increases its complexity exponentially, even in the average case (normal design), which renders any system at a certain stage unusable. Frameworks for modelling behaviour such as bt and posh [6, 5] have an exponential complexity growth only in the worst case (bad design). Planning systems such as goap  require authors able program expert systems as the plan they code is highly complex. However, this reduces the interdependence of nodes and the amount of manual work, e.g. checking all transitions. posh integrates a lightweight planner allowing local design by modifying existing sub-trees and hierarchically nesting them within its modular structure.
3 A Directed Model for Behaviour Design
To advance bod into A-BeD, elements of the scrum process were integrated to guide the agent design and the new process was designed to converge more against a final product. Scrum is an agile software development process integrating iterative development and testing while maintaining as much as possible the time predictability from other development processes such as the Waterfall model. It partitions the project into smaller Sprints, each taking a specified time and dealing with a defined set of features/tasks. At the end of each Sprint, the entire system should be able to execute the features developed during the Sprint, including those that have been newly integrated. Features are collected on a feature board which presents them in ordered lists (product backlog) of completed, in-progress and to-be-implemented elements. ”Scrum for Games”  starts with an initial full system specification and continuous stable versions of the product while incrementally adding features from a feature board. The important part,the feature board, is created and laid out to schedule the work and progress of all features. This contrasts conventional scrum where work is scheduled into tasks that can contain partial or parts of multiple features. After all features for the final product and production phases have been laid out, the implementation starts. The starting point of bod is initially a minimal plan containing a small set of action primitives,as shown in [13, 2].
3.1 Agile Behaviour Design
The first step is to decompose a given scenario (1) into a full set of behaviour primitives( i.e., actions and senses) and state variables. In the case of a stealth game, those could include moving to a location, sensing if a player is close or opening/closing a door. After that, the designer is building a full behaviour plan (2) for the agent that suffices the scenario specification. This step is more time-consuming than the incremental build up using bod and cognitively more challenging. It should be done in as few sessions as possible by building an entire behaviour plan bottom up using the previously specified primitives. This part of the development is a pure design task without the need for programmer involvement. Using a planning system this would involve noting all pre-&post-conditions and states, e.g. if the player is visible and the NPC is too far away it moves closer and triggers a dialogue. Next, the initial design plan is evaluated (3) together with a programmer. Based on the feedback, the design is modified; primitives are added, adjusted and renamed. Behaviour stubs are generated (4a) in an Object-Oriented Design (OOD) fashion. All specified primitive are stubbed and clustered into them according to memory/state usage. This stage is a pure programmer task as it involves creating empty methods such as moveTo(Location), sense(Player), open(Object) which are referenced in the design. New primitives should contain a default return state (4b). At this point, the fallback action should be called if other plan elements fail. It is the only action which needs an implementation in the beginning. This primitive allows the plan to be executable and represents an idle state of the agent. When designing a behaviour plan, its sub-plans (sub-trees in bt) are triggered upon meeting one or multiple conditions. Thus, when conditions are not fulfilled, the trigger does not release the related sub-tree. Following the previous example, an agent might not be able to sense the player if a door is closed. Thus, the sub-tree dealing with the player will not be triggered. Using this mechanism, it is possible to deactivate parts of the plan similar to the bitmasks used by Isla . To achieve this, the designer can integrate senses that unlock sub-trees if they are triggered. Once implemented, those senses can activate the sub-plan. Interacting with the player can be disabled by requiring the sense(Player) to return true and using a default /textitfalse return value to disable the sub-tree.
After obtaining a first feature-complete plan, the work on the underlying behaviour primitives can be adjusted to work on individual features. Thus, the feature board can be ordered (5) by clustering actions and senses under specific feature groups such as NPC movement, dialogue system, or combat.The alteration to the feature board can be done by grouping actions and senses according to their position in the hierarchical tree. This supports the identification of redundant or re-usable functionality by identifying similar usage of actions and senses within competences. On the feature board, the relating features should be ordered so that sub-trees can be completed one at a time, thus, unlocking them for the agent. This clustering allows programmers to shift entire feature blocks up and down on the feature board without impacting other sub-trees.
If the behaviour designer now decides to alter the plan, a large number of actions and senses are already stubbed within the hollow behaviour set. This given structure allows the designer to work independently (6b) on the design while programmers can implement the stubs (6a). Following this approach requires fewer inclusions of new underlying primitives than following a simple incremental approach; it also distributes the work better between designer and programmer by initially close coordination in the first phase and a looser coupling later on.
Ideally, the work is directed from bottom to top of plan following the idea of the Subsumption design . This will enable higher level drives after lower level ones have been implemented and tested. By approaching the iterative design (7) this way, the complexity and expressiveness of the agent increases according to the designed priorities without impacting the robustness or completeness of the behaviour plan.
3.2 Agile Process Steps
Decompose scenario behaviour into primitives, states and goals (Design)
Design full behaviour plan that would suffice intended scenario (Design)
adjust/alter plan and primitive list (Design+Programming)
Templating behaviour stubs (Programming)
Design behaviour plan to have feature locks (Design)
Modify feature board & sort according to sub-trees (Design+Programming)
Implement stubs and alter primitives according to features (Programming)
Test & Develop behaviour plan based on given primitives/features (Design)
Loop to 3) until feature board is empty
Agile Behaviour Design was used to develop agents for starcraft  and in the development of the Android game Stealthier POSH222The game is available on the Android app store or using the following link: https://play.google.com/store/apps/details?id=com.fairrats.POSH as a proof of concept. Maintaining a prioritised feature set which relates to the plan sub-trees proved in those two case studies beneficial and provides transferable knowledge for commercial development environments as well. The feature board allows for better tracking of the development progress and more independent work of designers and programmers. Additionally, it removes the burden of numerous changes to the behaviour library early in the project or restricting the designer from working purely on the plan without being able to test it. Unimplemented actions returning the default state allow for the parallel work on partial behaviours which decouples the programmer. Using A-BeD with hierarchical planners such as posh enables working on smaller sections of an agent and concentrating for example on interaction with other agents while the dependencies between designer and programmer are reduced. Additionally, integrating the default trigger states, sub-trees unlock based on the progress of their underlying implementation. This cascaded unlocking of the tree and the resulting behaviour allows for a better version control of the behaviour library because it is more directed towards realising connected sub-trees. The combination of working on sub-trees and the feature board based on scrum directs the agent implementation to focus on connected pieces. The new approach should provide sufficient support for working on more complex systems or distributing work between different people such as movement and narration design for a given agent.
4 Conclusion & Future Work
This paper presents a novel, project-oriented methodology, extending the existing behavior oriented design (bod) . One focus of the new methodology is to provide better separation of design and programming and to support the development of artificial agents in teams of multi-disciplinary authors. The two case studies and the feedback from the systems analysis  create the basis for the newly introduced process steps of the methodology. The new process allows designers and programmers to distribute their work better while still following keeping the project progress in mind. Agile Behaviour Design reduces the dependencies of the different user groups such as authors, designers and programmers. To further aid the development and to focus on multi-platform development the arbitration architecture posh-sharp  was designed to support specifically the agile design approach better. As a next step, further evaluations of the new methodology and approach are intended with novice and expert users as well as a widened systematic analysis of development approaches to support cross-disciplinary design.
- Brooks  Brooks, R.: A robust layered control system for a mobile robot. Robotics and Automation, IEEE Journal of 2(1), 14–23 (1986)
- Bryson  Bryson, J.J.: Intelligence by Design: Principles of Modularity and Coordination for Engineering Complex Adaptive Agents. Ph.D. thesis, MIT, Department of EECS, Cambridge, MA (June 2001), 2001-003
- Champandard and Dunstan  Champandard, A.J., Dunstan, P.: The behavior tree starter kit. In: Rabin, S. (ed.) Game AI Pro: Collected Wisdom of Game AI Professionals, pp. 72–92. Game Ai Pro, A. K. Peters, Ltd. (2013)
- Dias et al.  Dias, J., Mascarenhas, S., Paiva, A.: Fatima modular: Towards an agent architecture with a generic appraisal framework. In: Emotion Modeling, pp. 44–56. Springer (2014)
- Gaudl  Gaudl, S.E.: Building Robust Real-Time Game AI: Simplifying & Automating Integral Process Steps in Multi-Platform Design. Ph.D. thesis, Department of Computer Science, University of Bath (2016)
- Gaudl et al.  Gaudl, S.E., Davies, S., Bryson, J.J.: Behaviour Oriented Design for real-time-strategy games. In: Proceedings of the Foundations of Digital Games. pp. 198–205. Society for the Advancement of Science of Digital Games (2013)
- Grow et al.  Grow, A., Gaudl, S.E., Gomes, P.F., Mateas, M., Wardrip-Fruin, N.: A methodology for requirements analysis of ai architecture authoring tools. In: Foundations of Digital Games 2014. (2014)
- Isla  Isla, D.: GDC 2005 proceeding: Handling complexity in the halo 2 AI. (2005)
- Keith  Keith, C.: Agile Game Development with Scrum. Addison-Wesley Signature Series (Cohn), Pearson Education (2010),
Mateas, M.: Interactive Drama, Art, and Artificial Intelligence.Technical report cmu-cs-02-206, School of Computer Science, Carnegie Mellon University (December 2002)
- Mateas and Stern  Mateas, M., Stern, A.: A behavior language for story-based believable agents. Intelligent Systems, IEEE 17(4), 39–47 (2002)
- Orkin  Orkin, J.: Agent architecture considerations for real-time planning in games. In: Young, M.R., John, L. (eds.) Proceedings of the First Artificial Intelligence and Interactive Digital Entertainment Conference. pp. 105–110. AAAI Press, Menlo Park, CA (2005)
- Partington and Bryson  Partington, S.J., Bryson, J.J.: The Behavior Oriented Design of an Unreal Tournament character. In: Panayiotopoulos, T., Gratch, J., Aylett, R., Ballin, D., Olivier, P., Rist, T. (eds.) The Fifth International Working Conference on Intelligent Virtual Agents. pp. 466–477. Springer, Kos, Greece (September 2005)
- Rubin  Rubin, K.: Essential Scrum: A Practical Guide to the Most Popular Agile Process. Addison-Wesley Signature Series (Cohn), Pearson Education (2012),
- Spierling and Szilas  Spierling, U., Szilas, N.: Authoring issues beyond tools. In: Joint International Conference on Interactive Digital Storytelling. pp. 50–61. Springer (2009)