AI in Video Games: A Worthy Adversary

  • Dinesh Kumawat
  • Apr 24, 2022
AI in Video Games: A Worthy Adversary title banner

Artificial intelligence or AI is intelligence that is displayed by machines as opposed to natural intelligence displayed by living creatures. The difference being, living beings have evolved to develop the powers of reasoning that we exhibit, whereas programs must, in essence, be told how to act.

 

The History of AI

 

The idea of an intelligent creation has existed for centuries. Mary Shelley told the story of the modern Prometheus, Frankenstein’s monster, a humanlike creature built by a scientist that is shunned by society. As a species we have an apprehensive fascination with the prospect of creating intelligence more advanced than our own.

 

The field of research began in earnest in the 1950s once computers became more accessible. One metric by which to measure AI is the Turing Test, named after and founded by the luminary computer scientist, Alan Turing. He posited that AI is successful if it can believably mimic human responses.

 

Also Read | History of Artificial Intelligence


 

AI In Gaming

 

Nowadays you can find AI implemented into many facets of our lives – from Netflix recommendations to personal assistants, Siri and Alexa and from self-driving cars to language translators. But there are few areas of modern life where a more thorough intercourse between humans and computers takes place than in video games. 

 

Reactive Machines

 

Take a simple card game, for example; poker tournament chip distribution would be the responsibility of the AI dealer – a simple task that requires only to divide the pot evenly among the players at the beginning of the game.

 

As the game progresses, the chips are deducted from the players’ totals as bets are made and then reassigned to the player that wins the pot. This type of AI is categorized as a ‘reactive machine’, since it deals only with the world in front of it and doesn’t need to retain any information to become more efficient at its task.

 

Reactive machines can also be more complex. A good example is Deep Blue, the groundbreaking chess tournament computer system that became the first to beat the world chess champion, Garry Kasparov at the time.

 

Deep Blue was loaded with a database of hundreds of thousands of chess moves, opening positions and endgame strategies which were obtained by analyzing real life games played by masters. The computer would then draw from that knowledge based on the moves Kasparov played and the position it found itself in. In the watershed event, Deep Blue won the series 3-2 with one draw.

 

It was once thought that chess was a game so complex that a machine could never outwit man but since that day, AI has advanced to the point where a human hasn’t beaten a chess computer in over 15 years.

 

AI controls many aspects of a video game – how the NPCs (non-playable characters) move and interact with you and one another, another example is when AI produces football match intelligence analysis and utilizes data within algorithms to help make strategic decisions for coaches. Most AI adversaries seem like they are making decisions but in reality they are performing a set of (sometimes complex) instructions based on the environment they find themselves in.

 

Bad AI sticks out like a sore thumb. Due to a small error in the code, your Xenomorph adversary in Aliens: Colonial Marines would often walk right by you. This was later fixed by a modder.

 

Also Read | 5 Game Development Companies Integrating AI Research



 

Machine Learning

 

A more demanding requirement of AI involves some way for it to retain a record of data that it has encountered before and to use that to inform its decisions. Programmers can account for players repeating the same move by keeping a record of how many times it has been attempted, and if it exceeds a given number, to have the AI react in a different way.

 

For example, in Mortal Kombat 11, if you rely too heavily on the same move, the computer will start to punish you by performing the appropriate counter attack. Metal Gear Solid V also tracks a player’s preferred tactics and responds accordingly. If the user leans heavily on sniping, the AI will distribute helmets among the enemies.

 

Machine learning goes well beyond preprogrammed simple instructions such as this. The documentary AlphaGo tells the story of the Google DeepMind computer that was designed to beat the world’s best ‘Go’ players – a traditional Chinese game vastly more complex than chess. It is said that the number of legal Go moves exceeds the number of atoms in the observable universe.

 

Unlike Deep Blue, AlphaGo was programmed to learn, initially from playing against humans, which moves would result in a better outcome. AlphaGo was the first machine to beat a professional Go player and its successor AlphaGo Zero was able to train by playing entirely against itself.


 

Procedural Generation

 

There are also games that use procedural generation to create a unique experience for each player. This involves a multiplayer content creation algorithm rather than individually coding each element – essentially writing the code that writes the code.

 

No Man’s Sky, although perhaps not living up to expectations upon release, made a promise during development of billions of unique planets to explore. When sceptics were not convinced this was possible, the company switched to a 64-bit key and created 18 quintillion planets.

 

Procedural generation is not a new idea. A keystone of the ‘roguelike’ genre is characterized by its random dungeon crawling mechanic, first demonstrated by its namesake Rogue in 1980.


 

The Future of AI

 

Games have certainly become a lot more sophisticated as a result of advances in the field of AI. Analysts even suggest that in the future, AI will have a hand in the development of games as a sort of collaborator – even the games themselves might change each time you play them.

Latest Comments