Chapter 1 (Rich & Knight)
Chapter 1 (Rich & Knight)
Chapter 1 (Rich & Knight)
com
An Introductory Course
1. 2.
3. 4.
What is AI? The foundations of AI A brief history of AI The state of the art Introductory problems
Thinking humanly
Thinking rationally
Acting humanly
Acting rationally
Human Interrogator
AI System
7
Obstacles:
- Informal knowledge representation. - Computational complexity and resources.
10
11
12
13
14
15
Natural Languages
Understanding Generation Translation
Formal Tasks Games : chess, checkers etc Mathematics: Geometry, logic,Proving properties of programs Expert Tasks: Engineering ( Design, Fault finding, Manufacturing planning) Scientific Analysis Medical Diagnosis Financial Analysis
17
Constantly changing
Differs from data that can be used
18
Expert system controls a spacecraft. Robot can walk on stairs and hold a cup of water. Language translation for webpages. Home appliances use fuzzy logic. ......
19
Use of generalization
Clarity of their knowledge
20
X o
21
Program 1: Data Structures: Board: 9 element vector representing the board, with 1-9 for each square. An element contains the value 0 if it is blank, 1 if it is filled by X, or 2 if it is filled with a O Movetable: A large vector of 19,683 elements ( 3^9), each element is 9element vector.
Algorithm: 1. 2. 3. View the vector as a ternary number. Convert it to a decimal number. Use the computed number as an index into Move-Table and access the vector stored there. Set the new board to that vector.
22
23
1 2 3 4 5 6 7 8 9
24
Program 2: Data Structure: A nine element vector representing the board. But instead of using 0,1 and 2 in each element, we store 2 for blank, 3 for X and 5 for O Functions: Make2: returns 5 if the center sqaure is blank. Else any other balnk sq Posswin(p): Returns 0 if the player p cannot win on his next move; otherwise it returns the number of the square that constitutes a winning move. If the product is 18 (3x3x2), then X can win. If the product is 50 ( 5x5x2) then O can win. Go(n): Makes a move in the square n
Strategy:
Turn = 1 Turn = 2 Turn = 3 Turn = 4 ....... Go(1) If Board[5] is blank, Go(5), else Go(1) If Board[9] is blank, Go(9), else Go(3) If Posswin(X) 0, then Go(Posswin(X))
25
Comments: 1. Not efficient in time, as it has to check several conditions before making each move. 2. Easier to understand the programs strategy. 3. Hard to generalize.
26
8 3 4 1 5 9 6 7 2
15 - (8 + 5)
27
Comments: 1. Checking for a possible win is quicker. 2. Human finds the row-scan approach easier, while computer finds the number-counting approach more efficient.
28
Program 3: 1. If it is a win, give it the highest rating. 2. Otherwise, consider all the moves the opponent could make next. Assume the opponent will make the move that is worst for us. Assign the rating of that move to the current node. 3. The best node is then the one with the highest rating.
29
Comments: 1. Require much more time to consider all possible moves. 2. Could be extended to handle more complicated games.
30
Mary went shopping for a new coat. She found a red one she really liked. When she got it home, she discovered that it went perfectly with her favourite dress.
Q1: What did Mary go shopping for? Q2: What did Mary find that she liked? Q3: Did Mary buy anything?
31
What did X Y
Program 2: Structured representation of sentences: Event2: instance: tense: agent: object: Thing1: instance: colour:
Coat Red
33
C leaves L
"The exciting new effort to make computers think ... machines with minds, in the full and literal senses" (Haugeland, 1985)
"[The automation of] activities that we associate with human thinking, activities such as decision-making, problem solving, learning ..." (Bellman, 1978)
35
"The study of mental faculties, through the use of computational models" (Charniak and McDermott, 1985)
"The study of the computations that make it possible to perceive, reason, and act" (Winston, 1992) "The art of creating machines that perform functions that require intelligence when performed by people" (Kurzweil, 1990)
36
"The study of how to make computers do things at which, at the moment, people are better" (Rich and Knight, 1991)
"A field of study that seeks to explain and emulate intelligent behavior in terms of computationl processes" (Schalkoff, 1990) "The branch of computer science that is concerned with the automation of intelligent behaviour" (Luger and Stubblefield, 1993)
37
"A collection of algorithms that are computationally tractable, adequate approximations of intractabiliy specified problems" (Partridge, 1991)
"The enterprise of constructing a physical symbol system that can reliably pass the Turing test" (Ginsberge, 1993) "The f ield of computer science that studies how machines can be made to act intelligently" (Jackson, 1986)
38