quick work: memory allocation · artificial intelligence(ai) ai = the study of computer systems...
TRANSCRIPT
Quick work: Memory allocation
1
The OS is using a fixed partition algorithm.Processes place requests to the OS in the following sequence:
P1=15 KB, P2=5 KB, P3=30 KB
Draw the memory map at the end, if each of the following algorithms is in use:• Worst-fit• First-fit• Best-fit
QUIZ:P1=15 KB, P2=5 KB, P3=30 KB
2
Worst-fit Best-fit First-fit
Chapter 13
Artificial Intelligence
4
13.1 Thinking Machines
Can youlist the items
in thispicture?
Courtesy of Amy Rose.
5
Thinking Machines
Can you• Count the distributionof letters in a book?
• Add a thousand 4-digit numbers?
• Match fingerprints?• Search a list of amillion values forduplicates?
6
Thinking Machines
• Image processing• Language• Strategy• Learning
Humans do best Computers do best
• Counting• Operating fast with
large numbers• Searching, sorting• Matching patterns
7
Artificial intelligence (AI) AI = the study of computer systems that model and apply the intelligence of the human (animal) mindExamples:
• Writing a program to pick out objects in a picture
• Navigate to the nest using landmarks
• Play backgammon, chess, go, …
8
AI and strategy board games• July 1979, BKG 9.8 was strong enough to play against the reigning backgammon world champion Luigi Villa. It won the match, 7–1, becoming the first computer program to defeat a world champion in any board game. [http://en.wikipedia.org/wiki/Backgammon]
• Deep Blue versus Garry Kasparov was a pair of famous six-game human–computer chess matches, in the format of machine and humans, versus a human. In this format, on the machine side a team of chess experts and programmers manually alter engineering between the games. The first match was played in 1996, and Kasparov won 4–2. A rematch was played in 1997 – this time Deep Blue won 3½–2½. [http://en.wikipedia.org/wiki/Deep_Blue_versus_Garry_Kasparov]
• AlphaGo versus Ke Jie was a three-game Go match between the computer Go program AlphaGo and current world No. 1 ranking player Ke Jie, played in May 2017. AlphaGo won 3-0. [https://en.wikipedia.org/wiki/AlphaGo_versus_Ke_Jie]
Not in text
9
AI and strategy board gamesSee more links on the webpage
www.agapie.net News from AI and Robotics
Not in text
QUIZ: True or false?A. A computer has beaten the best human checkers
player.
B. A computer has beaten the best human backgammon player.
C. A computer has beaten the best human chessplayer.
D. A computer has beaten the best human go player.
E. A computer has beaten the best human pokerplayer.
10
11
Turing test = A test to empirically determine whether a computer has achieved (human) intelligence
Alan Turing English mathematician who wrote a landmark paper in 1950 that asked the question: Can machines think?
– Yes, the same guy who worked at Bletchley Park during WWII!
He proposed a test that could answer the question
The “ultimate goal” of AI (?)
12
The Turing Test
Figure 13.2 In a Turing test, the interrogator must determine which respondent is the computer and which is the human
13
The Turing TestLoebner prizeThe first practical instantiation of the Turing test, held annually since 1991!
Chatbots = programs designed to carry on a conversation with a human user
Has any chatbot won the Loebner Prize yet? Read the Wikipedia article: https://en.wikipedia.org/wiki/Loebner_Prize
Try talking with one of the following chatbots:
• http://www.alicebot.org/
• http://www.jabberwacky.com/
• http://www.princetonai.com/bot/
• http://www.cleverbot.com/
• http://www.simsimi.com/
Read more: http://en.wikipedia.org/wiki/Chatterbot
A program passed the Turing Test!On 7 June 2014, at a contest marking the 60th
anniversary of Turing's death, 33% of the event's judges thought that the program Eugene Goostman was human after 5 minutes of interacting with it.
Turing's prediction in his 1950 paper Computing Machinery and Intelligence, was that, by the year 2000, machines would be capable of fooling 30% of human judges after five minutes of questioning.
The event's organizer, Kevin Warwick, considered it to have passed Turing's test.Source: https://en.wikipedia.org/wiki/Eugene_Goostman
15
16
Strategies for passing the Turing Test
Weak equivalenceTwo systems (human and computer) are equivalent in results (output), but they do not arrive at those results in the same way
Strong equivalenceTwo systems (human and computer) use the same internal processes to produce results
Not in text
17
13.2 Knowledge Representation
• We need to create a logical view of the data, based on how we want to process it
• Natural language is very descriptive, but does not lend itself to efficient processing
• Semantic networks and search trees are promising techniques for representing knowledge.
18
Semantic NetworksSemantic network/net = A knowledge representation technique that focuses on the relationships between objects.
A directed graph is used to represent a semantic net.
Remember directedGraphs from Ch.8?
19
Semantic Networks
What questions can we ask about the data in this network?
What questions can we not ask?
20
SolutionWhat questions can we ask about the data in this network?• Is John male?• Does Mary have an eye
color?• How many students live in
Heritage Acres?
What questions can we not ask?• Is John a good student?• Do Mary and John know each other?
QUIZ
21
• Do whales have vertebrae?• Are there 2 or more animals that have fur?• Do bears live in water?
What would a computer answer, based solely on this S.N.?
22
Prolog: a language dedicated toSemantic Networks!
Not in text
Prolog code
Visual representation of the S.N.
23
Not in text
Who are Jim’s ancestors?
Prolog: a language dedicated toSemantic Networks!
24
Not in text Prolog: a language dedicated toSemantic Networks!
In order to answer this, we need to add more information to our model!
Who are Jim’s female ancestors?
25
Designing Semantic Networks• The objects in the network represent the objects in the
real world that we are representing• The relationships that we represent are based on the
real world questions that we would like to ask• That is, the types of relationships represented
determine which questions are easily answered, which are more difficult to answer, and which cannot be answered
• Challenges:– Find the relationships that relevant to the problem!– Populate the network with all data needed!
26
Search TreesSearch tree = structure that represents alternatives in adversarial situations such as game playing
The paths down a search tree represent a series of decisions made by the players
Remember Trees from Ch.8?
27
Nim
Figure 13.4 A search tree for a simplified version of Nim: Five spaces total, each player (X and 0) places 1, 2, or 3 symbols from Left to Right. Player to place last symbol wins.
28
Is this a binary tree?
29
Nim
For each leaf, decide which player has won!Does the first player have a winning strategy?
30
Your turn! Draw the tree for the Nim game with 4 positions and either 1 or 2 symbols
31
Search tree for the Nim game with 4 positions and either 1 or 2 symbols
32
Search tree for the Nim game with 4 positions and either 1 or 2 symbols
Does the first player have a winning strategy?
Quick work for next time
33
• Draw the search tree for the Nim game with 5 positions either 1 or 2 symbols per turn.
• Does the first player have a winning strategy?• Does the second player have one?
34
Search TreesSearch tree analysis can be applied to other, more complicated games such as chess.However, the full analysis of the chess search tree would take many lifetimes of the Universe! (on today’s fastest supercomputers!)Because these trees are so large, only a fraction of the tree can be analyzed in a reasonable time.Therefore, we must find a way to intelligently prune the tree.
35
Techniques for pruning Search Trees
Depth-first search down the paths of a tree prior to searching across levels
Breadth-first search across levels of a tree prior to searching down specific paths • Breadth-first tends to yield the best results
Remember DFS from Ch.8?
36
DFS vs. BFS example
Figure 13.5 Depth-first and breadth-first searches
37
This is the end of the material covered in our course!
Skip the remainder of Ch.13, starting with13.3 Expert Systems
38
Read bio: Who am I?• My Ph.D. was in Political
Science, not Computer Science!
• I coined the term “bounded rationality” in 1947.
• I received the Nobel prize in economics and the Turing award (in CS)!
Practice/review problems for Ch.13:
• 6 through 12
• 22 through 35
• 37, 38, 39, 42 through 45
39
Not a homework, do not turn in!