cover

Artificial Intelligence in videogames

What is Aritificial Intelligence in videogames?

Usually the common thinking of ā€œArtificial Intelligenceā€ makes us very distant from the concept of videogames: indeed there are multiple meaninag of Artificial Intelligence, yet it is possible (and very common, actually) to talk about Artificial Intelligence in videogames.Ā  Two quite basically examples are:

  • Assisting gameplay: such as the position of the enemies on the map
  • Non Playable Characters (NPC): such as the partners that guide us, or helps us, during the game (a very NPC I personally enjoy is Atreus in God of War).

It is possible to list a quite long list of video-games that use Artificial Intelligence in different ways, some examples may be:

  • Detroit Become Human
  • Red Dead Redemption, both 1 and 2
  • Halo (Cortana is actually dedicated to the character in the videogame!)
  • Monster Hunters
  • Until Dawn
  • Cyberpunk 2077 -ā€¦and many more!

Yet, most of them use a different concept of Artificial Intelligence

The importance of Artificial Intelligence in Videogames

Videogames, with AI, are able to provide a better experience for the user an to their games itself.Ā 

image
image

In this game we play three different characters: all of them are robots that have to make choices. Every choice that we do, will change inevitably the story, including the different characters.Ā 

A quite similar game is ā€œUntil Dawnā€. We also play different characters and the multiple choices are presented to us with the name of ā€œbutterfly effectā€, here too every choice can make a huge difference on the game history.

image
Image Credits: IGN

But, in these cases, how the AI can be realized? Game AI often amounts to pathfinding and finite states machines in a form of tree.Ā 

Pathfinding gets the AI from point A to point B, so for example if we make a choice in Until Dawn, we may be redirected to a different tree, instead of a desired one. This method is called Monte Carlo Search Tree Algorithm:

image
Image Credits: Harvard.edu

Above, an example of MCST.

Let us now talk about the NPCs, that would be the non playable character during the game (such as the character that walk with us and help us). There are four potential application areas:

  1. Player-experience modeling: an example may be the dynamic game difficult: if we play ā€œeasy modeā€ the NPCs may do all the work (if it is our ally) or basically do some slow and predictable movements (if it is our enemy).
  2. Procedural-content generation: levels, music, conditions are created in an automated way. So, the AI can generate differents levels, different content, different stories. An example may be ā€œCyberpunk 2077ā€; at the start of the game you can choose between three different backgrounds, each one will lead to a different story.
  3. Data mining on user behavior: mostly for the exploration game (so, open-world).
  4. Alternate approaches to NPCs: in this approach, it is more important the beliavility of the NPC (such as understanding if someone is lying to us, or it can be trusted) instead of the individual behavior.

For these, we donā€™t follow procedural approaches, yet generative adversarial networks (GANs) can be used to create new content. These types of networks will understand during the game and act depending on our behaviour.

Related articles:

    background

    05 December 2022

    avatar

    Francesco Di Salvo

    45 min

    30 Days of Machine Learning Engineering

    30 Days of Machine Learning Engineering

    background

    16 January 2023

    avatar

    Daniele Moltisanti

    6 min

    Advanced Data Normalization Techniques for Financial Data Analysis

    In the financial industry, data normalization is an essential step in ensuring accurate and meaningful analysis of financial data.

    background

    17 January 2023

    avatar

    Francesco Di Salvo

    10 min

    AI for breast cancer diagnosis

    Analysis of AI applications for fighting breast cancer.

    background

    14 November 2022

    avatar

    Francesco Di Gangi

    5 min

    Artificial Intelligence in videogames

    Artificial Intelligence is a giant world where we can find everything. Also videogames when we don't even notice...

    background

    18 November 2022

    avatar

    Gabriele Albini

    15 min

    Assortativity Coefficients in social networks data

    Assortativity helps analysing pattern of connections in networks. Letā€™s use it to confirm if people tend to connect to similar people.

JoinUS