• Welcome to TechPowerUp Forums, Guest! Please check out our forum guidelines for info related to our community.

Artificial Intelligence in games

Joined
Sep 29, 2020
Messages
51 (0.03/day)
Most games have extremely basic AI. In RPGs as well as other games NPCs or enemies just stand in place to talk to a player or attack him in the most direct way the moment they ‘see’ the player.

AI is extremely underdeveloped in games. In my opinions for three major reasons.
1. It’s not ‘worth it’ for advertisements since you cannot show the AI before a game’s release: Screenshots are static, trailers are short and focus on action. Therefore you cannot build hype based on AI at all.
2. Players don’t care about AI. People often discuss graphics, stories, atmosphere or quests, but I find it extremely rare that an AI is discussed. Players are engaged in a game due to fluid or challenging combat, fascinating stories or atmosphere i.e. of a horror. AI? It doesn’t happen.
3. Money. I have no idea, but I guess developing AI is much more complex than most other game features. It would need lots of work, and therefore investment. Gaming companies usually don’t pay well in comparison to IT, but require similar skills. Somebody who could develop a good AI will likely move to an IT company that pays much better.

In consequence there were few attempts to develop a decent AI in games. By ‘decent AI’ I mean an AI that attempts to adapt to the situation in some ways. This is not case in i.e. Gothic with its NPCs walking around and having a day-cycle of work -> eat -> rest -> sleep. It’s a great feature, but it’s just scripts that run in a loop every game day.


‘Decent AI’ would be one that adapts to the situation or even caused either by the player or another trigger.
Here are the few attempts at developing AI I can think of:
1. F.E.A.R.
2. ArmA series
3. Stalker series
4. Oblivion


F.E.A.R. had the best combat AI for close quarters. Enemies attempted to attack in groups, constantly move so you can never be certain where they are if you don’t see/hear them, react to downed enemies (don’t go to the place an ally just got shot like happens in 99% of shooters), try to quickly overrun you so you don’t have plenty of time to reload, try not to come out twice from the same corner, and probably more I can’t remember. It’s important to note the following games in the series ditched the AI because consoles wouldn’t be able to support it, so there are dumbed down versions of it that are not as smart. I will mention also that due to nature of the game (basically railroaded shooter) there aren't really situations where AI (group) interacts with anything but the player.


ArmA series is a bit difficult to describe due to complexity of all in-game systems, but the AI can simulate combat, even large scale one (although the more units there are the dumber AI gets due to CPU thread limitation), they change position and once alerted stay on high alert for quite a while. AI shoots through walls in general direction where the enemy might be. In ArmA 3 AI can call reinforcements through radio, so attacking a checkpoint can result in AI calling reinforcements from nearby bases or i.e. a helicopter from a viccinity. This works both against the player as well as other AI. Of course it’s all vanilla, if we include mods then AI can get even better. That said, it was clearly never developed to handle close quarters very well, and in that aspect it falls short in comparison, although is still way above vast majority of shooters. AI can also manage driving or flying vehicles quite well, adapting to the surroundings. The only major drawback I ever felt with is that it doesn’t use grenades often, but I’m nitpicking. ArmA 3 is probably the peak of this AI, as ArmA Reforger abandoned it altogether having very simple AI that currently is neither able to flank nor drive vehicles. It will surely be improved in ArmA 4, but I suspect it will take a long time before it’s on the level of ArmA 3… if ever in the series.


S.T.A.L.K.E.R. Shadow of Chernobyl (originally titled Oblivion Lost) made a big deal about its AI before release and it turned out to be… better than in most games. It is certainly not on the level of ArmA 3 or the first F.E.A.R., but it has its own strengths. Flanking is known since at least the first Far Cry, but STALKER seems to have enemies being able to sneak on the player. Human enemies can handle combat alright both close quarters and from afar, although they don’t seem to be able to work in teams, unfortunately – although they attack together I don’t think there’s any communication between them. Animals have their own AI, hunting other animals (also seen in Gothic 3), and actually pulling out forming and attacking in packs. It is important to note that the developer who worked on the AI in the STALKER series, Volodymyr Yezhov, died fighting in Bakhmut at the end of 2022. How it affects STALKER 2 is to be seen yet.


Finally, the last on this list is TES IV: Oblivion. It attempted to create randomized dialogues between characters and to have some kind of AI awareness of what it sees, as well as having the typical scripted actions, but with AI left to determine itself how to achieve them. It’s more advanced than simple scripts in Gothic. Unfortunately the systems seemed to be very basic at the time leaving to mostly hilarious results. Overall, it felt to me personally as an early version of an AI that wasn’t finished on time. I didn’t play Skyrim much, but from what I’ve seen it seemed to me that Bethesda mostly abandoned the idea. Instead of developing the Radiant AI further, Skyrim focuses on simple scripts and prepared dialogues more to avoid the random aspect and make the experience more “cinematic” and repetitive. This certainly saves some development time. Oblivion had a lot of little things, if people liked you enough, or were immorally minded, they'd side with you against the guards. If a Thieves Guild member saw you rob something, you wouldn't get a bounty. And goblin wars:
Goblins often go to war with other goblin clans, usually because one clan has stolen another clan's Goblin Totem Staff.

One immediate example of this involves the White Skin Clan and the Sharp Tooth Clan, both of which can be found close to Skingrad. In order to assert dominance or prove who is better, a clan may steal the totem staff of another clan, initiating a goblin war. Inside the cave of the Sharp Tooth clan, it is possible to find the White Skin's totem staff, along with White Skin Goblins combating the Sharp Tooth to get their staff back.

Upon taking a goblin totem staff, there are two options; sell it, or toy with the goblins at their expense. To do this, simply deposit the staff anywhere, and the staff's respective clan will clamber around the area to protect it, no matter how far away it is. Alternatively, placing a goblin staff at a settlement or within a city will cause the clan to attack whoever is near it (note that the goblins will likely kill many, so it is not recommended to save after doing this, as many shopkeepers, guild members etc. can be killed). Another option is to leave the staff near to, or within, another goblin clan's cave, causing the two groups to combat each other.
Goblin (Oblivion) | Elder Scrolls | Fandom


Well, that's just my random thoughts about it, I'd be interested in hearing your opinions and especially about other examples of attempts at creating a decent AI in games that isn't there just to interact with the player and that's it.
 
How will LLMs help games?

Super unscripted version of monkey Island?

Strongly doubt the humour would be anywhere near the scripted original.
 
FEAR AI was not quite what it was touted to be. It did have the novel-at-the-time features like taking cover and some basic teamwork like simultaneous attacks. A large part of hype was around multiple directions of attack and flanking but that was really a more level design than anything. Even an average combat AI today - looking at similar level of AAA games - is far far beyond this.

Daily routines and some level of reaction to triggers has been and is increasingly a standard thing. The amount of activities and related branching is quite large these days that is "good enough" for almost all purposes.

AI in the recently blown up generative AI sense probably is not a good fit for game. It requires dedicated hardware, is relatively heavy to develop, train and implement and unclear whether this will result in something all that much better than what we have now. Plus the entire problem with controlling the results. Game and engine makers are definitely experimentin with it but that is a problem for another year or decade.
Edit: LLM and generative AIs can be and (if not yet it) will soon be a resource for asset generation though.
 
How will LLMs help games?
Generating AI factions with lore from prompts for games?

Galciv 4 is already looking into this.
 
Simply said, machine learning and prescriptive rule-based judgments are both referred to as AI. The first has always been utilized in games, but it took decades to build the hardware and algorithms needed for practical machine learning, such as that used in self-driving cars, the creation of photographs, or dominating games like Go and Dota 2. While machine learning in general continues to improve quickly, a subset of ML models that specialize on NLP recently went viral because it turns out that the more information you give it access to, the more effectively it can "reason" to produce language-based output. GPT is exactly this. With these contrasts in mind, it is important to understand the past, present, and future of AI in games. geometry dash
 
I think a great example of 'good AI' that is missed in this TS is the one we see in Elden Ring.

That type of AI shows us that if you want a super tight gaming experience wrt AI behaviour, you need to craft your game around that behaviour and vice versa. The entire combat system of Elden Ring (and predecessors) is built around timing rules, and the AI basically responds to those timing rules which also means the way you press your own buttons; effectively 'cheating' to achieve a similar dynamic as the player versus the NPC: you fight based on the counter. On top of that, there is the basic AI attack pattern, influenced by numerous variables such as distance to character.

Many games have little to none of that responsive type of AI behaviour. Right now though I'm playing Darkest Dungeon 2 which is yet another showcase of fabulous AI and masterfully crafted team compositions and gameplay elements to create a very tight combat experience. It underlines again that a great AI is nothing without a game around it that is tailor made for that specific kind of behaviour.

So yea... AI in games? The most entertaining AI in games is built by humans, and not 'generative'. A system of defined rules and boundaries is necessary, unless you also give the player limitless opportunity to counteract whatever the AI devises. But without boundaries, how can you ever craft a tight game experience? These elements are at odds with one another, and when you start imposing lots of limitations and boundaries, effectively you've just created another AI 'the usual way' - its just based on variables.

Conclusion: any game selling you buzzword 'AI' in games is lying to you and has every potential to be a box of junk, but I'm sure it'll be good to distract gamers for a few years until they finally conclude the same. That's how big tech loves to roll right... Oh shit our current buzzword is going out of fashion, quickly, create a new one and sell sell sell. Meanwhile, not a single product/game stands out as being great with this new technology. The list is growing fast: 3D, VR, RT, Machine learning, AI... None of it implicitly says 'good game', and none of them ever will; I would dare say the amount of buzzwords is proportional to the level of overpriced, overinflated nonsense you get.
 
Last edited:
More speech for me to skip. And i doubt it is used for more then that.
Just like chatgpt it is fun to interact with the AI for the first couple of times, but it quickly gets old, you realise it's unreliable, and in the case of a game it will break the immersion. It's better to just google and see what is the best answer for ourselves and the pre programmed answers will probably make more sense too.
 
I figure RPGs would be pretty short if the AI learned to post something other than a lowly lvl 1 wolf around the point where you start.

For shooters than involve bots, techniques like reinforcement learning have been employed for years. The challenge there isn't to employ AI, but to dumb it down to a level manageable by human players. Otherwise it would all turn into you getting a head shot at your every other step.

Where AI could really help, is the design phase. It can come up with some innovative map designs, maybe new game modes... stuff like that.
 
How will LLMs help games?

Super unscripted version of monkey Island?

Strongly doubt the humour would be anywhere near the scripted original.

Why not? Imagine a game like Skyrim where every encounter has different dialogue and story line? Sure the mechanics could be somewhat standard but it would add to the replay ability and fun things that would be added to the story lore.
 
Why not? Imagine a game like Skyrim where every encounter has different dialogue and story line? Sure the mechanics could be somewhat standard but it would add to the replay ability and fun things that would be added to the story lore.

NPC: why don't you do the quest i asked you to, don't you love me, i fell like dying, i'm going to kill your family and burn your house
 
All machine learning in computer games suffers from a shortage of training data.

That isn't the case for games like Go and Chess.
 
All machine learning in computer games suffers from a shortage of training data.

That isn't the case for games like Go and Chess.

Can AI solve Chess? Now that is a proper challenge. We're going to need a bigger boat?

Why not? Imagine a game like Skyrim where every encounter has different dialogue and story line? Sure the mechanics could be somewhat standard but it would add to the replay ability and fun things that would be added to the story lore.

It would be interesting to see without a fixed script, this is true.
 
We've had superhuman quakebots for years... no... decades even. Aimbots will absolutely wreck human players.

The games with "fun AI" are like Grand Theft Auto. AI serves as a punching bag, providing realistic running away behavior from the human player as they go on rampages. If you bump into an NPC in Grand Theft Auto, they fall down. If you pull out a gun, they run away. If you shoot them in the leg, they limp and run away slowly, or even start to crawl to hide from you.

That's the kind of AI people have fun with. Anyone can download Stockfish and lose to a superhuman Chess AI any time they want to. No one does that however, not even the Chess pros.

---------

IE: "Fun AI" are scripted to create a game environment. Upthread, people are talking about Skyrim, which has a similar AI (albeit with very different reactions than GTA). Dark Souls and Elden Ring are another. The AI is extremely scripted, but perfectly scripted to encourage experimentation, inspiration, and enlightenment from the players. That's what's fun.

Why not? Imagine a game like Skyrim where every encounter has different dialogue and story line? Sure the mechanics could be somewhat standard but it would add to the replay ability and fun things that would be added to the story lore.

Lets go in the other direction. How is such a game better than just talking with ChatGPT itself?

If your product is "Generative AI", then you go all in on it. Create a chat-interface with LLMs and let users have fun with it. Why would I pull out a video game console to interact with an LLM? Its not like my PS4 controller has a good keyboard.
 
NPC: why don't you do the quest i asked you to, don't you love me, i fell like dying, i'm going to kill your family and burn your house
Sounds like my own real life with my ex-wife. If a game comes out like that, no thz, I wont buy it, or even pirate it. I dont need more counseling.
 
I am more thinking of strategic movement, using the terrain and microterrain to its advantage, using knowledge of own and enemy weapons to its advantage, that kind of thing (as opposed to aiming better, that is a no-brainer). Ideally in a proper military wargame like TacOps 4.0. That is a big challenge, especially for machine learning due to lack of training data.

Of course once an AI can do that there is no difference to commanding a real military fight. The AI wouldn't even know the difference.
 
I am more thinking of strategic movement, using the terrain and microterrain to its advantage, using knowledge of own and enemy weapons to its advantage, that kind of thing (as opposed to aiming better, that is a no-brainer). Ideally in a proper military wargame like TacOps 4.0. That is a big challenge, especially for machine learning due to lack of training data.

Of course once an AI can do that there is no difference to commanding a real military fight. The AI wouldn't even know the difference.

Real life is already a "if you know where the enemy is, they're dead" metagame.

Between M19 automatic grenade launchers, M777 artillery rounds, Predator Drones with 1000lb of explosive Hellfire missiles, Excalibur rounds, HIMARS, and other weaponry, if you know where the enemy is, you've already got a grenade / 20lb mortar / 100lb shell / 200lb HIMARS rocket / 1000lb Hellfire Missile fired at them like 10 minutes ago.

There's not much "intelligence" in war. Its a lot of hiding, and then firing off your weapon to kill a bunch of people, and hoping you're not seen. All the complicated bits are already automated to hell and back already. All that's really changed in the most recent war over say Vietnam / 1970s is that we've got one more indirect weapon: automated drones that carry either grenades or anti-tank warheads for even more options to kill people from far far away.

----------------

Video games are about fun. We create restrictions that make the environment more fun, rather than realistic. The real life of war is that it comes down to a logistics game that plays closer to FedEx than anything else. You're just delivering ammo to troops (aka: bullet delivery men) who then finish their delivery by delivering the bullet to the enemy. Its almost all logistics. Which is itself, a topic that's optimized with AI already.

Its not like anyone programs in routes by hand anymore. You use a computer to figure out the optimal delivery schedules and whatnot to maximize deliveries and minimize disruptions. The few tasks humans do in war (ex: M777 artillery operator) is because human labor is still cheaper than these big expensive machines (see M109 Paladin, which can do all of the tasks of the M777 team except automatically. Also, for $10 Million instead of $1 Million, so the M777 is better in practice due to 1/10th the costs).
 
Last edited:
AI in games that have as an option for the running of mods that influence AI is the best outcome imo. Glad there is a modding community alive n' well!
 
If they could build a real AI, they wouldn't bother wrapping it up in a game, cha'ching.
 
We've never even come close to solving chess, maybe you're thinking of checkers.
What do you mean by "solving?" Computers were playing and beating world chess grade champs in the 80s. Seems pretty solved.

Look up IBMs "Deep Blue" system. It took until the 90s to be truly "the best" in the world but yeah.

 
Last edited:

There are even more possible variations of chess games than there are atoms in the observable universe...
Sounds more like you're talking about brute-forcing chess. That's not intelligence, it's the opposite of it.
 
Back
Top