The hunt for bugs: Understanding the architecture of AI through the epic Fail
Introduction
Modern games are very complex AI and it happens that the systems fall under the onslaught of ambitious designers on the one hand and creative players on the other. Youtube and other media sites are full of commercials with bugs, even from the latest games. Viewing these bugs can be not only instructive, but also give an understanding of the implementation of AI.
In this article, you will discover the basics of the game AI architecture through a series of funny game bugs captured in video clips. Experts from AiGameDev.com Philip Dunstan and Alex Champandard will conduct an autopsy and analysis of the bugs so that you can see the overall picture of this technology. After this lesson, you can try to answer the question of why NPCs behave this way in your favorite game and what solutions there can be.
About experts
Before joining AiGameDev.com, Philip Dunstan worked for more than five years at Electronic Arts. As a member of the central technology group, he worked on some of the famous games from EA in studios around the world. For the past couple of years, Philip has specialized in physics simulation, including helping create the Impact engine for FIFA 12. ')
Alex Champandard worked on a joint technology in the RAGE engine from Rockstar Games, in particular in TABLE TENNIS and MAX PAYNE 3. Alex recently signed a contract to create bots for multiplayer games in KILLZONE 2 and 3, and he regularly consults studios with AAA games, mainly in Europe.
To understand what specific bugs will be discussed, let's look at this video from FIFA 12
Well, this is quite a complicated bug and we will not see worse today ...
First, let's look at the basic architecture of AI.
When it comes to architecture for traditional AI, for example for robots, it is usually the concept of “Perception-Thinking-Action”. This traditional approach is quite applicable to gaming AI.
I suggest you classify bugs and relate them to the appropriate category in the chart. To do this, watch the video and think about what part of the architecture there are bugs in each game demonstrated - in perception, in reflection or in action.
Of course, in modern games, the implementation of AI is much more complicated than this diagram, and the data is sent from block to block back and forth.
I think many of you have noticed that the bugs of these games for the most part belong to the block “Action”. Let's elaborate on this block by specifying two components that are relatively fundamental pillars in this block, although of course there are other parts (for example, vocalization). I propose to classify bugs in the above video again, but in more detail - a navigation bug or animation bug.
A bug can not always be attributed to only one unit, and the problem can often be solved with different approaches. Let's look at the bugs in the next video. Which of them will you attribute to animation errors, and which ones to navigation errors? Or maybe these errors have a different nature?
The “Thinking” block can also be divided into several parts of which the main ones are “Reasoning”, “Behavior” and “Memorization”. How would you classify bugs now?
The “Reasonings” block receives and processes information from the “Perception” block and draws some conclusions based on this information, for example - I see an object not far from me, this is an enemy object, this is a sniper and I need to get out of here. The block of behavior based on the conclusions decides how this decision will be executed - to flee off, to leave with the head held high or to crawl slowly towards the cemetery. Unfortunately, the “Memorizing” block is not used as often as we would like, let's hope that in due course this block will become as important as the other two in the “Thinking” segment.
“Perception” in a game AI differs from sensory perception in robotics — in robots, a video camera or other device for obtaining depth (sonar, lasers, etc.) is often used as a sensor, while in a game AI, information comes in data, such as data to identify collisions, to find a path or about game entities.
And one more video - errors of which block or blocks led to such game situations?
Well, for clarity, we show the structure of the brain NPC again:
If you have any good thoughts about what you see, then please share. Thought. Write your comments to the address: Moscow, Shabolovka street 37, program “Visiting Kafka”.The one who sent the most reasoned assumptions will receive the title “AI is doing good work!” And a chance to take part in the “Field of Miracles” program dedicated to video games.
ps: I apologize for the gag in terminology, the translation is slightly free and sometimes adapted to fit your needs (instead of detailed comments and jokes in the original video, this is just a test for readers with a light excursion into the game AI).