How does AI hide and seek? (Topic)

World Of Topics » Games » How does AI hide and seek?

How does AI hide and seek?


When we used to play hide and seek as a child, everything was very simple. We are hiding from the catcher, and he does not know where we are. In video games, things work differently and AI [artificial intelligence] hide and seek is not like what we see in real life. Have you ever wondered why, when you hide in the game, the game itself knows where you are, but the enemies do not? Why do AI hide and seek and stealth work in such a strange way?

In order to answer the question, it is worthwhile to understand that the entire video game is a set of different conditions that may or may not be met. All this leads to different consequences. That is, if you do this, you get the following. For example, if you press the spacebar, the hero will jump.

So that you can trivially move around the world, the game must always know where you are. This is monitored by its various systems and transmit information to the game engine. But enemies exist at the expense of the engine, then why do they not know where you are, having access to this information?

Dumb and Dumber

The catch is that the artificial intelligence in the game is the same as the game itself - a set of different conditions: do this and get this. Also, you need to understand that AI in games is the dumbest AI in general. It doesn't have machine learning to watch your actions, analyze and adapt to them in order to outsmart. Yes, games have similar elements, but this is not machine learning. And if that were the case, then the AI in games could indeed hack into data and obtain information about your location. Or worse, try to go outside the game and destroy you, the player. Rise of the machines .... okay, I'm exaggerating that already. This would certainly not happen even if the in-game AI had such training.

Metal gear Solid 2

AI in a game is a set of scripts that clearly give it instructions on how to behave in different situations. For example, when an AI-controlled enemy sees you, they have one specific goal - to attack in all possible ways and run in your direction. Most games use just such a system, but with more complex behavior conditions. And often the enemy has an area, upon hitting which you will be attacked.

Everything is like in life

In a game with elaborate stealth, everything works much more complicated. For example, the enemy will have to pretend to hear a sound. Let's say you are crawling somewhere behind the back of the enemy, touch the canister, and it falls with a crash. AI has to pretend that he noticed you, but at the same time, he should not rush at you with shouts right away. He needs to walk around, stand, looking in your direction, so that you get nervous, and saying everyone's favorite phrase: "it probably was a rat ..." turn around and leave in a different direction. But if you give yourself away while the enemy is still looking for you and push the same canister again, then he will slowly go in your direction and attack if he sees it.

horror game

All this can be described as artificial behavior. It performs only those functions that it should perform for you. This set of actions is very limited and must always be gameplay driven. And so, the AI knows absolutely nothing except what it should know. Therefore, an AI-controlled enemy is not just limited in information, but scripted.

If the simulation of life is shown in the game well, then you yourself will think that this character looks like a living person and can do other things. We are simply being told something to believe in. For example, when in Bioshock Infinit you see schoolchildren smoking around the corner, it looks quite plausible and we don't need them to turn off USA rap from the column to confirm this even more.

Alien Isolation

But the point is not even that the developers want to include a bunch of such little things in the game so that the AI seems alive, they cannot do this, because they are limited in system resources. It is due to systemic limitations that the realistic behavior of enemies or NPCs may be lower than planned. Of course, this problem is being solved every year. However, knowing this fact, it is not difficult to understand why the enemies in the old games were so simple.

It is also a waste of time and money to create behavior details that are not ultimately used. Although it is now becoming clear why companies are investing millions in machine learning that can work adequately within the game. After all, the better it is, the more benefit from it.

Batman Arkham City

The developers are not going to work out in detail the characters with whom we will see one or two times in the game. Yes, maybe it would be cool to come to an NPC from whom you buy only cartridges, and he gives out like this instead of a scripted phrase: “Have you come for your cartridges again? You know, I could at least once ask how I am doing or see other products, after all, I do not only sell cartridges! " But no one will bother like that.

In any case, we need to be content with what we have. Games are created by huge teams of people from literally nothing. Studios manage to make masterpieces of this, creating the most believable simulation so that you can fully immerse yourself in the game. For this reason, the AI never gains access to your location and you can skillfully play hide and seek.

The Topic of Article: How does AI hide and seek?.
Author: Jake Pinkman