Monday, November 27, 2017

Artificial Intelligence and Following Instructions

Artificial intelligence isn't true intelligence.  Computers do not yet have the ability to think; to learn.  A computer is only able to do what it is told.  If you're playing a game, the character in the game basically follows a flow chart to know what to do.  If you walk into the virtual room, the character you encounter will react in certain ways -- if you have already found the magic sword the guard may attack... or if you are a magician the guard may run afraid... or if you have joined a guild the guard may welcome you in and show you the attack plans.  The guard will only follow the instructions given.  The guard will never think of something on his own... or be in a bad mood and act a certain way...  or decide to take the treasure for himself.

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.
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.
Your Challenge: Write Exact Instructions for Making a Peanut Butter & Jelly Sandwich:

  1. Get a piece of paper and a writing implement ready.
  2. Create a list (set) of instructions for making a PB&J
  3. Label your instructions "PB&J Alpha"
  4. Exchange instructions with a partner and exchange feedback for possible problems.
  5. Create a new list (set) of instructions to fix any possible problems from before.
  6. Label your instructions "PB&J Beta"
  7. Exchange instructions with a new partner and exchange feedback.
  8. Create a new list (set) of instructions to fix any possible problems from before.
  9. Label your instructions "PB&J Beta 2"
  10. Watch the following video:


  11. Make adjustments to your previous instructions to eliminate potential issues.
  12. Label your instructions "PB&J 1.0"
Here's an interesting video from a game developer doing "AI":

No comments:

Post a Comment