How Intelligent is Artificial Intelligence?

Niall Deakin
13 Dec 19

What is “Artificial Intelligence”?

A quick Google search brings me this:

The theory and development of computer systems able to perform tasks normally requiring human intelligence, such as visual perception, speech recognition, decision-making, and translation between languages.

Google: “define artificial intelligence”

So what does this mean for Games Design (shocker, an article on a different subject)?

The way I see it is that it basically means how the game reacts and interacts with the player. This could be enemy spawn rates, aggro’ing, or changing the difficulty based on the player’s performance.

What about “learning AI”?

I wouldn’t say that is much different than “regular AI”, except for it saves it’s previous interactions, the actions and results, and then aims to figure out what the best possible solution is to reach it’s set goal.

Let’s use Mario for an example.

There are a lot of power-up blocks in any one of the games.
The AI could have some code to track how the player’s interact with these blocks. It could save which power-ups are more desirable based on this info (i.e. players will go for the Tanooki Suit over the Fire Flower).

Now, say the game had a “Random Block”, which would put in a random power-up. It could use the data collected to see what the player’s preferences are and fill that block with their preferred power up.

Using another Random Block scenario, say that the player can see what the power-up will be. The AI could randomly fill the block and record if player’s grab the Power Up or not; it could then optimise it’s selection process to fill the block with the more popular power-ups.

Any other examples?

There is at least one game which I’ve played (the name of which I’ve forgotten) where if you die too many times, it asks if you want to change to an easier difficulty.

This, is a part of AI. It takes some values (i.e. the number of consecutive deaths) and makes a decision (i.e. the prompt to change difficulty).
It’s a small thing, and very basic, but it’s a part of it.

The difficulty setting in of itself can be a complex process or very basic.
I.e. changing enemy stats so they hit harder and take longer to defeat, turning on/off features, or even making enemies “smarter” by running around obstacles and ducking for cover, rather than running directly at the player.

Those levels of “intelligence” vary.

Quick Summary

It essentially comes down to how complex you want your game to be.

Damage calculation is AI.

if(targetHit) {
  HP = HP - Damage

  if(HP < 0) {
    Die
  }
}

Spawn rate is AI.

if(EnemyCount > 10 && EnemiesKill < 25) {
  SpawnEnemy
}

Or, as I said previous, player tracking is also AI.

if(playerPos < 10) {
  moveToPlayer

  if(coverObject < 5 && playerIsGood) {
    takeCover
    wait(5s)
    shootPlayer
  }
}

So you can make it as complex as you need it to; it’s all about setting some goals for what you want the game to do, and write the rules to achieve those goals.

Just don’t make it so the machines set their own goals and rules… that’s when they’ll take over.

AI, Artificial Intelligence, Games Design, Learning AI, Machine Learning