Posted on Mon, Sep. 13, 2004

 

Game sequel takes leaps in AI technology




Mercury News

No one would ever mistake a video game character for a real person. But consider this scene from ``The Sims 2,'' a game where players manage the life of a family or neighborhood: A husband sees his old flame at a birthday party and smiles at her. They wander to another room and start kissing. His wife's sister walks in and starts going nuts. She goes outside and tells the man's wife, who has a nervous breakdown. Caught cheating, the man becomes miserable and begs forgiveness. The kids are oblivious to what's happening.

What's remarkable about this computer game, being released worldwide Tuesday, is that the domestic drama is not scripted. The characters act the way they do because that is what naturally unfolds. It's a quality dubbed ``emergence,'' based on the history of the characters' relationships and their own artificial, or preprogrammed, intelligence.

Electronic Arts, which is publishing the sequel to the bestselling ``The Sims,'' believes this leap forward in artificial intelligence is what will keep gamers by the millions entranced with their virtual Sims. That's why the 140-person team that developed the game over four years took great pains to make the Sims, as the virtual characters are called, act and feel smarter.

``It brings the game into a more dramatic space,'' says Will Wright, chief designer at EA's Maxis division and creator of the Sims franchise.

``The emotional range is much wider. The player can build a much more elaborate narrative on their own. If the Sims are at a birthday party they will know that and sing the birthday song.''

The original ``The Sims'' made its debut in 2000 and allowed players to experiment with their animated human families, testing behaviors and relationships. The players' ability to develop a more intense relationship with the Sims they create gave the game broad appeal across all ages and genders. It is especially popular with girls and women, who often are turned off by shoot-to-kill video games.

Successful start

The first Sims game featured characters who would get stuck in corners and talk in jibberish known as ``Simlish.'' Even with its relatively primitive graphics and corny humor, the game grabbed the imaginations of gamers as something that they hadn't seen before. The Sims and its spin-offs sold more than 36 million copies, making it the bestselling franchise in video game history.

With 3-D graphics animation, the characters in ``The Sims 2'' look life-like. But the developers in EA's Maxis division in Redwood City wanted to make them behave more realistically.

At the same time, they needed to remember that they were making a game, not a real-life simulation. The task required dozens of programmers and artists working together to develop artificial intelligence for the Sims.

In the first game, the Sim characters were animated but dumb. Their behavior was based on instant gratification of basic wants: They needed to go to the bathroom, they got hungry, they grew tired. The player could monitor the Sim's needs by looking at a bar chart on the screen. For instance, if a character hadn't gone to the bathroom in a while, its bladder bar turned from green to red. If the Sims were brainless, the objects around them were smart, silently advertising their services to the characters. Hence, a toilet could say, ``I'm free, use me.'' If that matched the character's most urgent need, the Sim would walk over to the toilet and use it.

It made the characters appear intelligent in a Pavlovian sense. Any apparent higher-level intelligence was accidental, and players had to imagine the rest.

For the second generation of the game, Wright, the chief designer, wanted the Sims to be sentient. If something happened, they should turn around and react. If they have a bad experience, they should remember it and develop a phobia.

Simulated intelligence

For EA programmers, a character appears to possess intelligence if it behaves intelligently. Behavior is a collection of actions and each action is governed by a choice. And so the Sims face a web of inter-connected choices. If they make a friend, they have the option to hug the friend. If the friend accepts the hug, they have the option to kiss. Each choice leads to other choices. The Sims make choices and therefore they seem intelligent.

The first couple of tries to infuse the Sims with intelligence didn't work. The Sims, for instance, would turn and wave when someone walked into a room. But they would do that every time someone walked into a room, and that just wasn't believable.

``We made them look really pretty, but the behavior wasn't right,'' says Matt Brown, the technical director in charge of artificial intelligence on ``The Sims 2.'' EA formed a ``believe team'' of programmers. The group worked to fix those problems, which ranged from the mechanical way that Sims found the best path to walk from one place to another to their difficulty navigating more complex social situations.

Then Brown hit upon another scheme. He decided to give the Sims long-term aspirations. These life goals, included in the data profile that form a Sim's character, would mirror real-life ambitions such as getting married, becoming rich or starting a family. Together with ``memories'' -- data the Sims collect during the course of the game -- and ``fears,'' these goals would influence how the Sim would behave in a given situation. The memories in particular could help the Sims learn from their past. For example, Sims might order pizza rather than cook their own meals based on memories of a kitchen fire.

That gave the Sims better priorities when faced with choices. A Sim would ask a friend on a date. Then talk. A jealous ex-boyfriend might try to intervene. The Sim might try to kiss the friend and ultimately progress toward the goal of marriage.

All this turned the Sims into more intelligent beings who now had real human baggage in the form of data: a pattern of connections that captured their inclinations and relationships and thereby restricted their behavior to doing things in ``character.''

Such qualities gave rise to some debates within the team. Real people, after all, didn't always behave as predicted. Are people driven by their past or free will?

``How important is a lifelong aspiration relative to a want or a bladder need?'' says Wright, EA's chief designer. ``There's a fuzzy line and that's where the player's imagination matters.''

The player acts a a kind of god-like figure. The Sim will function on its own, but the player can interrupt the Sim's ``life.'' If you know your Sim well, you can make them happier by helping them achieve their lifelong goals. If you constantly interrupt them with tasks they don't want to do, the Sims can rebel. They might refuse to go to the bathroom or pinch their nose when you ask them to wash the dishes. You can be kind to the Sims, or push them to the brink of a nervous breakdown. Lucy Bradshaw, executive producer of the game, consulted researcher Brenda Harger and her artificial intelligence students at Carnegie-Mellon University to find out how people really behave.

The team had to fine-tune the Sims' behavior painstakingly so the responses to situations seemed right. The game now includes enough random behavior to ensure the Sims don't always act the same way in the same situations.

The team also had to figure out how to present some situations where it isn't clear what a character is thinking. The game isn't fun if the player doesn't know why the Sim is doing something. So the team included graphic clues such as thought bubbles to create the illusion of deeper intelligence. A character talking to one Sim can be seen thinking about another nearby Sim.

The net result is a game with more variety and more believable characters. There are 13,000 different animations that can illustrate the outcomes of the choices the Sims make. Sims can have nervous breakdowns, gossip about events they've witnessed and even refuse to do things the player suggests that are out of character.

``We've done our job really well if people don't notice the AI,'' said Bradshaw. ``I just don't want the players to stop and say, that's stupid behavior.''

Brown, the technical director in charge of artificial intelligence on ``The Sims 2,'' says the company will keep working on AI tricks with newer versions of the Sims franchise that are already in the works.

This isn't just an academic quest to recreate human intelligence. If the Sims behave more realistically, then gamers will become more attached to them and play the game more passionately. The point of all this, says Maxis general manager Neil Young, is to advance computer games to the next level and to push EA toward the goal that it was founded upon: ``Can a computer game make you cry?''

To get there, the Sims team might have to make the Sims speak. So far, the challenge of creating characters that can lip-sync correctly and say the right things in the right situations is one computing challenge that is insurmountable with current technology.


Contact Dean Takahashi at dtakahashi@mercurynews.com or (408) 920-5739.