• Hey, guest user. Hope you're enjoying NeoGAF! Have you considered registering for an account? Come join us and add your take to the daily discourse.

The possibilities of Artificial Intelligence in gaming...

GodsTyro

Member
I found this very interesting article on a new type of AI...

"A better (or at least faster) way of creating an interesting AI would be to
take a look at behaviourism. Behaviourism states that a creature reacts to
external stimuli. This is not entirely true since humans have a mind and a
concept of Self, but the general idea behind behaviourism is sufficient for the
AI of a roguelike.

Imagine what would happen if you teleported a Kobold into a big dungeon. Lets
say that the Kobold starts in an empty corridor. The first thing the Kobold does
is to look around and ensure that there are no enemies in sight. If he is alone
he decides that he feels safer if he wields a sword and equips some armour. At
the moment this is his most urgent need. The Kobold reacts to the situation and
puts on his leather armour and wields his shortsword. If the Kobold still
doesn't see anyone he begins to interest himself for his environment. His most
urgent need would then be to move. The Kobold continues to move through the
corridor until he reaches a door. If the Kobold still doesn't see anyone his
most urgent need would be to open the door. The Kobold reacts to this new
situation and opens the door. He then looks around again and sees that the door
led into a big room. Near the door lies a pile of shining gold coins and at the
other end of a room a big snake looks back at the Kobold! The Kobold evaluates
this new environment, and decides that he loves the gold more than he feares and
hates the snake. The Kobold reacts to the situation and starts to move closer to
the pile of gold. As the Kobold gets closer his fear and hate of the snake grows,
as does his love for the gold. At some point the Kobolds fear is greater than the
Kobolds love. The Kobolds most urgent need will become to move away from the
snake. The Kobold reacts to this and starts to retreat from the snake. All of a
sudden a door opens to the left of the Kobold and another Kobold appears. Our
Kobold evaluates this new scenario, and immediately recognise the other Kobold as
a friend. The Kobold loves :) other Kobolds, and this new Kobold is armed to the
teeth with shining armour and pointy weapons. Once again his love for the gold
and for his new found friend is greater than the fear of the snake. The Kobold
reacts, moves towards the gold and his friend and picks it up. ...

The story above seems fairly realistic and it is not that difficult to achieve
a behaviour similar to the behaviour of the Kobold. It all boils down to a three
step process:

1.Observe and evaluate the environment
2.Find the most urgent need, based on the environment and the self
3.Perform the need"

http://home.swipnet.se/dungeondweller/development/dev00055.htm

What do you guys think are some possibilities for AI in gaming?
 

human5892

Queen of Denmark
That sounds like a pretty neat way of doing AI.

IMO, AI is the most important next step in gaming, now that graphics are beginning to offer diminishing returns. I think more developers should be looking seriously at what they can do to improve AI, and subsequently the single player game experience.
 
Hideo Kojima once said something to the effect that it's more important for the AI to be convincing than for it to be realistic. I think he's right.
 

human5892

Queen of Denmark
JoshuaJSlone said:
I'd just assumed that was how decent AI functioned. How else would it work?
I think most AI has preset priorities built in, but not real-time situation assessment as this article describes. I could be wrong, though.
 

Gek54

Junior Member
trippingmartian said:
Hideo Kojima once said something to the effect that it's more important for the AI to be convincing than for it to be realistic. I think he's right.

Convincing != Realistic to whom? 5 year olds?
 

Lathentar

Looking for Pants
I'm currently developing a videogame to demostrate the possibilities of Neural Nets in a real-time game.

Here is the website... By the way, the Pictures are out of date. A number of companies and government agencies have expressed interest in the project and the technology WILL be put into a future commercial game.

http://dev.eltlabs.org/nero_public/
 

Lathentar

Looking for Pants
trippingmartian said:
Hideo Kojima once said something to the effect that it's more important for the AI to be convincing than for it to be realistic. I think he's right.

He is right. This is why scripting is still around so much. Even if the AI cheats, as long as the player doesn't feel like the AI is cheating everything is good.

Pathfinding is especially important for this. While the enemy can't "see" the path, the algorithm can allow it to cheat and precompute the exact path to get there. This is a major problem that we're finding with our project.
 
Gek54 said:
Convincing != Realistic to whom? 5 year olds?
The idea is that there is only a certain percentage of processing power available for AI routines, and so the routines must be simplified without appearing to be so.
 

NotMSRP

Member
Computers are modelled after human logic, which is the most studied and understood area of human intelligence. So you can only do intelligence in the computer based upon logic, which is AI. To have full AI, you need other areas of "intelligences". But the problem is we still haven't really understand exactly what is human intelligence. Let alone figure out how to expand the computer beyond logics, so that advance AI can be possible to model after human thinking.

All current AIs are scripts in some ways and just following a script falls under logic.
 

Prospero

Member
human5892 said:
I think most AI has preset priorities built in, but not real-time situation assessment as this article describes. I could be wrong, though.

I think it depends on the game. I've started playing Combat Mission: Barbarossa to Berlin recently, and there's a section in the manual on its AI algorithms. (It has three, running simultaneously--pretty impressive stuff.)

Anyway, the thing about CM:BB is that you give orders to soldiers, but unlike RTSs, where the units will do whatever you say and the AI is mostly pathfinding, etc., CM:BB's units obey your orders only if they think they're a good idea. If you order a squad to attack an obviously heavily fortified stronghold on the map, they will either not take the order and go to ground, or start to approach it and then change their mind halfway through. If you order a tank crew to attack the enemy, and it looks to them like they're in danger, they'll abandon the tank and scatter into the woods. The game also calculates eight different morale states for each unit, so that units with high morale are more likely to obey your commands and put themselves in danger, than units that are psychologically rattled.

So there's a combination of pre-set priorities and real-time assessment (since the player can only issue orders to soldiers once every sixty seconds of game time). During the Issue Orders phase, the units may or may not decide to obey your orders, since they're conditioned to preserve their own lives, even at the cost of the mission (unless they're Fanatics, or Elite soldiers). But during the combat period between order phases, a second AI routine tells the units to continually re-evaluate their orders in real time, so that they will go off mission if something surprising crops up (like enemy hiding behind a wall that they couldn't see at the beginning of the combat phase, but that they could see thirty seconds later).

It's a whole order of complexity greater than the kind of AI in a game like Warcraft, or even Pikmin. A fairly old game, too, by gamer's standards (2001). But, yeah, real-time assessment is far rarer than pre-set, unchangeable priorities, at least I think.
 

iapetus

Scary Euro Man
To see that sort of system in action, take a look at the Angband Borg, which plays Angband by very much that sort of approach, without cheating at all. :)

The idea that all gaming AI is script-based is extremely inaccurate. The idea that all AI research is based on human models of thought is about as close to the truth as a claim that Mario 64 scored an average of 3% across all reviews.
 

human5892

Queen of Denmark
Prospero said:
I think it depends on the game. I've started playing Combat Mission: Barbarossa to Berlin recently, and there's a section in the manual on its AI algorithms. (It has three, running simultaneously--pretty impressive stuff.)

Anyway, the thing about CM:BB is that you give orders to soldiers, but unlike RTSs, where the units will do whatever you say and the AI is mostly pathfinding, etc., CM:BB's units obey your orders only if they think they're a good idea. If you order a squad to attack an obviously heavily fortified stronghold on the map, they will either not take the order and go to ground, or start to approach it and then change their mind halfway through. If you order a tank crew to attack the enemy, and it looks to them like they're in danger, they'll abandon the tank and scatter into the woods. The game also calculates eight different morale states for each unit, so that units with high morale are more likely to obey your commands and put themselves in danger, than units that are psychologically rattled.

So there's a combination of pre-set priorities and real-time assessment (since the player can only issue orders to soldiers once every sixty seconds of game time). During the Issue Orders phase, the units may or may not decide to obey your orders, since they're conditioned to preserve their own lives, even at the cost of the mission (unless they're Fanatics, or Elite soldiers). But during the combat period between order phases, a second AI routine tells the units to continually re-evaluate their orders in real time, so that they will go off mission if something surprising crops up (like enemy hiding behind a wall that they couldn't see at the beginning of the combat phase, but that they could see thirty seconds later).

It's a whole order of complexity greater than the kind of AI in a game like Warcraft, or even Pikmin. A fairly old game, too, by gamer's standards (2001). But, yeah, real-time assessment is far rarer than pre-set, unchangeable priorities, at least I think.
That sounds pretty impressive, and it definitely seems like it fits the bill of "real-time assessment" as described in the first post. I hope more future games decide to implement this kind of technology.

I'd also like better reaction-intelligence in games. For example, there are dozens of first- or third-person action games I've played where you sneak around to a group of enemies and pick one off with a quiet weapon. In the worst case scenario, his comrades don't even notice this, which is just terrible. Most of the time, however, they'll act predictably: they'll go on "alert" for a while (which generally entails looking around for me randomly, not in places where I would sensibly be), and then resume standing in the same place they were, not caring at all that their friend's corpse is deteriorating next to them. This completely takes me out of the game, and is something that I hope improves with better understanding of AI.
 

Bregor

Member
People expect to much of AI. Until they develop computers that can actually think, using pre-computed actions and other tricks will be more effective most of the time.
 

Ghost

Chili Con Carnage!
This is actually the kind of work im doing right now, not so much for games but in general terms (simulations and such), i hope its the next step big developers try to make. It doesnt have to mean that you do away with the 'tricks' that are used at the moment, because you just need to seperate the combat AI, with the behavioural AI, like in humans, when a fight starts we run on instinct, but outside of those conditions we think about priorites and what we need to do.
 

NotMSRP

Member
Advancements in AI is still a research field. It'll be awhile before such level of AI is commonly done in games.
 

Lathentar

Looking for Pants
Ghost said:
This is actually the kind of work im doing right now, not so much for games but in general terms (simulations and such), i hope its the next step big developers try to make. It doesnt have to mean that you do away with the 'tricks' that are used at the moment, because you just need to seperate the combat AI, with the behavioural AI, like in humans, when a fight starts we run on instinct, but outside of those conditions we think about priorites and what we need to do.

Have any publicly available resources?
 
GodsTyro said:
I found this very interesting article on a new type of AI...
Actually, this article is almost 3 years old, and the concepts it is based on are far older than that, but regardless...

GodsTyro said:
It all boils down to a three step process:

1.Observe and evaluate the environment
2.Find the most urgent need, based on the environment and the self
3.Perform the need"
What this basically describes is a simple reflex agent, and there exist several techniques used to achieve the behavior described. A couple that immediately come to mind are finite state machine scripting and neural networks.

FSM scripting is the most common type of AI used in games, and it can be used to produce the Kobold scenario without much difficulty. One of the reasons I think the scenario seems fresh is because most enemies in video games do not roam freely as the one in this story. It strolls about, seemingly with purpose, while typical enemies either stand idle until the player approaches, or patrol a pre-defined route (ie. guards). An exception would be games where the player and AI control the same type of unit (bots in FPS's, cars in racing games, etc.), where the AI attempts to maximize its advantage over its opponents. If you scripted the Kobolds with some of the techniques FPS bots use--searching for power-ups, retreating when in danger, and so on--you could create the story the author describes. So I think the question is not "Why can't we do this?", but "Why aren't we doing this?"

The idea of enemies that act without stimulus from the player is a good one, but it creates a lot of design problems. What happens in single-player games, where enemies are planted in specific areas to create tension? If they can wander freely, the developer has one less tool at his disposal when trying to create a certain atmosphere in the game. Certainly, you can use complicated AI to get the desired effect: you can make zombies who like to hide behind corners, demons who patiently wait to ambush you from the shadows, etc. But if you can accomplish the same thing with simple scripting, why not? In these cases, I think the benefit of more sophisticated AI is questionable.

Another issue to think about is the additional content a game would require to support more active computer controlled characters. Most objects in games exist only for the player to use; there just isn't much for AI characters to do, even if they were given the motivation. You would need to populate the world with resources to keep characters occupied. I think this can work, but it depends on the circumstance. It was fun to watch people in Ultima VII go about their daily lives, for example. But for a monster who's primary purpose in life is to run at you and die, few people may ever notice the work that went into making him act like a monster when he's not busy trying to kill you.

It is also hard to make enemies that are convincing, yet stupid. Yes, it is annoying when guards stand with indifference as their comrade takes a bullet to the head. However, if they acted convincingly, that can change the entire tone of the game. If I take out one of three soldiers standing together in a hangar, and the other two run for cover, set off the security alarm (which puts all soldiers in the base on alert), and call for backup in Hangar 7, I'm almost certainly doomed. This sucks if I am playing an action-oriented FPS, because it effectively transforms it into a stealth-oriented game, and that's not what I wanted to play. I don't want fodder to act like fodder, but I don't want it to be able to outsmart me, either.

I'm curious as to people's opinions on this. How would you overcome these problems?

GodsTyro said:
What do you guys think are some possibilities for AI in gaming?
I'd like to think neural networks will play a larger role in the future. But I have done a bit of work with them, so I may be a bit biased :) One thing I want to see are better sidekicks in FPS's. It's frustrating when I have to babysit the AI by constantly giving it commands, so it doesn't open doors I wanted closed, run ahead in front of enemies when I am sneaking around, or fall behind when I run in a room with guns blazing. I'd like it if a sidekick could learn how I play the game over time, and adjust its behavior to match automatically.

I can't really speculate on possibilities for enemies. I primarily play music games, shooters, and other games where enemies are purposely stupid or nonexistent. I'm interested in the applications for neural networks in FPS's and RTS's, but this is more academic than anything. As a programmer, it's fun to try and develop AI that can learn how to play a game as well (or better than) a human, but I wouldn't want to fight against an unbeatably smart computer opponent.
 
Lathentar said:
Pathfinding is especially important for this. While the enemy can't "see" the path, the algorithm can allow it to cheat and precompute the exact path to get there. This is a major problem that we're finding with our project.
Care to elaborate on this problem? I ran across your project a while back (while looking at grad schools) and I am interested in your progress :)
 

gofreak

GAF's Bob Woodward
I did an AI project very similar to what the original post proposes..the concept is based on "drivers", motivation to perform a certain action, action selection etc. A creature may be presented with numerous possible actions, and based on its own status & the environment, it must chose the most appropriate action. Very interesting stuff....but it's only potentially one part of the problem. IMO, for really good AI we need to integrate different types of AI. So you could also have a Neural Net plugged into your action selection engine, so that you're creature can learn from past actions/mistakes etc. You could also have multiple action selection mechanisms being harnessed by one "super-mind".
 
Neural Net AI is a joke and will never amount to jack shit. There's a new AI in development at a huge R&D firm that blows everything out of the water. Wait till you see it.
 

Tabs

Member
Ghost - I do behavior modeling for a simulation as well. I've done everything from reactions to route planning and terrain reasoning. I'm curious as to which one you're working on :) This is an interesting subject. There's a group of us younger guys here at the job that are all gamers, and we'd love to provide our talent to some game company looking to take a step forward in AI development. Any takers?
 

gofreak

GAF's Bob Woodward
God's Hand said:
Neural Net AI is a joke and will never amount to jack shit. There's a new AI in development at a huge R&D firm that blows everything out of the water. Wait till you see it.

It depends on your aims. Neural Nets can be quite effective with some applications. There is no silver bullet that'll work for everything. You got any links on this "new AI"?
 

Prospero

Member
BugCatcher said:
It is also hard to make enemies that are convincing, yet stupid. Yes, it is annoying when guards stand with indifference as their comrade takes a bullet to the head. However, if they acted convincingly, that can change the entire tone of the game. If I take out one of three soldiers standing together in a hangar, and the other two run for cover, set off the security alarm (which puts all soldiers in the base on alert), and call for backup in Hangar 7, I'm almost certainly doomed. This sucks if I am playing an action-oriented FPS, because it effectively transforms it into a stealth-oriented game, and that's not what I wanted to play. I don't want fodder to act like fodder, but I don't want it to be able to outsmart me, either.

I'm curious as to people's opinions on this. How would you overcome these problems?

This doesn't deal specifically with AI programming, but gamers are more likely to accept simple enemy AI if the enemies are portrayed as not being that bright. No one complains about the zombie AI in Resident Evil, for example. And there's a tradition of uniformed guards being stupid that video games have inherited from movies (see Star Wars, e.g.), so gamers are somewhat unlikely to complain about "stupid" AI in guards as well.

I also question the benefit of overly sophisticated AI in some instances--it can sometimes go to waste for the casual gamer. Freedom Fighters has pretty good squad-based AI--you can command three or four soldiers to attack a stronghold head-on, and four more to flank it on either side, and they'll do their best to find cover and keep their heads down, etc. But why go for all that squad-based tactical stuff when the brute force approach works so much better--why not send ten soldiers into a room in a clump, and tell them to stand in a fixed position and mow down anything that moves with a hail of gunfire? When playing FF I used squad tactics when I wanted to check out the cool AI, but when I got tired of that and decided I just wanted to finish off the game, I took the brute force approach all the way.
 

Ghost

Chili Con Carnage!
Trav said:
Ghost - I do behavior modeling for a simulation as well. I've done everything from reactions to route planning and terrain reasoning. I'm curious as to which one you're working on :) This is an interesting subject. There's a group of us younger guys here at the job that are all gamers, and we'd love to provide our talent to some game company looking to take a step forward in AI development. Any takers?

Ive only just started the research so it'll be a good year before i have any real knowledge that i didnt preen from a book :D I'll have to remember your name for when i get bogged down around christmas time ;). The first serious thing im doing around october time is a soccer simulation with 24 agents (players and managers)
 

human5892

Queen of Denmark
Excellent post, BugCatcher. I think you cleared up a lot of misconceptions that many of us (well, me, at any rate) had about this article and A.I. in general.
BugCatcher said:
It is also hard to make enemies that are convincing, yet stupid. Yes, it is annoying when guards stand with indifference as their comrade takes a bullet to the head. However, if they acted convincingly, that can change the entire tone of the game. If I take out one of three soldiers standing together in a hangar, and the other two run for cover, set off the security alarm (which puts all soldiers in the base on alert), and call for backup in Hangar 7, I'm almost certainly doomed. This sucks if I am playing an action-oriented FPS, because it effectively transforms it into a stealth-oriented game, and that's not what I wanted to play. I don't want fodder to act like fodder, but I don't want it to be able to outsmart me, either.

I'm curious as to people's opinions on this. How would you overcome these problems?
Good point. I think in this scenario, you could implement different genre-specific behaviors to fit the game in question. For example, in a more straight-forward action FPS, the soldiers could begin looking for you for an indefinite period of time (not 30 seconds on alert followed by a return to normal), as that's how some soldiers really would react if a friend of theirs was suddenly gunned down. In a stealth game, the soldiers could have a different personality set wherein they would be more prone to immediately call security. This would preserve the integrity of both genres, while still allowing more realistic behavior than the A.I. in many games of these types today.
 
gofreak said:
It depends on your aims. Neural Nets can be quite effective with some applications. There is no silver bullet that'll work for everything. You got any links on this "new AI"?

It's called LathAI. Coming soon.
 
Top Bottom