Working AI into your Game Development

Tuesday 5/21/19 09:00am
|
Posted By Felix Baum
  • Up0
  • Down0

Introduction

If you haven’t thought about gaming for your next AI project, we’d like to encourage you to consider it! In mobile game development, data is one of the most powerful tools. Although game development has previously used some sort of artificial intelligence (AI), it’s usually been in the form of basic algorithms and scripted sequences. However, with the rise in processing power, the increasing number of AI libraries, and creative new uses of AI, game development can now leverage many more approaches to AI, such as machine learning.

Of course, what’s really exciting is to imagine the possibilities of how AI developers and game developers can team up to impact the community. In this blog we’ll review three areas where you might consider infusing AI into gaming: in-game AI, game creation, and analytics.

In-game AI

Games are part art and part science, but in the end it’s all about providing a fun and well-designed user experience. Games have also typically exhibited some sort of intelligence, but the use of techniques like machine learning were limited due to several factors such as:

  • Available processing power to maintain 30 or 60 fps
  • The belief that AI could make games unplayable or unpredictable, or could make the gaming experience less desirable
  • Non-deterministic results that could make the game difficult to test or function correctly
  • The lack of expertise with AI technology like machine learning and neural networks

Despite this, we’re starting to see some trends and potential uses for machine learning in games. For example, machine learning could be used for more realistic non-playable characters (NPCs) that behave and generate their own dialog rather than rely on scripting.

Another example is the ability for AI to adjust the difficulty level based on how the player is performing, or similarly, to analyze how well players on a team are cooperating, and adjust conditions accordingly.

At the environment level, a game could keep generating new experiences such as new levels or worlds based on player preferences, performance, or other data. This could give players almost limitless environmental levels or features to explore.

On mobile, the Qualcomm® Snapdragon™ Mobile Platform is powering mobile gaming with its onboard processors. Its Qualcomm® Adreno™ GPU works well both for rendering and for the vector calculations required for machine learning, while the Qualcomm® Hexagon™ digital signal processor (DSP) can be used to power the computation processing needed for machine learning.

Developers can develop for Snapdragon using the Snapdragon 855 mobile hardware development kit (HDK) and then incorporate SDKs such as our Qualcomm® Neural Processing SDK to run neural networks, the Adreno SDK for rendering, or the Hexagon SDK for digital signal processing.

Game Creation and Testing

Not only is AI finding its way into games as they are being played, but we’re also seeing a trend towards its use during game development, which has traditionally been plagued by challenges such as tight deadlines, changing requirements, and large complex code bases. Seeing AI being incorporated into development tools to help overcome these issues is a welcomed addition to the process.

On the content side, tools are starting to emerge where content such as meshes or audio can be generated from other types of data. For example, AI is showing potential for usage in generating worlds or augmenting the procedural generation of environments. This gives the potential to reduce the time and complexity of creating these game assets while providing more variety to players. Another application includes facial expressions, where AI can be used to determine a character’s mood from audio data, and automatically generate facial poses that correspond to that mood.

It’s been suggested that in the future AI could customize the game (or parts of it) for you through a set of suggested ideas, rules, or other simple constructs that you provide. For example, the use of a generative adversarial network (GAN) is already showing great promise in the generation of realistic facial models. This could be used to generate new NPCs such as crowds in a stadium. GANs could also be applied to the generation of other art assets such as in-game objects.

Another area of game development that faces tough challenges is testing (aka quality assurance or QA). Game testers typically need to play all areas of a game repeatedly to check for things like collisions with walls, correct behaviors, rendering artifacts, and correct messages to name a few. Testing can become even more complicated for multi-player games, which require additional testers and game instances, as well as back-end servers which must stay in sync for the game to function correctly.

Recently we’ve seen systems using reinforcement learning, which are capable of playing simple games by analyzing the frames rendered on screen. While such systems are currently limited to relatively simple games, they’re showing great potential for future use in QA. For example, they could be used to substitute some of the human players required to test a multi-player game, freeing up those testers to focus on other areas.

AI and game developers could start to incorporate some of these ideas by using the Neural Processing SDK for AI as well as the Qualcomm® FastCV™ Computer Vision SDK that can perform computer vision analysis on raw pixel data.

Analytics

More and more player information is being collected to better understand who they are, their skills and learning levels, how often they play, and even where they play. The ability to mine this data and act on it has helped identify broad segments of players, but now with AI it can be used to identify micro segments and individual traits. This information can then be used to help create a more personalized experience for the player. For instance, understanding that a player’s engagement level is waning could trigger some real-time game play that might adjust game levels or strategies or offer coupons to encourage additional play time.

AI and analytics can also be used as a tool for the players themselves. We recently saw an example at GDC where an eSports team had the ability to analyze the game play of a competing team. What made this amazing was that the data was used to drive an AI-based team, so that the eSports team could practice playing that opponent before actually competing against them!

Analytics also continues to play an important role for managing game projects. For example, in QA you can collect all sorts of stats to predict upcoming bug counts, bug fix rates, etc. This information might come from development of previous revisions of the game or from other games at the studio, but either way, the analysis of this data can be a time consuming, manual process. Since this is an offline process (i.e., it doesn’t need to execute in game code), AI is a potential candidate to perform this analysis and help managers draw conclusions about how well their project is progressing.

Conclusion

Approaches to AI such as machine learning are increasingly finding their way into game play, the tools used to develop games, and in various applications of analytics. Moreover, AI and machine learning is showing potential for all sorts of uses including monetization, game personalization, and project management.

We here at QDN want to help you invent new AI approaches, and transform the mobile gaming industry. With all of the trends we’re seeing, we’ve love to know if you are considering gaming for your next AI project.