Some of my earliest memories are of my dad bouncing me on his knee, playing computer games on our 8088. I was fascinated with computers, despite the fact that we only had two games for the machine: a game where a donkey ran down the road avoiding cars, and an app that used the PC speaker to crudely simulate a piano. One of my first phrases was "Dunkee n musik," a jumbled group of syllables I would yelp when I wanted to play the games.
Right around then was when I saw my first AI application. The title escapes me (I believe it may have been just Animal), but the premise was simple enough. The object of the game was for the computer to guess an animal you were thinking about. It would ask a series of yes/no questions that would narrow down the possible choices (examples would be "does your animal fly?" or "does your animal have four legs?"), and when it was sure, it would tell you what it thought your animal was. The neat thing was, if it didn't guess your animal, it would ask you for a question that differentiated the two animals, something your animal had that the other didn't. From then on, the program would be able to guess your animal! It could learn!
This impressed my young mind to no end. After some formal training in programming, I've come to accept that it's a fairly trivial program: The application keeps an internal binary tree with a question at each branch and an animal at each leaf. It descends down the tree asking the question at each branch and taking the appropriate direction. If it reaches a leaf and the animal stored there isn't yours, it creates a new branch, adds your question, and puts your animal and the animal previously in the leaf in two new leaves.
How the program worked, however, really isn't that important. The trick is, it seemed intelligent to me. Game
programmers need to aim for this. While academia argues for the next 50 years over whether or not human-level intelligence is possible with computers, game developers need only be concerned with tricking humans into thinking what they're playing against is intelligent. And luckily (for both developers and academia), humans aren't that smart.
This is, of course, not as easy as it sounds. Video games are rife with pretty stupid computer opponents. Early first-person shooters had enemies that walked towards the player in a zigzag pattern, never walking directly towards their target, shooting intermittently. Bad guys in other games would sometimes walk into a corner looking for you, determined that they would eventually find you even though you were several rooms away. Fighting games are even worse. The AI governing computer opponents can become extremely repetitive (so that every time you jump towards the opponent, they execute the same move). I can't promise to teach you everything you need to know to make the next Reaper Bot; that would be the topic of an entire book all its own. By the end of this chapter, however, you should be able to write an AI that can at least challenge you and maybe even surprise you!
Right around then was when I saw my first AI application. The title escapes me (I believe it may have been just Animal), but the premise was simple enough. The object of the game was for the computer to guess an animal you were thinking about. It would ask a series of yes/no questions that would narrow down the possible choices (examples would be "does your animal fly?" or "does your animal have four legs?"), and when it was sure, it would tell you what it thought your animal was. The neat thing was, if it didn't guess your animal, it would ask you for a question that differentiated the two animals, something your animal had that the other didn't. From then on, the program would be able to guess your animal! It could learn!
This impressed my young mind to no end. After some formal training in programming, I've come to accept that it's a fairly trivial program: The application keeps an internal binary tree with a question at each branch and an animal at each leaf. It descends down the tree asking the question at each branch and taking the appropriate direction. If it reaches a leaf and the animal stored there isn't yours, it creates a new branch, adds your question, and puts your animal and the animal previously in the leaf in two new leaves.
How the program worked, however, really isn't that important. The trick is, it seemed intelligent to me. Game
programmers need to aim for this. While academia argues for the next 50 years over whether or not human-level intelligence is possible with computers, game developers need only be concerned with tricking humans into thinking what they're playing against is intelligent. And luckily (for both developers and academia), humans aren't that smart.
This is, of course, not as easy as it sounds. Video games are rife with pretty stupid computer opponents. Early first-person shooters had enemies that walked towards the player in a zigzag pattern, never walking directly towards their target, shooting intermittently. Bad guys in other games would sometimes walk into a corner looking for you, determined that they would eventually find you even though you were several rooms away. Fighting games are even worse. The AI governing computer opponents can become extremely repetitive (so that every time you jump towards the opponent, they execute the same move). I can't promise to teach you everything you need to know to make the next Reaper Bot; that would be the topic of an entire book all its own. By the end of this chapter, however, you should be able to write an AI that can at least challenge you and maybe even surprise you!
No comments:
Post a Comment