Towards Articulate Game Engines
Total Page:16
File Type:pdf, Size:1020Kb
Towards Articulate GameEngines Daniel Jeffery Dobsonand Kenneth D. Forbus Northwestern University Department of Computer Science 1890 Maple Ave. Evanston, IL 50201 { wolff, forbus } @cs.nwu.edu From: AAAI Technical Report SS-99-02. Compilation copyright © 1999, AAAI (www.aaai.org). All rights reserved. Abstract difficulties that must be overcomein building articulate Conventional simulators lack explanatory power. gameengines. Traditional simulators provide the dynamicbehavior needed for a gaming world, but do not provide conceptual understandingsof the world to players or gameA.Is. By creating gameengines that havea qualitative understanding WhyTarkin is doomedin today’s of the systemthey describe, authors can moreeasily build simulations richer and smarter gameagents. This paper outlines why game engines should include more conceptual Consider first the Sim gamesfrom Maxis. In gameslike understandings,suggests some relevant AI technologies,and SimCity[2] or SimEarth[3], which are combinations of speculateson howthis mightbe accomplished. cellular automata (CA) and system dynamics(plus a other ingredients) are combinedto provide a rich simulated Inroduction world. The CAcomponent provides a sense of space and locality, as well as discrete changesbased on both local properties and global properties from the system dynamics "We’veanalyzed their attack sir, and there is a danger." aspects of the model. The differential equations of the system dynamicscomponent provide global interactions, In "Star Wars," [1] the GrandMoff Tarkin had logistical integrating the properties of cells into aggregate support whenbattling the rebels. His aides founda critical parameters, such as overall crime levels in a simulated city. weaknessin their ownsetup and had generated an escape These causal relationships then help drive the interaction of plan. Unfortunately, players never experience such rich the CAcomponent. The very richness of this interaction interactions with their computeradvisors or opponents. which makesthese simulations so appealing can also lead Computeradvisors tend to be simplistic and sensitive only to dreadful confusion on the part of players: Whydid my to simple global features of the situation. Theytend to be attempt to terraform Venussuddenly fail? predictable and often not good enough, relying on hidden information and massive cheating (e..g, accelerated Explaining the simulations developmentand extra resources) to give their human players a good game. If the Grand Moff Tarkin were a Gamedesigners often explicate parts of their modelsin the typical computerplayer, he wouldcontinue to construct interface, documentation,or software advisors, but these Death Star after Death Star, watching the humanplayer partial modelsare usually unsatisfying (to both player and knockone off after another without ever revising the plans designer). Moreover,the advice given is not based on to removethose darn trenches. (Even George Lucas only conceptualunderstanding of the player’s current situation. tried to makeit worktwice.) Typically their advice is morelike a warninglight on a dashboardthan a detailed analysis of the player’s position. Wedescribe howsome ideas developed in artificial "Youdon’t have enoughfire departments" is muchdifferent intelligence, notably qualitative reasoningand self- than "Yourfire departmentsaren’t strategically placed." explanatory simulations, might help improvethis situation. By creating gameengines that have a conceptual Of course, keeping the appropriate amountof mystery in a understanding of the gamingworld, gamescould include gameis important -- experimentingand playing detective is better advisors and opponents, as well as automating more often a critical source of enjoyment-- but the game of the simulation construction process. Westart by designer should have a broad range of options as to how examiningthe need for a built-in conceptual understanding muchinformation to provide and in what form, rather than of the gameworld, then describe how/~qualitative being minimalist because that is the only feasible option. representations could provide that u~derstanding. Then we describe a particular technology, self-explanatory Computer players simulators, illustrating their potential for creating game Interactions with computerplayers, as opponents, advisors, engines that contain such built-in understandingwith very or just passers-by, help draw a player into the gameworld. small runtimepenalties. Finally, we list someof the Anunderstanding of the events of the simulated world are also important for creating richer computercharacters. In 32 gameslike Civilization II [4] and Ageof Empires[5], description is somethinglike "goes up, comesdown." computerplayers are governedby simple scripts, build- Qualitative representations impose symbolic descriptions lists, and carefully-tuned mechanisms.The conceptual on continuous parameters, making them amenableto description of the gamingworld, which governs the conceptual reasoning. designer’s crafting and tuning of the worldand its bots, is nowhereexplicit in the computationalengine itself. If Whatkind of conceptual reasoning do you need to do? If players find fundamentalweaknesses (say, trenches in what is thrownis a piece of Waterfordcrystal rather than Death Stars), there is no conceptual knowledgeto fall back just a ball, one might decide to maneuverto get underneath on. it before it falls. A feeling for the quantitative is necessary to understand where you need to physically be and how Yet it is this conceptuallevel of knowledge,tied soon you need to get there, but it is qualitative knowledge appropriately to the detailed mechanicsof the world(e.g., that tells you that you have this dilemmain the first place. qualitative humanperception, in the case of the real world), Moreover, qualitative knowledgeprovides concise that is typically used as a guide to categorizing events and summariesthat makeit easier to spot complexbehavior to act accordingly. Computerplayers that understood the patterns. It is easier to extract a pattern like "decaying causal relationships that govern the gameworld could oscillation" from a sequenceof strategize, plan, and advise better. Understandingthe game UP/PAUSE/DOWN/COLLIDEevents where the energy at worldwill also help interpret the humanplayer’s actions, each subsequent PAUSEis lower than it is from the raw enabling responses that help makethe humanplayer feel numericaldata. (In fact, in engineeringqualitative more visible, and hence more engaged, in the gameworld. reasoning techniques are being used to create useful, humanqikedescriptions of very complexbehaviors, A technologyfor articulate game including chaotic systems.) engines Self-Explanatory Simulators Designing and implementingthe physics (or economics) Our group has developed a technology that can help change a gameengine requires selecting appropriate modeling this. Self-explanatory simulators combinethe ability to do assumptions,trading off constraints of physical efficient numerical simulation with the conceptualclarity of verisimilitude, playability, CPUand memorybudgets, and qualitative representations. The basic idea is to makethe developmenttime. In simulation construction, qualitative process of simulation authoring more automatic--- knowledgeprovides an organizing frameworkfor the automatinggeneration of both the code for grinding the physical objects, relationships, processes, and their numbersand articulating the conceptual knowledge.That mathematical models. After deciding what phenomenaare is, a self-explanatory simulator compiler (here, SIMGEN relevant, the engine designer needs to figure out the Mk3)is given as input a conceptual understanding of the appropriate approximations and mathematical models, and domainto be simulated and a description of the structure of then implementthem in efficient code. Unfortunately, the the particular system within that domainto be simulated. conceptual understanding of the simulated world remains in SIMGENfigures out what phenomenaare relevant and the simulationdesigner’s head; it is unarticulated. what modelingassumptions are appropriate, selects the appropriate mathematicalmodels, and writes the simulation If we can embedinto the gameengine itself the kind of code. (It can take advice from a humanpartner, depending conceptual understanding that players (humanand on the application.) SIMGENalso creates, as part of the computer)need to operate in it, we will have an important simulator, a compactversion of the conceptual tool for creating the kinds of explanationtools, post- understandingit used to create the rest of the simulator. mortemdebriefings, and bots that we would like. We This information is used to provide explanations about the propose that qualitative knowledge,expressed for example physical entities and relationships in the simulation. This in the form of self-explanatory simulators, can provide a explanation system enables self-explanatory simulators to basis for articulate gameengines that wouldsupport these generate a conceptual description of simulated behavior as new developments. an inexpensivebyproduct of the simulation itself. Qualitative knowledgeis the kind of conceptual, everyday The runtime costs of self-explanatory simulators are knowledgethat we use to categorize, explain, and reason slightly higher than traditional simulators: The explanation about the physical events and processes that happen around system takes up a small, fixed amountof memory,and the us. Considera ball thrownup in the air.