Thursday, November 27, 2008

The Chess Trick

Game design has this habit of touching on the nature of life.

The story goes that there is a man. This man goes into a chess club, and he introduces himself. He says that he has been learning chess at home, and he's never played a real opponent before, but he thinks he's pretty good.

The members of the club have a chuckle. They are amused. To chess, there are levels and levels and it is quite clear that the newcomer is what might be termed a "noob". What's more, he's picked the wrong club to make his boast in. This club, you see, includes two chess grandmasters.

And they tell him so. They tell him he's not as good as he thinks he is. But he doesn't take this well. He tells them that he's quite the prodigy, and he's spent a lot of time with his chess books and actually he's quite astounding. And he says he'll take on their so-called grandmasters, and he will win.

The club has a good laugh, and tells him that, no, he will not win. The newcomer gets quite red in the face, and so he puts his money where his mouth is. He says he will play both the grandmasters, and he will beat at least one, and if anyone says he can't he'll meet them in a $200 wager.

There's some more laughter, so the newcomer goes a step further. He will (he says) play both the grandmasters at the same time. The members of the club think this is the funniest thing they've heard all month, so one by one they make their bets, and two tables are set up for the games.

Well, the newcomer plays both the grandmasters, and lo and behold, although he loses to one, he beats the other soundly, and collects his money. And after he had left the club, considerably richer, the club members examined the boards of the completed games and found them to be exact mirrors of each other.

He had been copying the moves of one grandmaster against the other - the two grandmasters had effectively been playing against each other.

I've been playing Left 4 Dead. In the developer commentary for that game, it's mentioned that one of the design challenges was making sure the zombies could reach any place that the players could reach. If I understand their solutions correctly, one of the ways they solved this problem was with follower pathfinding - that is, working out how to get to a place based on how others had gotten there previously. That's effectively the AI getting "smarter" as a result of player discoveries.

You may be familiar with the Jabberwacky chatbot. Jabberwacky takes an extremely large database of chat and uses it to make contextual replies to conversation directed at it. When it's asked a question, it looks back through its chat logs to see how other users have answered that question in the past, and uses their responses as its dialogue. In effect, when you talk to Jabberwacky you're not talking to a program - you're having a (fractured) conversation with the millions of people who have talked to the program before you.

Is this artificial intelligence? Is collating and regurgitating the responses of real humans the same thing as thought? Is it any different to the way humans behave, or is it only a degree of sorting algorithm sophistication?

Is this the way forward for AI development in games? Is it cheaper to record and repeat the keypresses of millions of players than it is to create genuine logical behaviour?

Ultimately, what difference is there between live competitive play, and that competitive play being "played back" against a fresh player?

3 comments:

Grant said...

At the end of the day, if you're choosing between actual AI and an indistinguishable simulation of AI, what's the functional difference?

Greg Tannahill said...

I'll be honest; this post started with a clear idea which wasn't quite so clear by the time I was five paragraphs in.

But here's an interesting point - if an AI consists of recording and replaying player activity, does this raise copyright issues? Does intellectual property attach to a player's unique play style?

I mean that not as a strictly legal question to be answered by reference to legislation, so perhaps I'll rephrase it as should intellectual property attach?

Anonymous said...

For games it's as much about whether the enemies "feel" like they are creatures rather than bots as the actual difficulty. Still if this technology extends the period of time before players start exploiting the AI stupidity then it's a good thing.

I have to admit left 4 dead is definitely on my shopping list when I get back to Aus.

Nick