Staredit Network > Forums > Games > Topic: Games with good ai
Games with good ai
Jun 24 2014, 11:09 am
By: NudeRaider  

Jun 24 2014, 11:09 am NudeRaider Post #1

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

Just read another review where the score for the ai is significantly lower than for other critera (story, graphics, etc.).
That made realize I'm seeing this a lot and that I can't remember a game that's praised for its ai. It almost makes me think (the developers think) enemies have to be dumb for single player to be fun.

You guys know examples for good ai (compared to other criteria - could even be an overall bad game)? Focus is on FPS and on triple AAA games (for comparability) but I'm also interested in notable examples from games not in these categories.




Jun 24 2014, 12:20 pm Roy Post #2

An artist's depiction of an Extended Unit Death

AI is hard to do. There's no getting around that point. The more restrictive the game is, the easier the AI is to program.

Probably the best example of good AI is any modern game of chess, where the best AI can beat a grandmaster player. Or an even simpler game: in the solved game of Tic-Tac-Toe, a computer science student typically is tasked to write an unbeatable AI. My particular favorite AI that I have personally coded is for Nim (which you may know as the Pearls Before Swine flash game). You may notice that these AIs are all for turn-based games: real-time AI programming becomes a lot more complicated.

As for FPS games, I can't think of any remarkable AIs: Halo has some hilariously poor AI at times, and the bots from Counter Strike do a reasonable job if you don't put them on a low setting, but they have no concept of taking cover (the lower difficulties just do a deer-in-the-headlights routine for a while before shooting at you). I would also be interested if there are games in this category that play like actual players (and aren't just difficult because they have digitally-perfect reaction times).




Jun 24 2014, 12:42 pm Sacrieur Post #3

Still Napping

Now would be a great time to mention that people use Starcraft to compete in AI tournaments (made possible by Heinermann's BWAPI).



None.

Jun 24 2014, 2:36 pm LoveLess Post #4

Let me show you how to hump without making love.

This is why I wanted to learn programming and get into game design, I have always been fascinated by the concept of making AI for games and been disgusted with what has been shown in the last decade. I must admit however, that they are probably just "dumbing" down the AI at this point. In the campaigns of games like Battlefield, the AI has so much potential to be good, but just isn't. With my knowledge of what goes on behind the scenes, it is probably due to them having to account for the player in such a variety of ways, but never combining the conditions to give an entirely separate action.

For example:

{If you are not currently engaged} [follow patrol path.]
{When engaged} [head to predesignated engagement point.]
{If the player is} {out of sight}, [get up and advance] [toward player] {if you are currently engaged}.
{If the player is} {shooting or} {moving or} {behind cover} [shoot at player with |accuracy / difficulty|]

And then the list goes on, they don't go into specifics because it would make the AI too strong. Most games that are praised for their AI tend to be games with aliens or zombies, because it allows you to make unreasonable weapons, patterns, strategies, and movements. You are forced into a tunnel when you are working with something that players expect to be able to deal with the moment they encounter it.

I remember when Halo first came out, it had by far the best AI at the time and the same goes for Halo 2, but after that, they didn't try to reinvent them. It was the first time that any enemy at any given time would actually run for help and bring more enemies, before it only happened in programmed scenarios or if a certain condition was met in certain areas. It was the first time enemies had an active sense of moral, because they actually fled when you started winning and said phrases to reflect such actions. The only game I can remember there being a focus on evolving the AI.



None.

Jun 24 2014, 3:43 pm NudeRaider Post #5

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

Quote from Roy
AI is hard to do.
Well hard is relative when we're talking about games that have million dollar budgets. Also I'm not buying that. The foundation is already there, as pointed out by LL.

Quote from LoveLess
I must admit however, that they are probably just "dumbing" down the AI at this point. In the campaigns of games like Battlefield, the AI has so much potential to be good, but just isn't.
That's my impression as well.

Quote from LoveLess
With my knowledge of what goes on behind the scenes, it is probably due to them having to account for the player in such a variety of ways, but never combining the conditions to give an entirely separate action.
IKR. For example in infiltration games you lure a guard with a stone throw. That's cool. What's not cool is that you can do it 100 times in a row. Just make him ignore it and alert others after the 2nd time.
Actually anything that has to do with memory. "Once you're out of sight you're safe" or "Why can't I see any of the other guys patrolling anymore? I know there's a stealth killer infiltrating the facility, but they probably all just went pissing. No cause for alarm."
I know that's game play mechanics that are intended to make the game not too hard. But I can see it making a game that much more alive. Reduce difficulty with better equipment pls.

Quote from LoveLess
Most games that are praised for their AI tend to be games with aliens or zombies, because it allows you to make unreasonable weapons, patterns, strategies, and movements.
I want names of the games. :P Also what do you mean with unreasonable weapons / strategies?

Quote from LoveLess
You are forced into a tunnel when you are working with something that players expect to be able to deal with the moment they encounter it.
You mean the company you're working for doesn't let you make strong AIs?

Quote from LoveLess
I remember when Halo first came out, it had by far the best AI at the time and the same goes for Halo 2, but after that, they didn't try to reinvent them. It was the first time that any enemy at any given time would actually run for help and bring more enemies, before it only happened in programmed scenarios or if a certain condition was met in certain areas. It was the first time enemies had an active sense of moral, because they actually fled when you started winning and said phrases to reflect such actions. The only game I can remember there being a focus on evolving the AI.
That sounds what I'd like. Now add some squad sense: 1 guy stays out of sight and flanks, the other flushes you out with a grenade and you run straight into the arms of the guy flanking you when fleeing from the grenade.
Or make 1-2 soldiers hide when the rest flees and come out and attack you from behind when you're after the others. Generally stuff that makes you be much more on your toes.

Quote from Sacrieur
Now would be a great time to mention that people use Starcraft to compete in AI tournaments (made possible by Heinermann's BWAPI).
The work they are doing is impressive. The standard sc ai was considered a breakthrough back in the day, but the custom ais are so much better, it's ridiculous.




Jun 24 2014, 4:29 pm Roy Post #6

An artist's depiction of an Extended Unit Death

Quote from NudeRaider
Quote from Roy
AI is hard to do.
Well hard is relative when we're talking about games that have million dollar budgets. Also I'm not buying that. The foundation is already there, as pointed out by LL.
LoveLess described a decision tree, which is arguably not even qualifying as AI because it doesn't learn. The only thing we have for actual AI is IBM's Watson, and as far as I know, the supercomputer has not been integrated into any games. So I would disagree that the "groundwork" is already there, ready to be utilized by anyone.

Are we talking about true AI here, or just decision tree-based analysis in game theory? Because the former is hard, and the latter is certainly not trivial for open environments where there are infinite* different states to consider.

The more flexible and comprehensive a game is, the more complicated the AI has to be, and anything other than a perfect decision tree covering almost every scenario is going to leave notable flaws that make the AI easy to defeat. The first Halo game had a limited number of weapons and vehicles per campaign level, whereas later games introduced more complex variables such as dual-wielding and more destructible environments. The behavior of enemies in the later games haven't gotten worse from what I can tell: they still flee, hide, and otherwise react to the player (in fact, I think they've improved in this regard).

Now, here's the primary reason why AI has seemed to get worse in modern games: a lot of older games would have scripted scenarios that work ideally for the campaign level they were designed for (typically against only one player), whereas modern games use a generalized AI to handle any scenario/map against multiple enemies/players. Sacrieur brought up BWAPI, which is a perfect demonstration of these two approaches: the AI that try to cover all scenarios to compete against various builds perform poorly against ones that bank on a specific strategy that would easily be thwarted if applied outside the environment it was designed for (e.g., against a human opponent). Arguably more work goes into designing the generic AI, but the success ratio is way lower than the AI designed for the scenario of taking down other AI.

So we come down to two differently designed AIs: those created for specific campaigns/scenarios, and those designed to perform in any scenario. Your concern seems to be that most developers opt for the latter approach, which means the AI doesn't perform optimally in many situations. The latter approach is the only option for games that allow for custom maps with AI computers, and it's the only approach if you want an AI that you can reuse on sequel games or expansions. The former approach (hard coding) will make an extremely competent, well-polished AI for the map it was designed to handle, but that AI would be completely worthless in any other scenario (and forget having support for custom content with AI designed this way).

Why don't developers design for both? Well, because AI is hard. Development time is expensive, and having one AI is cheaper than having two, and it's not exactly a feature you can market to audiences to take both scenarios into account. That's not to stay there aren't hybrids: even StarCraft, for example, has a generic AI, but also scripts for various campaigns. But guess where that leaves the impression of the AI outside of the campaigns?

TL;DR: The smartest generalized AI will not outperform the dumbest hard-coded AI.

*Arbitrarily large but finite

Post has been edited 1 time(s), last time on Jun 24 2014, 8:55 pm by Roy. Reason: Fixing typos made from my phone




Jun 24 2014, 4:43 pm Sacrieur Post #7

Still Napping

There was AI created for SC to play against players. IIRC it just emulated certain builds and maneuvers done by pros, though.



None.

Jun 24 2014, 4:50 pm Sand Wraith Post #8

she/her

Quote
TL;DR: The smartest generalized AI will not outperform the dumbest hard-coded AI.

would add footnote "at today's commerical-consumer level of AI"




Jun 24 2014, 6:46 pm LoveLess Post #9

Let me show you how to hump without making love.

That's basically what I was saying earlier Roy, just couldn't think of what terms you would use to define them. In current games, AIs use a rough combination of scripts and decision trees. For example, you will always see a pattern in every room. Not because of the way the AI was designed that it sees that point as optimal, but rather because they were told to go to that point once it is aware of an enemy's presence. The generalized AI you speak of doesn't even go that far, it's actually relatively basic. Most programmers don't even give the AI a lot to work with or give them much space to work with, instead they program their actions based on the level/map, rather than give them a general AI.

It hasn't changed much since ten years ago in terms of how companies design AI/bots and it won't unless people actually start caring.



None.

Jun 24 2014, 8:45 pm Roy Post #10

An artist's depiction of an Extended Unit Death

Quote from LoveLess
Most programmers don't even give the AI a lot to work with or give them much space to work with, instead they program their actions based on the level/map, rather than give them a general AI.
I'd say it depends on the game. Indie games will probably favor level/map-based hardcoded AI, as it's easier to code that and have a convincingly intelligent opponent. However, for games that allow user-submitted maps, for example, the programmers' only option for AI support is to use a generalized algorithm.

I've also seen strategy games where the AI has a predetermined initial strategy hardcoded for each stage, but will fall back to a generalized behavior if the player significantly disrupts the plan. If I were to approach designing AI, this is probably the route I would take: while there's an element of predictability, it somewhat represents what an actual human opponent would do.

As for the AAA titles, yeah, you're right: they're just gonna do whatever's cheaper, so long as people don't get mad. I would say a good handful of them do take the generalized route, though, and without extensive investment into the AI behavior, the intelligence of the enemies is going to be the lackluster result we see today.




Jun 24 2014, 9:44 pm Vrael Post #11



In video games, you will not find good AI for many years to come. You may get lucky and find games in which it is possible to AI to be fun.

"Artificial Intelligence" is not nearly complex enough to mimic humans. I happen to know a bit about it, because it's actually my job now (though most of what I have to say here is nothing anyone with a basic understanding couldnt apply some common sense to and figure out). The key factor is that AI is not self-aware, it is not capable of self-improvement, and not capable of creativity. "Good" AI appears to have these traits. When a Starcraft Computer attacks you, loses its army of zealots to your army of firebats, then switches to Scouts or something and comes back, it mimics what a human would do: recognize the fault in the strategy and adopt a new strategy. This is what makes it fun, like when you play against another human being. The AI appears to have self-improved. If it randomly drops a tank in a good spot it appears to be playing creatively.

These AI's are not self-aware or creative however. It is merely the case that the environment in which it exists, in the above example the Starcraft game, allows for a relatively limited number of game parameters with a set of complex and almost innumerable outcomes. In this way, the simple AI of Starcraft can be fun. Take any other game with a similar environment, that is, an environment which can be easily reduced to a small set of parameters with a much larger set of outcomes and chances are you will find a good (and when I say good, I mean fun) AI.

I mean hell. Minesweeper can be fun, simple as it is. Small number of parameters (2: number of tiles, number of bombs), with a huge number of outcomes (number of tiles choose number of bombs). The "AI" randomly chooses one of those outcomes and the novelty of the game board setup ("creativity" in this case) makes it fun.



None.

Jun 25 2014, 2:22 am NudeRaider Post #12

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

Well not true AI ofc. I don't expect games to feature AIs that can improve themselves. I'd be content if they had sufficiently large decision trees. And if you give an AI the capability to analyze the level (sightlines, cover, etc.) it could adapt the flanking strategy for any level.

And not being able to improve itself doesn't mean it can't learn. (100 stone throws)

Why not throw in a bit of self-awareness? When something killed the player and he has to reload, use it again until he survives it. When he survives it change strategy to some other pre-defined maneuvers, but take note of how effective it was (5x reloaded) and use it again later.

Quote from NudeRaider
Why not [...]
oh wait you already answered that
Quote from Roy
they're just gonna do whatever's cheaper, so long as people don't get mad
Oh well... I still think it would be viable to use easier to implement ideas to improve the game and that way set your product apart and make it sell better.




Jun 25 2014, 2:39 am LoveLess Post #13

Let me show you how to hump without making love.

Quote from NudeRaider
Well not true AI ofc. I don't expect games to feature AIs that can improve themselves. I'd be content if they had sufficiently large decision trees. And if you give an AI the capability to analyze the level (sightlines, cover, etc.) it could adapt the flanking strategy for any level.

And not being able to improve itself doesn't mean it can't learn. (100 stone throws)

Why not throw in a bit of self-awareness? When something killed the player and he has to reload, use it again until he survives it. When he survives it change strategy to some other pre-defined maneuvers, but take note of how effective it was (5x reloaded) and use it again later.

Reason for that is that unless that was their hook and people bought it for that reason, chances are they would enrage their players rather than challenge them.



None.

Jun 25 2014, 1:27 pm MadZombie Post #14



Fear had cool AI





None.

Jun 26 2014, 3:04 am Riney Post #15

Thigh high affectionado

Quote from Vrael
In video games, you will not find good AI for many years to come. You may get lucky and find games in which it is possible to AI to be fun.

This is actually a very valid statement. I particularly found Watch Dogs AI to be a bit amusing, seeing how your near death from two shots. But fire your gun into the air, duck behind cover, and sure enough enemies are still suppressing the area which you fired from, not are currently at.

I found it to be awesome, but I know others will tend to disagree.



.riney on Discord.
Riney on Steam (Steam)
@RineyCat on Twitter

Sure I didn't pop off on SCBW like I wanted to, but I won VRChat. Map maker for life.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[05:40 pm]
Ultraviolet -- :wob:
[2024-11-02. : 4:10 pm]
Ultraviolet -- :???:
[2024-11-02. : 4:56 am]
NudeRaider -- at least he's now consistent with the name :lol: http://www.staredit.net/380772/
[2024-10-31. : 12:30 am]
ClansAreForGays -- When you join a pub lobby because you see 7/8 players, but then realize host is bating you with computers. :flamer: :flamer:
[2024-10-30. : 11:48 pm]
O)FaRTy1billion[MM] -- :wob:
[2024-10-30. : 6:24 pm]
Ultraviolet -- :wob:
[2024-10-29. : 4:33 pm]
Vrael -- :wob:
[2024-10-29. : 1:32 pm]
Zoan -- :wob:
[2024-10-28. : 5:21 pm]
Ultraviolet -- :wob:
[2024-10-27. : 4:34 pm]
jjf28 -- :wob:
Please log in to shout.


Members Online: Ultraviolet, Roy