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.
For example, there's an old joke about a man who discovers a Genie in a bottle. For one of his wishes, the man says, "Genie -- make me a chocolate milkshake." Poof -- the Genie turned him into a chocolate milkshake.
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.Your Challenge: Write Exact Instructions for Making a Peanut Butter & Jelly Sandwich:
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.
- Get a piece of paper and a writing implement ready.
- Create a list (set) of instructions for making a PB&J
- Label your instructions "PB&J Alpha"
- Exchange instructions with a partner and exchange feedback for possible problems.
- Create a new list (set) of instructions to fix any possible problems from before.
- Label your instructions "PB&J Beta"
- Exchange instructions with a new partner and exchange feedback.
- Create a new list (set) of instructions to fix any possible problems from before.
- Label your instructions "PB&J Beta 2"
- Watch the following video:
- Make adjustments to your previous instructions to eliminate potential issues.
- Label your instructions "PB&J 1.0"
Here's an interesting video from a game developer doing "AI":
No comments:
Post a Comment