How a computer thinks?

hesitantdoubtfulΤεχνίτη Νοημοσύνη και Ρομποτική

29 Οκτ 2013 (πριν από 3 χρόνια και 11 μήνες)

81 εμφανίσεις

How a computer thinks?

New module
---
programming

Objectives for today

You will be able to explain the concept of a



computer program.


Explain the idea of intelligence


especially
as it relates to computers.



Bring out your journals


Activity one



Complete the “Following Directions” quiz.
Use a page in your journal


You have 5 minutes



Times up


perfect paper is one which has only the
word “December” written in the top left
corner.



The directions said to read all parts of the
test before doing anything and step 14
says to only complete step #3.


Activity 2



Complete the Drawing Pictures Activity. 5
minutes



show your picture
---



Did anyone draw it differently?



explain why you drew the pictures as you
did?




what does following directions has to do
with computers?



It’s a machine


is necessary that a computer follows a
specific set of directions (or instructions)
called a computer program and must
follow all of the directions precisely.

Now we are going to design a
program



Write down a set of instructions in your
journal for a computer to make a peanut
butter and jelly sandwich. You have 5
minutes


Need to be precise with
instructions


instructions for making a

peanut butter and

jelly sandwich are open

to interpretation.



how do we could overcome this problem


so that a computer could follow the
instructions and make a perfect sandwich
each time. Write your ideas in your journal.
You have 5 minutes


Need a better language



English doesn’t work for describing the
instructions.



There needs to be a limited set of
instructions which define very precisely
what the computer does.




For example, we can have a computer turn on a
“dot” of a specific color in a specific location on the
screen.

By having the computer turn on many different dots
in different colors, we can have the computer draw a
picture.






We don’t have an instruction for the computer to
“draw a picture of a house”

that’s much too general and too open for
interpretation

Operating system
-
is a big program


Makes the hardware work for you by
giving it instructions. Specific instructions


If we look at robots the need to give
specific instructions becomes very
evident. We have to give the
bot

a
program to function. Some bots are given
intelligence this way.

There will be a
microprocessor

somewhere in
the
bot

For example


Link to game:


http://www.kongregate.com/games/Coolio
_Niato/light
-
bot




Play for 10 minutes



Enter in your journal


what you discovered


by playing?

Point is


need of commands (software) to make
the hardware (robot in this case) to
perform a task.

Answer these as a group and enter
your results in your journal



What is intelligence?


Are computers intelligent?


Why or why not?


Intelligence

is the ability to learn about, learn from, understand,
and interact with one’s environment.

By the above definition computers are intelligent


The computers will become more intelligent than

the human beings within the next 20 years. That is
2030.

Do you believe this? How old will you be ?


Humans are intelligent differently then computers

http://www.dennisgorelik.com/ai/ComputerIntellige
nceVsHumanIntelligence.htm


Turing Activity


This activity explores just how we might
recognize whether a system is truly
"intelligent". It involves reasoning about
what it means to be intelligent, and even
what makes us human.

Last Time


We looked into what a computer
program is in general terms.



What intelligence is.

Objectives for today

You will be able to


Name and explain the steps in the
problem
-
solving process.


Describe what an algorithm is


First


Write in your journal, the steps you
presently use to solve a problem. We will
go back to it later

Task



Is to determine how many "breaks" it will
take to tear a rectangular piece of paper
into 12 equal pieces. One break will result
in that one piece being divided into two
pieces. And so on




Write in your journal how many breaks
you will need to tear the paper into 12
pieces


At this point


Determine a problem solving plan.


Write it in your journal


Implement your plan

Answer these questions
-
in your
journal



Was your initial guess correct?


What process did you use to come up with
your guess?


Did working with your group and creating
your plan change your guess??


How many breaks did it take?


Did your plan work?


Did it match what you wrote in your
journal?





Formal problem solving



Understand the problem


read or listen to the
problem statement.


Make a plan to solve the problem


use pictures,
charts, graphs, systematic lists, objects, or act out
the solution to help you devise a plan to solve the
problem
--
In Computer Science we call this plan
an
algorithm.


Carry out the plan


once the plan is conceived
and understood, follow the plan. If you have
planned well, this is the easy part.


Review and reflect on how the problem was
solved


Extend the problem to account for
N pieces
-
enter into your journal




Pieces

Breaks

1

2

3

4

5

6

7

8

9

10

11

12

N



One problem
-
solving strategy used in solving
a problem is to solve a problem for specific
values, find the pattern and then generalize
the solution.



The generalized solution is the algorithm




Why is this problem an important problem
to solve for a carpenter?


Handout


Complete the handout given to you



You have 10 minutes

Solution 1


This one is just like the paper problem



I will shake N
-
1 hands because I can’t
shake my own hand

Solution 2


This problem often gives the fence post
error with beginner programmers


When you complete a span you add one


Answer is 12 posts + 1 or generally


N +1 where N is the number of
measurements in the span

Project

This project reinforces the



The steps in the problem
-
solving process.


Your ability to solve a problem by applying
the problem
-
solving process.


Your ability to express a solution using
standard design tools.


Your ability to determine if a given solution
successfully solves a stated problem


Talks about data needed by
the
computer


http://richannel.org/christmas
-
lectures/2008/2008
-
chris
-
bishop#/christmas
-
lectures
-
2008
-
chris
-
bishop
--
the
-
ghost
-
in
-
the
-
machine

Algorithms used in programming


In the video yesterday, the speaker
explained the idea of divide and conquer
to find a number.



He used it for finding a number but it can
used other ways as well.

Another example


a pair of dirty socks have accidently been
wrapped in one of the presents that Santa
is about to deliver, and he needs to figure
out which one to avoid a child getting a
nasty surprise.



Some elves were wrapping a thousand
and twenty four toys, roller skates for a
thousand and twenty four students



One of the elves dropped a pair of dirty
socks in one of the thousand and twenty
four boxes!



No time

the presents have to be
delivered in a couple of hours

What would you do?



weigh each present??


They’ll all weigh the same except for one,
and that one’s the culprit!



It’ll take a jolly long time.


could make one comparison every second
and there is 1024 boxes

Instead use divide and conquer



Put half the boxes on one side of the
scale, and half the boxes on other
whichever side goes up, that pile we
dismiss!”


How many comparisons will you need to
make before you get to the last 2 boxes?



Solve it in your journal



512


256