As a programmer, you have to think of all of the possibilities and program for those choices. We aren't [yet] making a cool video game where characters are interacting with each other, but we will be creating programs with logic problems. Flowcharting helps, but we have to remember to be specific. If you have ever used Siri on an iPhone or iPad, you're probably encountered this.
You may have also played with "bots" in "shooter games" (like Counter Strike or Team Fortress) where the bots get confused over simple situations. Sometimes you'll find them running at full speed, but they are stuck in a corner or behind a box. The programmer neglected to write a "what if" scenario for whatever got them stuck. Computers (and "artificial thinkers") can only do what you tell them to do.
Here's an example [from a JAVA for Dummies book] illustrating this principle:
Just yesterday, I was chatting with my servant, RoboJeeves. (RoboJeeves is an upscale model in the RJ-3000 line of personal robotic life-forms.) Here’s how the discussion went:
Me: RoboJeeves, tell me the velocity of an object after it’s been falling for three seconds in a vacuum.
RoboJeeves: All right, I will. “The velocity of an object after it’s been falling for three seconds in a vacuum.” There, I told it to you.
Me: RoboJeeves, don’t give me that smart-alecky answer. I want a number. I want the actual velocity.
RoboJeeves: Okay! “A number; the actual velocity.”
Me: RJ, these cheap jokes are beneath your dignity. Can you or can’t you tell me the answer to my question?
RoboJeeves: Yes.
Me: “Yes,” what?
RoboJeeves: Yes, I either can or can’t tell you the answer to your question.
Me: Well, which is it? Can you?
RoboJeeves: Yes, I can.
Me: Then do it. Tell me the answer.
RoboJeeves: The velocity is 153,984,792 miles per hour.
Me: (After pausing to think . . .) RJ, I know you never make a mistake, but that number, 153,984,792, is much too high.
RoboJeeves: Too high? That’s impossible. Things fall very quickly on the giant planet Mangorrrrkthongo. Now, if you wanted to know about objects falling on Earth, you should have said so in the first place.
Here's an interesting video from a game developer doing "AI":
No comments:
Post a Comment