Investigating Ambient AI Techniques Suited For Procedural Worlds

Ambient AI in Procedural Games


Bachelor Thesis, 2016

28 Pages, Grade: 90-93/100


Excerpt

TABLE OF CONTENTS

TITLE PAGE

ACKNOWLEDGEMENTS

LIST OF TABLES

LIST OF FIGURES

ABBREVIATIONS

ABSTRACT

RESEARCH STATEMENT

RESEARCH METHODOLOGY

RESEARCH SCOPE

RESEARCH LIMITATIONS

AI IN GAMES: INTRODUCTION

THE ROLE OF AMBIENT AI IN GAMES

AMBIENT AI TECHNIQUES: AN OVERVIEW

PE AND AI: AN OVERVIEW

AI AND PE: FURTHER CASE STUDIES

AAI TECHNIQUES: FURTHER ANALYSIS

AAI TECHNIQUES: SELECTION CRITERIA

SIMULATION SCENARIOS: DESIGN OVERVIEW

TEST CASES: OVERVIEW & DEFINITION

SIMULATION SCENARIOS: IMPLEMENTATION OVERVIEW

TEST CASES: ANALYSIS OF DATA GATHERED

RESEARCH CONCLUSION

FUTURE RESEARCH

REFERENCES

BIBLIOGRAPHY

Acknowledgements

Thejaswi Padmanabha: firstly, I’d like to thank Mr. Thejaswi for his excellent supervision and assistance throughout my honors period at SAE. He consistently provided thoughtful and inspiring guidance that helped me scope my research in the correct direction, he consistently believed in my efforts despite losing sight of my direction a number of times. Furthermore, He often gave me advice beyond academic matters when it seemed to me that the difficulties I was facing were of a personal nature. I would arguably say without his consistent faith in me this research would not have been a successful endeavor.

Cloderic Mars: secondly, I’d like to thank Mr. Cloderic Mars for his initial assistance during the preproduction phase of my research. Despite his limited time, he was able to answer my questions and proving industry insight into my work.

List of Tables

Table 1 - example NPC schedule

Table 2 - baseline testing metrics

Table 3 - example hardware specs

Table 4 - performance test metrics

Table 5 - scale-ability test metrics

Table 6 - farmer NPC schedule

Table 7 - hardware specs used for simulation

Table 8 - test sessions baseline metrics used

Table 9 - AALS performance data

Table 10 - Scheduling performance data

Table 11 - Smart Zones performance data

Table 12 - Scale-ability testing metrics

Table 13 - AALS scale-ability data

Table 14 - Scheduling scale-ability data

Table 15 - Smart Zones data

List of Figures

Figure 1 - the Unity3D Profiling Tool (Unity Technologies Inc., 2016).

Figure 3 - example performance chart (Microsoft Office, 2016)

Figure 4 - example scale-ability chart (Microsoft Office, 2016)

Figure 5 - AALS Environment (Unity Technologies Inc., 2016)

Figure 6 - AALS Speaking Behavior

Figure 7 - AALS Cleaning Behavior

Figure 8 - AALS Begging Behavior

Figure 9 - an example Animation Controller (Unity Technologies Inc., 2016)

Figure 10 - AALS Full Scene (Unity Technologies Inc., 2016)

Figure 11 - Scheduling Farm (Unity Technologies Inc., 2016)

Figure 12- Farmer Walking Schedule Entry (Unity Technologies Inc., 2016)

Figure 13 - Farmer Farming Schedule Entry (Unity Technologies Inc., 2016)

Figure 14 - Farmer Re-Enter House Schedule Entry (Unity Technologies Inc., 2016)

Figure 15 - Smart zone environment (Unity Technologies Inc., 2016)

Figure 16 - agents navigating to nearest smart zone (Unity Technologies Inc., 2016)

Figure 17 - Agents occupying scene spots (Unity Technologies Inc., 2016)

Figure 18 - behavior orchestration in living scene (Unity Technologies Inc., 2016)

Figure 19 - Smart Zone Architecture (Cloderic Mars, 2015)

Figure 20 - Performance Comparison (Microsoft Office, 2016)

Figure 21 - Scale-ability Comparison Chart (Microsoft Office, 2016)

Abbreviations

Abbildung in dieser Leseprobe nicht enthalten

Investigating Ambient AI Techniques Suited for Procedural Worlds

Abstract

Procedural Content Generation (PCG) is a trending technique in content authoring for Independent Game Developers (IGD), recent success in games such as No Man ’ s Sky has led developers to investigate this newly developed technology.

Now more than ever, Game AI has to adapt to a changing environment and delivering a unique gaming experience on Run-Time. A selection of Ambient AI (AAI) Techniques is selected for identifying the most suited technique for Procedural Games (PGS). In the selection process, a prototype of each AAI technique that illustrates its core concepts is simulated and tested in a semi - generated environment that resembles certain elements in a PE. Furthermore, each technique will be subject to testing sessions in order to evaluate the effectiveness of the approach of each technique based upon comparisons conducted between the simulations.

Research Statement

This research aims to identify effective AAI Techniques suited for simulating Background Ambience in PE.

Research Methodology

Research is conducted through the usage of both qualitative and quantitative methods.

Quantitative: a simulation of each AAI will be conducted in order to derive data that can be utilized for quantifying its effectiveness in a PE.

Qualitative: after the quantification of each AAI technique, it shall be further qualified by arguments that hypothesize its effectiveness by a thorough comparison of a selection of AAI Technique.

Research Scope

The emphasis of this research is to identify the most effective AAI technique for background Ambience in PE. The metrics for the solution shall constructed based on hypothetical scenarios that are inspired by ambient environments present in RPGS, where an abundance of NPCS are present in a simulated setting.

Research Limitations

The research data is collected from simulations conducted in the Unity3D Engine. As a result, the simulations will be confined to the engine’s design which may introduce bias as some simulations could be more compatible than others. Moreover, the research is not conducted in the context of a commercial game. As a consequence, the data gathered could be less comprehensive as each AAI Technique is only simulated through a test scenario. However, specific elements of procedural environments have been considered to allow the simulation results to be in some degree closer to a full-fledged procedural scenario. For instance, the application shall make use of RTCG to resemble the setting of PE.

AI in Games: Introduction

Preceding the research, a thorough definition of the research field is required. The first research enquiry is what is Game AI? Game AI is generally considered as a tool for immersion, it focuses on creating an illusion of intelligence and creating a particular experience for the user. As a consequence, the techniques used in game AI and generally any other field employed in games is to bring about the desired experience for the user (Kevin Dill, 2014).

Defining Ambient AI in Games

To begin with, according to David Rez Graham in Game AI Pro, Ambient AI is an important component of any game that includes NPCS as it adds to the believability and immersion of the game (Graham, Breathing Life Into Your Background Characters, 2015). Moreover, according to Jeet Shroff in Game AI Pro 2, building believable NPCS is a core goal of game developers overall. Additionally, believable NPCS compel the user’s interaction. Therefore, further grounding the user in the game world and selling the game’s story (Mike Lewis, 2015). Likewise, according to Cloderic Mars in Game AI Pro 2, designing Ambient NPCS that breathe life into a virtual environment is a method for improving the feeling of presence for the user (Cloderic Mars, 2015).In Conclusion, Ambient AI is a collection of AI Techniques used for simulating believability in a virtual environment as a whole.

The Role of Ambient AI in Games

In this section, a case study of two games is conducted in order to deduce the role of Ambient AI in games. Firstly, based on thorough investigation an upcoming game named “Kingdom Come: Deliverance” developed by Warhorse Studios is selected. Secondly, a released game named “Far Cry 4” developed by Ubisoft Montreal.

According to Julien Varnier, Lead AI Engineer on Far Cry 4 in his GAIC 2014 presentation, the AI is divided into 4 main categories: Enemy AI, Friendly AI, Civilian AI and Wild Life (Varnier, 2014). In FarCry4 the civilian AI and the wild life are the applications of Ambient AI. In Continuation, the civilian AI is for populating FarCry 4’s domestic areas and potentially providing interesting situations during their interactions, further enhancing the player’s experience (Varnier, 2014). Moreover, the wild life is the major contributor to the overall ambience as the user frequently interacts with them as part of the gameplay and they consistently interact with other NPCS.

However, they also play as a supporting role as the civilian NPCS in breathing life into the environment as FarCry4 is set in a forest environment (Varnier, 2014). Nonetheless, Enemy AI is the major category as the player constantly interacts in conjunction with FarCry 4’s Genre. In Contrast, according to Thomas Plch of Warhorse Studios in his presentation on the AI Engine behind Kingdom Come: Deliverance during at GAIC 2014, Ambient AI was the central focus in the game as it aims to achieve realism (PLch, 2014), opposite to player entertainment as FarCry 4. Moreover, the world to be populated is not open world as in the case of FarCry 4, this leads to more available resources for the simulation.

In Conclusion, Ambient AI portrays complementary roles in games often in support of other Gameplay Ingredients. Furthermore, the goal of the game clearly dictates the level of ambience required.

Ambient AI Techniques: An Overview

To further understand the role Ambient AI in games, a selection of Ambient AI techniques is used for preliminary analysis. These techniques are: Artificial Life (Schwab, 2008), Scheduling (Kevin Dill, 2014), Comme il Faut (CiF) (Kevin Dill, 2014), Smart Zones (Mike Lewis, 2015) and Ambient Animation Loops. The criteria for selecting these techniques in contrast to others is that each of these techniques is an Ambient AI Technique and can be applied or relates to the research criteria.

AL

According to Brian Schwab, Lead AI Engineer at Magic Leap Inc. in his book AI Engine Programming, AL is the attempt to simulate biological phenomena in a virtual environment, it is also the name attributed to a collection of disciplined that are employed together to formulate such a simulation (Schwab, 2008).

Furthermore, an advantage of this technique is that it results in emergent behaviors in a semi-consistent fashion. Moreover, it enforces reusability of behaviors since it requires governing rules to dictate the how the simulation will be conducted. Therefore, the gameplay must be divided into building blocks until it can be used as a rule (Schwab, 2008).

However, emerging behaviors from this technique are un-predictable as they rely on biological mechanisms that may take any shape or form during development, resulting in a critical issue should the Agents in the simulation start developing unwanted behaviors. Additionally, it can be difficult to tune or adjust parameters in the game as it is not clearly understood how they influence one another in the presence of poorly understood biological mechanisms in the simulation (Schwab, 2008).

Scheduling

According to David “Rez” Graham” in his previously mentioned article, Scheduling is composed of a HFSM that is operated by defining time blocks where each background NPC is to execute an action at the specified time (Graham, Breathing Life Into Your Background Characters, 2015).

Furthermore, each NPC is given a schedule, it can be thought of as a black box where the input is the current time and the output is an action the NPC can take, unlike AL scheduling is not for simulating the ambience of life but rather to give the illusion of its presence. In reality, the actions may be as simple as navigating to a certain point and playing an animation (Graham, Breathing Life Into Your Background Characters, 2015).

CiF

According to Michael Mateas and Josh McCoy in their Game AI Pro article titled “An Architecture for Character-Rich Social Simulation”, CiF is an AI Architecture that aims to focus on simulating social activity between NPCS. it was employed in the development of Proom Week, a social simulation game where the player interacts with a group of high school students.

CiF aims to represent social interactions between NPCS through a collection of Dialogue exchanges between the agents. It utilizes NLP for dynamically generating dialogue texts for each character. Furthermore, in CiF social interactions between NPCS are based on Erving Goffman’s work in dramaturgical analysis of social interaction in sociology (E.Goffman, 1959) which in summary is simply viewing social interactions in everyday life as a dramatic performance. Therefore, Interactions are based on what element of the game’s social state are they designed to express or change. However, CiF is mainly designed around the need of a dialogue system, which may not be mandatory for most games (Mike Lewis, 2015).

Smart Zones

According to Cloderic Mars in his Game AI Pro 2 article titled “Smart Zones to create the Ambience of Life” smart zones are a newly developed concept that aims to design creditable, consistent and interactive ambient life (Mike Lewis, 2015). Smart zones are composed of “Living Scenes”. A living scene is a set of NPCS interacting with and possibly with players. Furthermore, living scenes are designed to fit in the context of their virtual environment (Mike Lewis, 2015).

Each NPC participating in a scene fulfills a role, each role is defined by a set of behaviors that will be executed by the NPCS to achieve the scene. The behaviors assigned to each role are orchestrated in order to achieve the collective ambience required of the living scene. Furthermore, for executing a living scene, it is defined through a smart zone. Smart zones are a standalone module present in the virtual environment that is responsible for managing the lifetime of one living scene. Moreover, the aim of smart zones is to split the design of AAI into two individual layers; individual NPC behaviors and collective living scene behaviors (Cloderic Mars, 2015).

AALS

Perhaps the most classical AAI Technique, according to David “Rez” Graham it is composed of NPCS looping animations over and over. Each NPC loops a certain animation or action repetitively such as walking around a specific region. In combination it gives the illusion that each NPC is doing something different (Graham, Breathing Life Into Your Background Characters, 2015)t.

PE and AI: An Overview

In this section, an investigation of possible challenges for developing AI in a PE is conducted, based on investigation the case study selected is a recently developed procedural game named “A Valley Without Wind”, it was developed by Arcen Games.

According to Chris Park lead developer of the game in his live interview with Alex J. Champandard of AIGameDev.com (Park, 2012) the entire game is procedurally generated. It is composed of a world map that’s in 2D top-down view, the world map is dissected into sections called “regions” which are procedurally generated one part at a time as the player progresses through the game. Furthermore, each part of the game itself is constructed from layers of procedures that are combined together to increase the LoD in the game and the richness of the generated content.

On a high level, the main candidate for issues concerned with AI is the random nature of the generated environments. Furthermore, this high level issue is broken down into segments. To begin with, the first aspect of this issue is Context Correct Spawning (CCS). According to Chris Park, during the development of the game they faced difficulty correctly spawning entities in the right context. For example, an issue was reported during play testing that a T-Rex was spawned in a narrow corridor and had difficulty navigating (Park, 2012).

As Chris Park continues, it seems to be a problem with how procedural generation works rather than an AI Problem. The issue was addressed by utilizing a set of filters to determine if a spawn location is feasible for the type of entity being spawned (Park, 2012). In Conclusion, AI in a PE is required to adapt to a new context as the environment is generated. Furthermore, easily integrating diversity in contrast to scripted behaviors or pre-defined contexts is a key factor.

AI and PE: Further Case Studies

Building on the previous case study, potential criteria for AI in a PE could be derived. Firstly, it was mentioned that AI would be required adapt to fit a new context continuously. Moreover, a secondary case study on the usage of PCG in RPGS is surveyed for based on a qualitative investigation of literature on the topic of PCG, the selected case studies reflect the usage of PCG in RPGS which is the target theme for potential simulations based on this investigation.

To begin with, according to Nathaniel Buck in his bachelor’s thesis titled “Procedural Content Generation in Strategy/Role-Playing Games ” PCG is used to completely generate levels on run-time, due to that, the theme and story of the game cannot be pre-defined or yield an expected outcome, instead only the major events are linearly defined (Buck, 2013).

Moreover, according to Tam Adams in his article titled “Simulation Principles from Dwarf Fortress”. Dwarf Fortress is an RPG built on simulation, the game world is procedurally generated from scratch over multiple steps. Tam states that given adequate CPU and memory resources, a deep and rich simulation can be achieved through its generated content. Therefore, it can be assumed that PGC is potentially consuming in terms of computational resources. Indubitably, this would rely on the type of simulation being developed. However, PG may allow for less computational resources for Gameplay Ingredients as they are expected to be generated to some extent rather than authored. On these grounds, secondary elements of AI such as AAI may be required to place a considerable emphasis on adaptability and performance. Lastly, according to David “Rez” Graham in his previously mentioned article, this hypothesis is further emphasized by the following: in order to decide on a strategy for AAI the most relevant criteria to be considered are: high performance, scalability, ease of implementation (Graham, 2015).

In conclusion, AAI Techniques would require to be efficient, scale able and easy to implement as well as being adaptable to a new context on run-time. Based on this hypothesis, a further analysis of the selected AAI Techniques is due.

AAI Techniques: Further Analysis

this section each of the previously mentioned techniques are reviewed based on the proposed hypothesis.

To begin with, according to Brian Schwab in his book “AI Engine Programming” AL operates on preset rules to simulate biological processes akin to life in a virtual environment. Furthermore, the rules that govern the simulation must not change as this would conflict with the predefined goal of AL simulations and would not depict accuracy in the results. Furthermore, AL techniques by default require a fixed context which directly conflicts with the nature of a PE. Therefore, AL may no longer be a viable candidate for experimentation as it is valid according to the concluded hypothesis on criteria of AAI Techniques in a PE.

On the other hand, according to David Rez Graham in his previously mentioned article. a full-fledged AAI system was developed utilizing a scheduling approach and later employed in a commercial title “The Sims: Medieval” and the solution was successful in achieving the following criteria: ease of implementation as it gave game designers less constraints to handle when designing background ambience as well as high efficiency as they were able to simulate a large number of NPCS. More Importantly, scheduling can be adapted for player integration with sufficient changes (Graham, 2015).

In Continuation, CiF was developed to be functional in a dynamic context as well, according to Micheal Mateas and Josh McCoy the dialogue patterns were developed in a generic manner that did not depend on any specific NPC. Rather they were developed as social settings that can occur between any two NPCS engaged in dialogue. However, the dialogue patterns themselves were pre- defined. Moreover, CiF like the Sims series is developed for use in simulation settings similar to AL such that the target ambience is not background ambience, whereas RPGS are rather directed experiences in which AAI is often employed for supportive roles as previously mentioned. This possibly places CiF out of the scope of the potential AAI Techniques that can effectively be used in a RPG setting.

Similarly, according to Cloderic Mars in his previously mentioned article, smart zones orchestrate behaviors between NPCS based on a set of pre-defined “roles” assigned to each NPC upon entering a smart zone. However, unlike CiF the roles are contextindependent. For example, a smart zone may require the role “waiter” to be casted but it does not define who it is, it simply queries the world in search for viable NPCs and if none is found then the smart zone does not begin the living scene execution (Cloderic Mars, 2015). This is a possible indication that smart zones may be adaptable on run time.

Lastly, as previously mentioned by David Rez Graham, AALS is simply repeated behavior cycles where ambience is achieved through quantity (Graham, 2015). Furthermore, due to its simplicity it is quite efficient as it is merely a repeated animation. However, looped animations often heavily depend on the context in which they appear, Nonetheless, with the usage of CCS it may be a considerable candidate for investigation in a PE.

In conclusion, after further analysis of the proposed techniques, CiF and AL are no longer regarded as valid candidates due to the lack of qualitative evidence that they may be utilized well in a PE for simulating background ambience in light of the recently established hypothesis.

AAI Techniques: Selection Criteria

The proposed criteria for measuring the effectiveness of each AAI Technique are the following: High Performance, scalability, ease of implementation and run-time adaptability. However, ease of implementation is quite subjective and potentially dependent on which platform is the technique applied. Therefore, in order to avoid possible bias, it shall not be considered. Lastly, further refinements are required for classing the established criteria based on the defined research methodology.

To begin with, our first and potentially most important criterion is high performance. In order to measure the performance a bench mark must be defined. According to an article on Logical Increments, at the time of this research the FPS required for a smooth gaming experience is between 45-60 FPS (Logcial Increments, n.d.).

Therefore, for each AAI Technique, the simulated scenario will have its performance quantified using the Unity3D Profiling Tool and recorded for the duration of the simulation setting. Therefore, high performance is a quantified criterion.

illustration not visible in this excerpt

Figure 1 - the Unity3D Profiling Tool (Unity Technologies Inc., 2016).

Furthermore, the second criterion is scalability. Each AAI Technique will include a minimum number of agents in its simulation. This is due to the fact that background ambience often requires a significant of agents present in order to add depth to the user’s experience (Graham, 2015). Scalability shall be measured by incrementally increasing the number of simulated agents without the performance decreasing below the benchmark. Lastly, the third criterion is run-time adaptability. each technique may require a set of its elements to be defined on edit time opposite to run-time in order to be executed. For example, in the AAI Technique “smart zones” it is required to define the roles for each smart zone before the living scene can start. Moreover, this criterion is considered qualitative as it is based on comparing the amount of elements that require to be defined at edit time for each technique, in order to qualify the most adaptable technique on run time

Simulation Scenarios: Design Overview

In this section, hypothetical scenarios are defined for each AAI Technique that resemble environments in RPGS.

AALS

To begin with, we define the scenario for AALS. The scenario for AALS shall be composed of 5 NPCS exhibiting a common ambient scene found in RPGS, the hypothetical scenario is that of a medieval village, each NPC will be portraying a simple ambient behavior such as speaking to other NPCS. this scenario is designed based on preference and speculation.

For this scenario, the ambient scene to be portrayed shall be composed of 5 NPCS each exhibiting a behavior. Three NPCs shall be exhibiting a conversation behavior with one another, a scene commonly found in most games. Secondly, an NPC shall exhibit a working behavior where he cleaning the front porch of his cabin. And lastly, a NPC shall exhibit a begging behavior in order to increase the diversity of ambience in the scenario.

Smart Zones

Secondly, for smart zones, a living scene is defined that exhibits a similar ambience to the scene defined for AALS. To begin with, each smart zone shall be composed of 2 roles, 1 Speaker and 1 listener. Furthermore, the NPCS shall exhibit an ambient scene of two villagers exchanging words outside of a medieval house.

Scheduling

Thirdly, for scheduling a template schedule is defined to resemble a neutral NPC in an RPG setting. As an illustration, the schedule of a farmer NPC is defined. Below is an example table indicating the sequence of behaviors in the schedule. The time values are merely an illustration.

illustration not visible in this excerpt

Table 1 - example NPC schedule

In conclusion, we’ve designed three hypothetical illustrations that can demonstrate the core concepts of each of the selected AAI Techniques. These illustrations shall be implemented and conclusive data shall be quantified from the Unity3D Engine during the simulation of each AAI Technique in order to compare each of the AAI techniques and determine their effectiveness.

Test Cases: Overview & Definition

In this section, tests are defined in order to gather data from the simulations for comparison. Furthermore, the metrics for the tests are defined and illustrated.

Test Metrics & Definitions

To begin with, we define the baseline metrics which shall be employed in each test. However, certain tests may introduce extra metrics. Below are baseline metrics:

illustration not visible in this excerpt

Table 2 - baseline testing metrics

In Addition, tests shall be conducted in sessions where each session is a collection of data from the metrics employed. Moreover, multiple sessions may be conducted depending on the type of test being conducted. Furthermore, in correlation with the above mentioned metrics the hardware specifications used for the test sessions are recorded first hand before any test sessions in order to validate the measurements based on the capability of the hardware. Below is a sample table of hardware specifications.

Component Type Spec employed in the test machine

illustration not visible in this excerpt

Table 3 - example hardware specs

General Testing Limitations

In an ideal scenario each simulation would progress for longer periods of time in order to gain thorough insight on the capabilities of each of the selected AAI Techniques. However, for the purposes of this research an illustration is satisfactory to provide an insight on to the potential challenges and advantages of each technique.

Performance Testing

Firstly, for each simulation the performance will be recorded for its duration. Furthermore, for each test session the following metrics are employed along with the baseline metrics:

illustration not visible in this excerpt

Table 4 - performance test metrics

Moreover, the overall performance of each illustration shall be plotted in a graph in order to compare the performance of each AAI Technique. Below is an example.

[...]

Excerpt out of 28 pages

Details

Title
Investigating Ambient AI Techniques Suited For Procedural Worlds
Subtitle
Ambient AI in Procedural Games
Course
Games Programming
Grade
90-93/100
Author
Year
2016
Pages
28
Catalog Number
V358129
ISBN (eBook)
9783668446731
ISBN (Book)
9783668446748
File size
2535 KB
Language
English
Notes
- Awarded Most Outstanding Student with Highest GPA - Higher Distinction Honors Thesis
Tags
Ambient AI, Game AI
Quote paper
Mohamed Serry (Author), 2016, Investigating Ambient AI Techniques Suited For Procedural Worlds, Munich, GRIN Verlag, https://www.grin.com/document/358129

Comments

  • No comments yet.
Read the ebook
Title: Investigating Ambient AI Techniques Suited For Procedural Worlds



Upload papers

Your term paper / thesis:

- Publication as eBook and book
- High royalties for the sales
- Completely free - with ISBN
- It only takes five minutes
- Every paper finds readers

Publish now - it's free