What is Artificial Intelligence?

When I was in college, I asked a coworker of mine what his major was. He replied that he was studying artificial intelligence. The conversation kind of went like the following:

Me: Oh, cool!
Him: Well, actually, it’s probably not what you think…
Me: So are you studying neural nets and expert systems?
Him, visibly surprised: …Uh, yeah, actually.
Me: Cool!

I think he expected me to believe that artificial intelligence was just as it is in science fiction movies and books. He probably thought I was excited that he was learning about making sentient robots or something. The fact that I knew the term “expert systems” and that it was related to AI research seemed surprising. No one writes books about exciting expert systems in science fiction, right?

I suppose the reason why I knew about what courses in AI would be like is because I originally expected them to be about making computers reason and think. Then I looked into it, and I found that it wasn’t always that sexy. Some research is about computer reasoning, but a large chunk of the research is really just a series of if-statements, when you get down to it: IF this object is a mammal THEN XYZ. IF this object is a reptile THEN ABC. When you look at knowledge bases, such as Microsoft’s, it’s the result of AI research. If you are expecting to encounter romanticized science fiction in college AI studies, you’ll likely be disappointed. A lot of the AI you’ll study is about developing better ways to answer questions for an automated tech support call center.

I was hoping to take a course in AI and learn how to write autonomous agents in a video game. Expert systems aren’t quite what I had in mind. Instead of taking such a course, I read articles online and bought books. Kids today are lucky as GameDev.net has way more articles on AI than I had access to when I was in school. I do own O’Reilly’s “AI For Game Developers”, which has the sub-heading “Creating Intelligent Behavior in Games”.

Why would I care about expert systems? Would an expert system help me with making the computer opponent in platformer look intelligent? Finite state machines, fuzzy logic, pathfinding, obstacle avoidance, chasing and evading…these are things I wanted to learn. They seemed to be the most practical for a game developer.

According to the Wikipedia entry on AI, you can identify two types of AI applications: classifiers and controllers. Classifiers identify entities as fitting a pattern or set of objects. Controllers basically use classifiers before deciding on an action. The latter seems closer to “IF player is nearby, then send wave of enemies in delta formation”.

Still, there isn’t really a need to study too deeply into these details if you want to make games. Don’t think that the AI in Quake was very intelligent. The model had a number of assumptions about the nature of the level layouts and information about player locations. Someone made a 2D volleyball mod using a Quake engine and found that the movement was strange because the AI assumed it would have room to turn around. The computer-controlled players weren’t moving in a very smart way at all. I remember reading one player’s comment as he talked about how moronic they acted.

And I suppose that reaction is all we have to worry about. You can try to make your AI as smart as you can, but if it does things that aren’t very smart, people will notice, and your AI will be considered weak. Perception of intelligence is more important than actual intelligence. Just like in real life. B-)

When people played my Space Invaders clone Killer Kittens, one of the common reactions I heard was someone cursing the last alien. Just like in the original Space Invaders, the last alien moves much faster than it did when there were still other aliens around it. People were getting mad at it, but in a good way. To these players, it wasn’t an algorithm I wrote that sped up the alien’s movement. It was the alien getting tricky, or becoming afraid, or doing something intelligent. It sometimes seemed to drop a bomb right on top of the player’s shot, which seemed to be an intelligent way of shielding itself. In reality, the bomb being dropped was random, just like any of the other drops. But hey, if the players think it seems intelligent, then I don’t need to spend time trying to get it to drop the bomb more intelligently.

I remember when Goldeneye 64 was released. The enemy seemed intelligent…until you came across two guards with their backs to you. You could run past them with your guns a-blazin’, but you could also take them out quietly. Unfortunately, you’ve run out of bullets for your silent pistol, so you pull out the rifle you took from one of the other enemies. You have to be quick. You aim at one guard, shoot him, aim at the other guard, but then realize that he isn’t moving. His colleague just dropped dead in front of him, but he didn’t even blink. Wha-? It was very weird the first time I realized that the AI isn’t that intelligent at all.

Game AI is getting more intelligent these days, but in the end, the only thing that seems to matter is how players perceive it. In this way, it is similar to the importance of story in games.

10 comments to What is Artificial Intelligence?

  • […] intelligence,” and explored it a bit, brushing up against any number of ideas as he writes (link). Tagged:Round Table by Corvus @ 1:05 pm , […]

  • […] What is Artificial Intelligence? » GBGames – Thoughts on Indie Game Development (tags: gbgames.com 2007 games artificial_intelligence gameai explicação_introdutória) […]

  • Interesting article!

    I agree that as long the AI acts they way you think they should, then that is enough!

  • I actually worked on the software architecture and implementation of an inference rules engine (http://en.wikipedia.org/wiki/Inference_engine) (http://www.ilog.com/) for a large bank. Its role was to automate and notify traders in NY that a certain bundle of mortgages were ready to sell as securities on the NYSE. If, for what ever reason there were borderline loans, it would kick it to a human validation and they would decide if the loan was a go or not. But it was pretty cool to see contextual rules firing on loans based of of attributes like FICO (credit score), property location, lender etc.

    It could make consistent reviews of loans based off of rules traders would “on the fly” apply to bundles of loans. So it is kinda of cool to see the type of dynamic expert system function in a high load/real time environment. It still required a certain level of human intervention though 😉

  • I have absolutely nothing to say about AI —

    I just posted because I wanted to wish you a happy birthday (on July 26th, assuming i got that correct)

    Happy Birthday Gianfranco!

  • I was having lunch with a developer one time, and the talk turned to AI in RTS games. He said pretty much the same thing about players attributing intelligence where there was, in fact, none. And it wasn’t simply about them misinterpreting what they were seeing, mistaking one function for another. They would talk about really elaborate stuff that they were sure the AI did to “outsmart them”.

    And of course, this was behavior that it would have been either impossible or too process intensive for a real time strategy game.

    Of course, being a smart man, he just thanks the gamers for their compliments on his work and moves on.

  • heh, I had my cousin playtest my latest project which has a ranking system at the end of each round stamp a big letter down on the stats ranging from A to F. It doesnt actually read the stats as yet and it just randomly chooses a rank.

    Sometimes he was elated when he got an A, then if he got an F he was wondering what he had done wrong. He never once assumed that it wasn’t actually ranking him.

  • Nice Article. Reminds me of Brian Moriarty’s “Who shot Paul” Lecture:
    http://ludix.com/moriarty/paul.html

  • […] Over on the GB Games’ Blog, Gianfranco has posed the question, “What is artificial intelligence,” and explored it a bit, brushing up against any number of ideas as he writes (link). […]

  • Krystian: Hah, that was an enjoyable read! Thanks for posting that!