π Digital π Science and technology
Do video games contribute to scientific progress?

How playing video games improves AI

Jean Zeid, Journalist
On October 6th, 2021 |
3 mins reading time
How playing video games improves AI
Axel Buendia
Axel Buendia
Professor at Cnam, Chair of Interactive Digital Media and Director of Cnam-Enjmin
Key takeaways
  • Certain developments in AI have been made only because of the new opportunities offered by video games.
  • Video game AI must be able to create a brief illusion in the environment of the player to improve the immersive experience, including behaviour of ‘non-playing’ characters’.
  • Secondly it should be used to surprise the player with capacities such as very realistic dialogue capabilities or emotional AI, meaning many games are based on increasingly complex AIs.
  • Third, companies use AI to analyse gameplay, using adaptive AI or statistical learning to collect data and improve game features; something which has become easier with more games being played online.
  • Nonetheless, AI is still a secondary artefact, second only to the visuals, which are still the main selling point.

The glob­al video game mar­ket is a colos­sal enter­tain­ment sec­tor, cur­rent­ly esti­mat­ed at over €100bn. Cer­tain tech­no­log­i­cal devel­op­ments have been made only because of the new oppor­tu­ni­ties offered by video games. The most strik­ing exam­ple is com­put­er graph­ics cards that evolve rapid­ly today thanks to the video games sec­tor push­ing real-time 3D to its lim­its. The same goes for real-time ren­der­ing algo­rithms. Invest­ments and the sub­se­quent progress that goes with them would not hap­pen at the same pace with­out the video game econ­o­my. Not to men­tion aug­ment­ed real­i­ty (AR) or vir­tu­al real­i­ty (VR), for which the same it hap­pen­ing. As such, video games have an impact on research, par­tic­u­lar­ly arti­fi­cial intel­li­gence (AI).

What’s more, AI imple­ment­ed in video games is a spe­cialised sec­tor. Indeed, in a video game, con­trary to what one might think, the goal is not nec­es­sar­i­ly to beat the play­er at all costs. Rather, it’s more about offer­ing a chal­lenge. The AI must win some of the time, but also lose from time to time oth­er­wise play­ers stop play­ing. But AI in video games is not just about ani­mat­ing the oppo­si­tion. There are oth­er objec­tives, too.

Objec­tive 1: under­stand players

First, AI is use­ful in terms of the player’s per­cep­tion of their envi­ron­ment; mean­ing how the cam­era posi­tions itself in a coher­ent way in rela­tion to the avatar, the way light dif­fus­es on the envi­ron­ment, the music, etc. When I am mov­ing in a game, my envi­ron­ment must adjust based what I am doing, and antic­i­pate what I want it to do to assist me.

But what peo­ple first per­ceive of AI in video games are the NPCs, the “non-play­er char­ac­ters”. Their pur­pose is to cre­ate a brief illu­sion. In a war game, most play­ers don’t play around watch­ing guards for half an hour. Instead, the play­er will see the char­ac­ter for a few sec­onds before shoot­ing it or being shot them­selves. An AI that works well is above all an AI that you don’t see is there, they blend into the game. The sit­u­a­tion to avoid is an NPC that stum­bles end­less­ly on the edge of a table being blocked from return­ing to ‘nor­mal’ behaviour.

The AI of oppo­nents is thus much eas­i­er to code than that of com­put­er-con­trolled allies.. This is because, with the oppo­nent, the rela­tion­ship is brief. He doesn’t need to real­ly under­stand what I’m doing, where­as an ally does. It must know if I need help catch­ing ene­mies in secret or cov­er­ing me in an attack. That’s why we often use orders, it great­ly sim­pli­fies the pro­gram­ming of ‘ally’ AIs.

Objec­tive 2: Sur­prise players

If the first lev­el of AI in a game is to do every­thing to pro­duce a coher­ent and cred­i­ble envi­ron­ment, the sec­ond lev­el is to sur­prise the play­er; a more advanced task. Some suc­ceed, oth­ers don’t. The his­to­ry of gam­ing is lit­tered with many famous exam­ples of AIs. From Pac-Man’s ghosts, through HalfLife’s marines (able to coor­di­nate for tac­ti­cal actions), Cap­tain Blood’s aliens (with very real­is­tic dia­logue capa­bil­i­ties), Crea­tures (real pets with a cer­tain intel­li­gence) or Black & White’s semi-autonomous avatars (able to learn your play style to adapt their behav­iour), or Event0’s space sta­tion (emo­tion­al AI that you have to con­vince to help you), many games are based more par­tic­u­lar­ly on more com­plex AIs.

Objec­tive 3: adapt to players 

The third func­tion is to analyse the play­er, his reac­tions to the chal­lenges, where we find the trend of adap­tive AI or sta­tis­ti­cal learn­ing. The game sends data to the servers of the pub­lish­er or stu­dio, and this data will be analysed to find out what was appre­ci­at­ed or not in the game. And this data analy­sis will be traced back to the game design­er. Today, in a mar­ket that has become large­ly online, this process has become sim­pler. Very ear­ly on, alpha or beta ver­sions of a game are launched to have as many peo­ple as pos­si­ble play them and col­lect as much data as pos­si­ble so as to mod­i­fy the game accord­ing­ly for the time of the offi­cial release; it has a lot of pos­i­tive effects.

For exam­ple, it cre­ates a com­mu­ni­ty and some game stu­dios, very few of them, are doing research on real-time con­tent mod­i­fi­ca­tion. It’s a real break­through in the con­cept of real-time analy­sis. A new step would be to have a rela­tion­ship with the play­er, not nec­es­sar­i­ly via dia­logue, but a rela­tion­ship that is cred­i­ble enough for the play­er to feel that they are deal­ing with real human intel­li­gences. This would be in line with the ini­tial utopia. But we are not there yet. For video games, and even if it plays an impor­tant role, AI is still a sec­ondary arte­fact, sec­ond only to the visu­als, which are still the main sell­ing point. It’s eas­i­er to quick­ly con­vey the key points of a game (its uni­verse, its sto­ry, its char­ac­ters) through visu­als than through AI, which takes longer to exper­i­ment with and is there­fore less of a mar­ket­ing point.