What we talk about when we talk about AI

What do you think of when I say ‘artificial intelligence’? STNG’s Data? Skynet? Asimov’s Three Laws of Robotics? Or more technical things … in games, things like pathfinding, or in academics, human-computer interactions, speech processing, and more? Since all of these things ‘are’ AI, it would be exceedingly vague to say Quantum Tiger Games is working on AI and leave it at that … like saying we’re creating a building, but failing to mention whether it’s a skyscraper, pyramid, or underground cave complex. So what do I mean when I talk about AI?

As you’ve probably gathered, really, my focus is on giving game characters human-like personalities—not only emotions but general inclinations toward a number of things, such as trust/distrust, sociability, assertiveness, creativity, neuroticism, and many more. For our They Vote! demo, we condense these tendencies and others into political leanings, so now we’re creating conservative, liberal, etc. AI creatures, assuming their political values are based mostly on personality and experiences. But despite my own inclinations, there’s more to it than this.

For SteamSaga, besides dealing with personalities, we’re dealing with some of the same issues as in any game—well, almost any game. For instance, any game with combat has some kind of AI to decide when the enemies will attack, how often, from which direction, etc. Some of this can be covered via personality, but some will be determined by pathfinding algorithms dealing with whether the enemy can see the player, how it can get there around any intervening obstacles, etc. Pathfinding seems to have become the more important element for game AI, and we now have myriad ways for enemies to figure out where our characters are and how to reach them, including A* (that’s “A-star”), Dijkstra, D*, Best First Search, etc. In SteamSaga, our turn-based battle system uses relatively simple pathfinding (as there is only an 8×8 grid to deal with), but the personalities of the enemies figure largely in their choice of who to attack or even whether to attack. Hate the Healer from past experience? Attack her first! Respect the Thief’s tactical abilities? Use caution when attacking. Attack as a pack? Follow the leader and all leap on the same poor player character …

Combining a sort of simple personality and pathfinding isn’t new at all; way back in Pac-Man the ghosts (Blinky, Pinky, Inky, and Clyde) each had a different ‘personality’ (e.g., Blinky was set to always target Pac-Man’s current position, whereas Pinky would try to get ahead of Pac-Man and target four squares in front of our hero), and they also had general pathfinding algorithms (can’t move through walls, yet could ‘see’ through them to know Pac-Man’s position and direction).* Ours is different because we’re trying to get the AI to make human-like decisions in battle, and these evolve over time depending on NPC experiences (well, if they survive the first encounter, that is). Learned to love the Healer? Well, let her be for the moment. This time.

Remembering Pac-Man makes me think about AI in other old games, and maybe I’ve come up with one that had none: Asteroids. I mean, they’re just randomly moving asteroids (or moving due to the physics of the game), not calculating the best path to strike your ship. Unless you want to impart some kind of ‘Ghost in the Machine’ intelligence to the whole thing. And Space Invaders … maybe? Unless the firing pattern is more than just random. But anyway …

Beyond pathfinding and personality, we’d like to create AI-driven characters who can understand ‘natural language’—that is, could take any input speech (probably written to begin with) and actually parse it in a way that makes sense, then respond in kind, just like a person. You could thus type in anything rather than having to navigate dialogue trees, and the NPC could respond in a number of ways, rather than having to limit their ideas and inclinations to the trees as well. We’re nowhere near that; I’m not sure, actually, how close anyone is. I do know that I have yet to meet a chatbot that doesn’t spout jibberish (or deliberately vague language that could apply to anything) within a few sentences of dialogue. But I would like to use my background in English to make some headway on this. For now, though, SteamSaga uses a complex dialogue tree system, with NPC choices driven by the situation and their personalities. (Plus, even if you could give the NPCs free reign language-wise, they’d still need direction to make sure the game progressed. Then it’s NPCs as actors helping create their own scripts … hmmmm.)

That’s what we’re talking about when we talk about AI, at the moment, anyway: personality, pathfinding, and language. Next time, maybe an aside about Skynet and its ilk …

* Not that I noticed all this back in the day; I neither played Pac-Man well enough nor often enough to deduce the ghosts’ strategy, although I knew they seemed to behave strategically. This info is from GameInternals (http://gameinternals.com/post/2072558330/understanding-pac-man-ghost-behavior).

This entry was posted in Artificial Intelligence and tagged , , , , . Bookmark the permalink.