
Game AI vs Traditional AI - niyazpk
http://www.altdevblogaday.com/2011/07/11/students-game-ai-vs-traditional-ai/
======
rm999
I have an academic and professional background in traditional AI, and I've
programmed an AI for a 3D video game I made in college. My traditional AI
background is mostly in applying a wide variety of mainstream machine learning
algorithms, including neural networks, SVMs, and regression, to real world
problems like fraud and image detection. I was somewhat frustrated when
building the game AI because the best solution came down to building a large
state machine with hard-coded logic. The AI was dead-simple, but it worked
well and wasn't too far from state of the art in video game AIs at the time,
and I suspect today.

I agree with the general point of this article; in fact, I think it
understates the case. When people want AI in video games they want the AI to
be truly smart. The fact is, we haven't cracked "intelligence" yet. Most of
'AI' research has veered into machine learning, which is basically applied
statistics. While this algorithms can solve many constrained problems quite
well (this field powers much of google search) it's tough to frame complex
problems like a 3D FPS AI, into a simple statistical framework. Even
biologically-inspired AIs like neural networks are designed to solve highly
constrained problems. In short, I don't think it's possible to even design a
non-bruteforce AI, regardless of computational power, with what we currently
know.

~~~
pmelendez
I hear you. I have a similar background like yours and I had a huge
disappointment when I broke into the game industry 2 years ago. But I am not
agree with you in the sense that an statistic approach is not possible. There
are so many opportunities but the reality is that game designers don't want
that to happen.

The main problem I have found in this regard is the fact that designers love
to have control over the behaviour of the game, and I believe they don't even
want to understand how a machine learning AI can be possible. I even discussed
my master thesis (an SVM based controller for enemies) with a veteran RTS game
designer and his response was very heart breaking, he just told me that Game
AI was good enough and that "people" wouldn't care about a better AI (after
that he just turned out and walked away)

I am still optimist that eventually that would happen. But I don't have enough
patience to fight against that any more. So hopefully a young hacker reading
this would change that :)

~~~
dkersten
_a veteran RTS game designer and his response was very heart breaking, he just
told me that Game AI was good enough and that "people" wouldn't care about a
better AI_

This makes me sad.. most RTS games have such terrible AI it often pains me to
play them (and I love RTS games). Yeah yeah everything is moving towards
online multiplayer, but I can't be the only person who would pay extra for a
good single player experience, because often I really dislike the multiplayer
experience and despite that I'm playing a lot of online games at the moment
(Path of Exile, World of Tanks, League of Legends...), I usually prefer to
play single player games and for this good AI is very important to me.

~~~
mattmanser
I love playing humans but same as you sometimes I want to take things my pace
and it's a very different game from the kind of AI I want to be playing. And
some of my friends hate playing humans, the games are too fast paced and they
hate the shit-talk you sometimes get.

I remember reading THQ lamenting the decline in RTSes, as I watched RTSes from
the two remaining greats move from base building to quick mini-troop
production games. The trouble that people like THQ and Blizzard don't seem to
realise is that though the sales of this game do great and people are playing
lots of online matches, it's the next one that'll suffer the decline in sales
as casuals abandon the increasingly online optimized experience.

I want hordes that aren't totally retarded so that each game is different.
They need to start making horde modes that are actually varied and
interesting, unlike the predictable drivel that DoW2 and SC2 were. The AI in
those games was stupid, predictable and broken. It started fun as you raced to
build your base in time, but after a few games it wasn't fun at all. You could
set a stopwatch by when the computer would try and rush you.

~~~
Splines
You may want to check out AI War[1]. The designer sounds like he is well-
versed in AI and made it one of the game's selling points.

It's also an extremely DRM-friendly game too!

[1] [http://christophermpark.blogspot.com/2009/06/designing-
emerg...](http://christophermpark.blogspot.com/2009/06/designing-emergent-ai-
part-1.html)

~~~
dkersten
AI War is an excellent game and the AI does some surprisingly smart things
sometimes (not to mention that you can have tens of thousands of units in a
game).

But AI War is also a very different gameplay experience to most other RTS
games, so while its a good game in its own right and _does_ have good AI, it
may leave you disappointed if you're looking for a more traditional
experience.

Not to mention that its an insanely hard game but I guess that's the price you
pay for "good" AI!

------
hythloday
The single biggest (and maybe the only) difference between Game AI and
Traditional AI is the optimisation function. TAI optimises for correctness,
followed by efficiency, and GAI optimises for efficiency, followed by fun. The
inapplicability of TAI solutions to GAI problems is because we (the games
industry) don't have any kind of theoretical framework for even measuring fun,
let alone optimising for it.

The state of the art is essentially a handful of ad-hoc models of how people
experience games, how they improve and how they have fun (and why they stop
having fun). Coupled with that, you have an enormous range of player skill -
the lead designer of World of Warcraft estimated that the capability of player
groups varied over several orders of magnitude (and he's a former academic
professor, so probably speaking literally).

Someone in another reply stated that GAI was roughly passing a restricted
Turing Test. That seems like a reasonable suggestion to make, but if it's
true, then applying TAI frameworks to solve GAI issues is roughly the same
difficulty as trying to create a non-Turing-test passing AI that can write a
Turing-test-passing AI. It seems intractably difficult with the tools that we
have available to us right now.

~~~
pmelendez
_"It seems intractably difficult with the tools that we have available to us
right now."_

I think that's actually the problem rather than the optimization function.
There is an vicious circle where lack of tools implies less interest that
implies less research than implies lack of tools.

I am very reluctant to think that TAI's optimization function would make a
difference in terms of techniques usability in GAI problems. I agree that fun
factor is not quantifiable under current knowledge. But that doesn't mean that
there is not common ground between them. For example, it is not the first time
that path finding is being approached using ML:

[http://ieeexplore.ieee.org/xpl/articleDetails.jsp?reload=tru...](http://ieeexplore.ieee.org/xpl/articleDetails.jsp?reload=true&arnumber=953332&contentType=Journals+%26+Magazines)

[http://ieeexplore.ieee.org/xpl/articleDetails.jsp?reload=tru...](http://ieeexplore.ieee.org/xpl/articleDetails.jsp?reload=true&arnumber=117877&contentType=Conference+Publications)

On the other hand, most games use finite state machines for decision making
which could be approached in many different ways:

<http://ccrg.cs.memphis.edu/assets/papers/NNApaper12.pdf>

------
unoti
It's a lot more important for AI for game characters to _look_ real than to
_be_ real. It's easy to forget that the characters are there to support the
fun of the game, and not to be fun to write or support the ego of the author.
Incidentally, I thought the article was worth it for the mention of Infinite
Mario and Galactic Arms Race alone-- I had not heard of those projects before.

~~~
pmelendez
Granted.... However, a game character getting stuck in a corner or jumping to
water without a reason is not much fun.

The following article illustrate the point:

<http://aigamedev.com/open/article/bugs-caught-on-tape/>

~~~
teamonkey
It depends on your definition of fun. It can be hilarious!

I would guess that all of these bugs were known by the developer at the time
of ship and not seen to be important enough to 'fix'. Bug #4 may even have
been an authored response. As a player, that's exactly what I want to see
happen when I throw in a flaming barrel.

------
yk
A nice article, but I believe it should be mentioned that the main difference
of game AIs vs traditional ones is, that the game mechanics are known. This
means for machine learning algorithms there are a lot of low hanging fruits
like perfect shooting (or more generally exploiting that a AI can usually
control the game better than a human since it does not need to use a interface
device). And because of this, it is actually necessary to tweak the AI such
that the player does not feel cheated himself.

~~~
derleth
> And because of this, it is actually necessary to tweak the AI such that the
> player does not feel cheated himself.

Unless you don't, in which case you end up with a Perfect Play AI, as happened
in Mortal Kombat:

> Mortal Kombat is famous for this, this is why the trope used to be called MK
> Walker; an AI opponent on this mode would simply block or dodge any attack
> thrown by the player with inhumane frame precision and beat the player
> mercilessly, giving the impression that the AI was walking over the player.

[http://tvtropes.org/pmwiki/pmwiki.php/Main/PerfectPlayAI?fro...](http://tvtropes.org/pmwiki/pmwiki.php/Main/PerfectPlayAI?from=Main.MKWalker)

Or the AI could just actually cheat:

> "Cheat wherever you can. A.I.s are handicapped. They need to cheat from time
> to time if they're going to close the gap... Never get caught cheating.
> Nothing ruins the illusion of a good A.I. like seeing how they're cheating."

\-- Jonny Ebert, lead designer of Dawn of War 2 on video game A.I.
[http://kotaku.com/5271733/the-three-or-more-or-less-laws-
of-...](http://kotaku.com/5271733/the-three-or-more-or-less-laws-of-gaming-ai)

[http://tvtropes.org/pmwiki/pmwiki.php/Main/TheComputerIsAChe...](http://tvtropes.org/pmwiki/pmwiki.php/Main/TheComputerIsACheatingBastard)

------
superjesuspants
In single player games you have NPCs (non-player characters) and in
multiplayer games you have bots (again, computer controlled characters). For
instance, Team Fortress 2 has bots and Half-Life 2 has NPCs.

The difference is, bots behave and mimic actual human beings. They are bound
by the same rules, and have the same controls and range of motion as human
players. It's hard to distinguish the difference at times, granted they're far
from perfect.

NPCs on the other hand, seem to be this "dumb" AI the article is referencing.
They are intentionally made this way to serve a simple, singular purpose. They
are either scripted for dialogue or just peppered throughout the map as meat
puppets.

Why is it that we aren't seeing the bot approach to AI implanted into single
player games? Why aren't we facing opponents who have their own
missions/agendas in single player games, who are bound to the same
controls/restrictions/exploits as yourself?

The current AI approach is to place enemies in hiding positions who want
nothing more than to fight you to the death, without any purpose or reason.

I want AI that wants to do something, like another player would, that isn't
concerned with me in particular, that has it's own goals/rewards instead of
just fighting me or spouting dialogue at me.

~~~
zanny
> Why is it that we aren't seeing the bot approach to AI implanted into single
> player games? Why aren't we facing opponents who have their own
> missions/agendas in single player games, who are bound to the same
> controls/restrictions/exploits as yourself?

It is hard to put difficulty curves on those kind of AI, and they often are
implemented to use full scale path searching to find objectives, so in games
with larger maps they would either need to blind to things in the distance or
consume excessive processing power.

I remember the Skarr in the original Unreal would be hunting the Nali until
you came around and they would attack you. Their behaviors were amazing at the
time (and honestly, they still are better than 99% of game AI) in that they
would dodge, feign death, hide in cover, and act as packs when in groups to
fight you.

They were also distinctly harder at the time than almost any other AI
opponent. So much so that I remember a tremendous amount of complaining that
their AI was too good.

> I want AI that wants to do something, like another player would, that isn't
> concerned with me in particular, that has it's own goals/rewards instead of
> just fighting me or spouting dialogue at me.

The problem with this is that not enough people would pay for the complex AI.
Game are about profit motive, and sadly making sophisticated artificial worlds
of intelligent bots doesn't bring home the bacon. It is absolutely possible,
especially in an MMO kind of setting, since you can just throw more CPU cores
to do all the complex logic for whatever fancy AI your NPCs are using, but
nobody seems interested.

------
mark_l_watson
The last in the office job I had (12+ years ago in San Diego, before my wife
and I moved to the mountains in Central Arizona) was doing game AI for
Nintendo and Disney.

I loved it! The only reason I left was that we bought a house and had been
planning to move.

I only work remotely now but if anyone ever wants a technical partner for
doing a small Indy game, contact me. I have no skills as an artist. I write
code.

------
TheBoff
I've just had my first course in AI, and being interested in games, I was
curious to see how the reasonably specific, theoretical techniques we were
taught could fit into game design. This was a reasonably interesting example,
but I think I'd be more interested in some specific applications, although I
appreciate these might be jealously guarded secrets...

~~~
aggronn
You might enjoy a talk by the designer of much Civilization AI:

<http://www.youtube.com/watch?v=IJcuQQ1eWWI>

Its a very good talk, but applied video game AI as a field is kind of a let
down.

------
LukeDicken
Yikes, so I've just stumbled across this and a couple of points to note:
Firstly I wrote it over a year ago, secondly, I've written an awful lot more
about it since then. In particular check out my most recent article -
[http://www.altdevblogaday.com/2012/08/27/the-spector-of-
game...](http://www.altdevblogaday.com/2012/08/27/the-spector-of-game-ai/) and
the video of my session from Casual Connect Seattle a couple of months ago -
[http://casualconnect.org/lectures/2012-igda-
lectures/skynet-...](http://casualconnect.org/lectures/2012-igda-
lectures/skynet-and-you-game-ai-for-the-uninitiated-luke-dicken/)

------
scrumper
Good article.

Voltaire wrote something about this: "The perfect is the enemy of the good."
It's hard to keep in mind, especially when inexperienced.

~~~
EvanKelly
My boss always tells me "Perfect is the enemy of good enough", I didn't know
it came from Voltaire, but it's useful to remember a lot of the time.

------
zura
When it comes to game AI, mostly it is not about being smart or real. It is
about being fun.

------
batgaijin
Eh, I don't know. I think that game AI just has to pretend to be real AI.

<http://www.gamespy.com/pc/fear/698080p1.html>

~~~
nollidge
That seems perfectly consistent with the OP's discussion.

