Presentation is loading. Please wait.

Presentation is loading. Please wait.

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Introduction to Computers CS1100.01 Zhizhang Shen Chapter 11: What Can Computers.

Similar presentations


Presentation on theme: "Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Introduction to Computers CS1100.01 Zhizhang Shen Chapter 11: What Can Computers."— Presentation transcript:

1 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Introduction to Computers CS1100.01 Zhizhang Shen Chapter 11: What Can Computers Do?

2 1-2 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 23-2 Can Computers think? The Turing Test: –Two identical rooms labeled A and B are connected electronically to a judge who can type questions directed to the occupant of either room. –A human sits in A and a computer sits in B. –The judge's goal is to decide, based on the questions asked and the answers received, which room contains the computer. –If, after a reasonable period of time, the judge can’t decide, the computer can be said to be intelligent. –If you can configure a computer to pass the test, you will be rich.rich

3 1-3 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley What am I talking to? 23-3

4 1-4 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 23-4 Big deal?  This Test sidesteps definitions of thinking or intelligence  Does not focus on any specific ability  Advances in the last half century: o Parsing grammatical structure of natural language Natural language processing o Machine translation of natural language Machine translation o Recognizing meaningful information based on the syntax

5 1-5 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 23-5 Can a computer act intelligently? Eliza, the Doctor Program, was programmed to ask questions in dialog like a psychotherapist and a patient Eliza An expert system, based on symptoms, tell what disease a patient is suffering. Artificial Intelligence (AI): To exhibit intelligence, computer has to "understand" a complex situation and reason well enough to act on its understanding (no scripting) Robotics: use robots to replace humans in dangerous and boring situations such as bombing site or car factory

6 1-6 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 23-6 Chess playing: a specific examle Well defined: Clear rules and definition of success (beat a grand master) The Board Configuration On May 11, 1997, Deep Blue, a computer system made by IBM, defeated the reigning World Chess Champion Garry Kasparov.

7 1-7 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 23-7 Deep Blue makes progress…. 1996, Garry Kasparov vs. IBM's Deep Blue –Deep Blue: parallel computer composed of 32 special purpose computers and 256 custom chess processors –Kasparov won 1997, Kasparov vs. Deep Blue –Kasparov lost

8 1-8 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Two core pieces in AI When doing AI, we need to tell a computer what we know (knowledge representation), and a machine needs to find out, based on this set of knowledge, the best move it should take, among a bunch, in a certain situation. The latter is done through a search engine. As we saw, a machine can search very fast. 23-8

9 1-9 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 23-9 The game tree –To decide which move to make, computer explores various moves to determine whether the move will make it “better” or “worse” off –Evaluation Function: Assigns a numerical value to each piece and computes a score for the move. Positive score is better; negative score is worse Such a value is calculated based on experience and AI theory Computer computes Evaluation Function on every legal move to make sure it is the most valuable one

10 1-10 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 23-10

11 1-11 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 23-11 How does a tree grow? Using a Database of Knowledge –Computer keeps "knowledge”, i.e., human’s experience, e.g., in playing chess For each board configuration, computer considers every possible next move, and the reaction from opponent, based on its knowledge and AI theory, It then analyzes them and pick up the “best” move. –Can’t it think all the way through? –No. It can't go all the way to the end because the number of possible moves increases exponentially

12 1-12 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 23-12 How did the machine do it? The problem was basically solved by speed and space –Computer knows a lot and can look for the answer much faster –In a way, intelligence may be the ability to consider many alternatives in an informed and directed way –The program can sometimes respond to new inputs and respond in a way not planned by its designers

13 1-13 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 23-13 Make it even faster –Combination of faster computers, larger databases, and better evaluation functions –Parallel computing—application of several computers to one task—and custom hardware brought possibility of beating a grand master in a tournament –When eating, we eat only one thing at a time; since we have only one mouth. If someone has several, he will eat much faster

14 1-14 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 23-14 Can a computer act creatively? –Creativity is by definition a process of breaking rules –The computer or program does not invent the rules. It always follows them as given by human. –Thus, even if it “creates” things, it does so by following the rules. –Let’s check out a few examples

15 1-15 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 23-15

16 1-16 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 23-16 Look at creativity as a spectrum… –Inspiration ranges from "flash out of the blue" to hard work that lead to "incremental revision" –Bruce Jacob wrote a program to compose musical canons (variations on a theme) Randomly generates new themes, assesses as good or bad, discards bad ones Forcing random variation to fit rules sometimes produces new techniques Incremental revision appears to be algorithmic

17 1-17 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 23-17 What part is algorithmic? The more deeply we understand creativity, the more we find ways in which it is algorithmic To the extent that creativity is algorithmic, a computer can be creative Computer can work with many rules very quickly. Progress in understanding creativity benefits people, too

18 1-18 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 23-18 Universal information processor A computer can be a general purpose one, where any program runs; or a special purpose one such as an ATM, or the one making Pizza, or the one making cars A general purpose computer is sufficient for any task if we can buy, or write the software needed People play a big role in customizing computers for specific task—one reason why we have to understand IT

19 1-19 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 23-19 The Universality principle What makes one computer more powerful than another? Any computer using simple instructions could simulate any other computer. –Universality Principle: All computers have the same power –The only difference is how fast it runs and how much it stores

20 1-20 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 23-20 What does this mean? Computers perform same kinds of computations, such as arithmetic and logic ones, but at different rates. –A machine solves a problem depending on how much it knows. The larger its space is, it could know more, thus might solve a problem better. It costs more –The power of a computer comes from its memory, the process just makes it run faster –The faster it works, the users will be happier, thus better. But it also costs more.

21 1-21 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley A few questions –How do old machines become outmoded if they're all the same? An old machine typically runs slower, with less space. –Is the computer in my laptop the same as the one in my microwave? No. Yours is a general purpose one, and that one in the microwave is specific –Why doesn't Macintosh software run on PC? Some of them do. Two versions. The reason might also be that Apple wants you to buy their machine. 23-21

22 1-22 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 23-22 Macintosh is different… –It has different hardware. The data are encoded differently, operate differently, and contain different instructions Their processors are different –The manager, i.e., the operating system, also work differently System IX vs Windows XP –They are equivalent in the sense that it is possible to write a program for each machine to process instructions of the other machine

23 1-23 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 23-23 Outmoded Computers New software runs slowly on old machines –a slower processor and less space –A bus can carry 40 people and get them there in a single trip, while cars have to take a few times. Hardware and software products may be incompatible with older machines –Can you play a blue ray DVD in an older player? –Newer software calls for more powerful machine

24 1-24 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 23-24 Processors embedded in microwave Processors are embedded in consumer products because they are cheaper than implementing same system with custom electronics Embedded processors could run other computer applications, but –Their programs are fixed: heat it up, rotate and stop –They have limited input/output devices: just a pad and a tiny display area

25 1-25 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 23-25 Why it takes longer? Some of the operations are more complicated. –32*56 is more complicated than 32+56 The same operation run longer with a larger amount of data –It takes longer to do 32*56 as compared with 2*4 –The phonebook is much thicker in NYC, then it takes longer to look for a number in NYC as compared with a one in Plymouth, NH

26 1-26 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Tasks of a different nature Recall the amount of work it takes to sort a list of n items is proportional to n^2. On the other than, if we are asked to check those n CDs to make sure they all face forward, it is clear that we only need to go through them once, hence, the amount of work is proportional to n. When we observe that one computation is taking more time than another, despite requiring the same amount of data, it is generally slower because the algorithm does more work to solve the problem 23-26

27 1-27 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 23-27 Big deal? –When doing the task on 1000 items, a work-proportional-to-n algorithm takes 1000 times as long as on 1 item –But, when doing the task on 1000, a work-proportional-to-n 2 algorithm takes 1 million times as long as on 1 item –Moreover, when the size grows up, the time also grows in different rate

28 1-28 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley How fast will a computer run, if it runs a billion instructions per second? 23-28

29 1-29 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 23-29 How tough could it be? Thus, if it is exponential, forget about it, since such an algorithm can only solve a problem with a rather restricted data. For example, the Hanoi problem asks us to move n disks from one stick to another with the help of the third; one disk at a time, and we can not move a larger disk on top of a smaller one.Hanoi problem It can be shown that it takes at least 2^{n-1}+1 movements to finish this task. Thus, this problem really takes lots of time to solve.

30 1-30 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley NP-Complete problems –Sell shampo around requires us to find a way to visit all the towns while traveling the least distance. –A straightforward solution for such a problem is to try all the possible solutions and pick the best, which takes exponential time. –No known practical algorithmic solution exists but no one has proved that there can’t be such solutions. –It has been shown that this, and almost every “real” problem, belongs to this set of problems. 23-30

31 1-31 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 23-31 It can’t be done at all Besides difficult problems, some others can’t be solved at all by a computer For these problems, there can’t be no algorithms at all (Halting problem) You can’t write a program to check whether a program will get into an infinite loop with an input

32 1-32 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 8-32 Homework Multiple choice: all of them Short answers: all of them


Download ppt "Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Introduction to Computers CS1100.01 Zhizhang Shen Chapter 11: What Can Computers."

Similar presentations


Ads by Google