review ece457 applied artificial intelligence fall 2007 lecture #14

42
Review ECE457 Applied Artificial Intelligence Fall 2007 Lecture #14

Upload: donald-fitzgerald

Post on 05-Jan-2016

216 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Review ECE457 Applied Artificial Intelligence Fall 2007 Lecture #14

Review

ECE457 Applied Artificial IntelligenceFall 2007

Lecture #14

Page 2: Review ECE457 Applied Artificial Intelligence Fall 2007 Lecture #14

ECE457 Applied Artificial Intelligence R. Khoury (2007) Page 2

What Is On The Final Everything that has important!

written next to it on the slides Everything that I said was

important

Page 3: Review ECE457 Applied Artificial Intelligence Fall 2007 Lecture #14

ECE457 Applied Artificial Intelligence R. Khoury (2007) Page 3

What Might Be On The Final Anything in the slides

Except “What Is Not On The Final” Anything in the required readings

in the textbook

Page 4: Review ECE457 Applied Artificial Intelligence Fall 2007 Lecture #14

ECE457 Applied Artificial Intelligence R. Khoury (2007) Page 4

What Is Not On The Final Examples of real applications

Dune II Traveling-wave tube IBM Deep Blue Pathfinder network Weighted Naïve Bayes Classifier Helicopter flight control Neural network pixel classifier Fuzzy robot navigation WordNet

Additional material on website Writing/debugging code

Page 5: Review ECE457 Applied Artificial Intelligence Fall 2007 Lecture #14

ECE457 Applied Artificial Intelligence R. Khoury (2007) Page 5

Practice Material Examples and exercises in slides Problems at the end of each

chapter in the textbook

Page 6: Review ECE457 Applied Artificial Intelligence Fall 2007 Lecture #14

ECE457 Applied Artificial Intelligence R. Khoury (2007) Page 6

Material Allowed at the Exam Pen or pencil, eraser, calculator Not allowed:

Books, notes Phones, blackberries, laptops, PDAs,

iPods, iPhones, iAnything, computers built into glasses like in Mission Impossible, or anything else electronic

Talking to other students, writing notes, sign language, smoke signals, semaphores

Cheating in general

Page 7: Review ECE457 Applied Artificial Intelligence Fall 2007 Lecture #14

ECE457 Applied Artificial Intelligence R. Khoury (2007) Page 7

Summary of Course Lecture 1: Introduction to AI

Types of agents Properties of the environment

Page 8: Review ECE457 Applied Artificial Intelligence Fall 2007 Lecture #14

ECE457 Applied Artificial Intelligence R. Khoury (2007) Page 8

Lecture 1: Introduction to AI Define the properties of the environment for

these problems: Robot soccer

Internet shopping (without eBay-style bidding)

Autonomous Mars rover

Theorem-solving assistant to a mathematician

Page 9: Review ECE457 Applied Artificial Intelligence Fall 2007 Lecture #14

ECE457 Applied Artificial Intelligence R. Khoury (2007) Page 9

Summary of Course Lecture 2: Uninformed Search

Well-defined problem Properties of search algorithms Uninformed search

Breath-first search Uniform-cost search Depth-first search Depth-limited search Iterative deepening search

Repeated states

Page 10: Review ECE457 Applied Artificial Intelligence Fall 2007 Lecture #14

ECE457 Applied Artificial Intelligence R. Khoury (2007) Page 10

Lecture 2: Uninformed Search You have a search tree with a branching

factor of b and a maximum depth of m. The depth of the shallowest goal node is d. You are considering searching the tree using either a depth-first search agent or a breath-first search agent.

Which one will have the best space complexity? Explain.

Page 11: Review ECE457 Applied Artificial Intelligence Fall 2007 Lecture #14

ECE457 Applied Artificial Intelligence R. Khoury (2007) Page 11

Lecture 2: Uninformed Search You have a search tree with a branching

factor of b and a maximum depth of m. The depth of the shallowest goal node is d. You are considering searching the tree using either a depth-first search agent or a breath-first search agent.

Which one will have the best time complexity? Explain.

Page 12: Review ECE457 Applied Artificial Intelligence Fall 2007 Lecture #14

ECE457 Applied Artificial Intelligence R. Khoury (2007) Page 12

Lecture 2: Uninformed Search A 3-foot-tall monkey is in a room where

some bananas are suspended from the 8-foot-high ceiling. He would like to get the bananas as quickly as possible. The room contains two stackable, movable climbable 3-foot-high crates.

Write this situation as a well-defined problem.

Page 13: Review ECE457 Applied Artificial Intelligence Fall 2007 Lecture #14

ECE457 Applied Artificial Intelligence R. Khoury (2007) Page 13

Lecture 2: Uninformed Search Initial state

Action

Goal test

Cost

Page 14: Review ECE457 Applied Artificial Intelligence Fall 2007 Lecture #14

ECE457 Applied Artificial Intelligence R. Khoury (2007) Page 14

Summary of Course Lecture 3: Informed Search

Informed search Greedy best-first search A* search

Heuristic functions Iterative improvement

Hill Climbing Simulated Annealing

Page 15: Review ECE457 Applied Artificial Intelligence Fall 2007 Lecture #14

ECE457 Applied Artificial Intelligence R. Khoury (2007) Page 15

Lecture 3: Informed Search Given the following tree, find the optimal

path to the goal G using A* search. The value of the heuristic h is specified for each node. The costs of the edges are specified on the tree. Assume that children of a node are placed into the list in a left-to-right order, and that nodes of equal priority are extracted (for expansion) from the list in FIFO order. Write a number inside the node indicating

the order in which the nodes are expanded from the start node S, i.e. 1, 2, ….

For each node generated, write the total cost f in the appropriate location on the graph.

Page 16: Review ECE457 Applied Artificial Intelligence Fall 2007 Lecture #14

ECE457 Applied Artificial Intelligence R. Khoury (2007) Page 16

1 f=4

f=

f=f=

f=f=

f=

f=

f=f=

f=f=f=

f=

S

G

1 3

22

3 1

1

21

1

122

h=4

h=2h=3

h=2

h=5 h=4 h=3

h=1

h=4

h=0

h=3

h=1

h=2

h=5

Lecture 3: Informed Search Find the optimal path to the goal G using A* search,

specifying the order in which nodes are expanded and the f-value of all generated nodes.

Page 17: Review ECE457 Applied Artificial Intelligence Fall 2007 Lecture #14

ECE457 Applied Artificial Intelligence R. Khoury (2007) Page 17

Summary of Course Lecture 4: Constraint Satisfaction

Problems Constraints Defining a CSP CSP search

Backtracking search Conflict-directed backjumping Heuristics Forward checking AC-3 algorithm

Page 18: Review ECE457 Applied Artificial Intelligence Fall 2007 Lecture #14

ECE457 Applied Artificial Intelligence R. Khoury (2007) Page 18

Lecture 4: CSP Using the most-constrained-variable CSP

heuristic, colour the adjacent map using the colours Blue, Red and Green. Show your reasoning at each step of the algorithm. Proceed in the following manner: After assigning a colour to a region, and before

choosing the next region to colour, apply the forward checking algorithm and show its results. Then choose the next region to colour using the most-constrained-variable heuristic, etc.

At each step, show the domains of each region and justify the choice of the next region to colour.

AB

C

D

E

F

Page 19: Review ECE457 Applied Artificial Intelligence Fall 2007 Lecture #14

ECE457 Applied Artificial Intelligence R. Khoury (2007) Page 19

Variables marked * have been assigned

A* = {Green}B* = {Red}C = {Red, Blue, Green}D = {Red, Blue, Green}E = {Red, Blue, Green}F = {Red, Blue, Green}

Lecture 4: CSP

AB

C

D

E

F

Page 20: Review ECE457 Applied Artificial Intelligence Fall 2007 Lecture #14

ECE457 Applied Artificial Intelligence R. Khoury (2007) Page 20

Summary of Course Lecture 5: Game Playing

Payoff functions Minimax algorithm Alpha-Beta pruning Non-quiescent positions & horizon

effect Expectiminimax

Page 21: Review ECE457 Applied Artificial Intelligence Fall 2007 Lecture #14

ECE457 Applied Artificial Intelligence R. Khoury (2007) Page 21

Lecture 5: Game Playing Consider the following game tree.

The payoff value of each leaf is written under that node. Apply the Minimax algorithm to obtain

the value of each non-leaf node. Apply Alpha-Beta Pruning to the game

tree. Find which nodes will be pruned. For each one, identify and explain the value of alpha and beta to show why it is pruned.

Page 22: Review ECE457 Applied Artificial Intelligence Fall 2007 Lecture #14

ECE457 Applied Artificial Intelligence R. Khoury (2007) Page 22

Lecture 5: Game Playing

4 8 9 -2 2

A

ED

C

B

MAX

MIN

F

G

H

I

J K

MAX

H

-1 -8 5

L

M N

A B C F H I L

Page 23: Review ECE457 Applied Artificial Intelligence Fall 2007 Lecture #14

ECE457 Applied Artificial Intelligence R. Khoury (2007) Page 23

Summary of Course Lecture 6: Logical Agents

Language, syntax, semantics Propositional logic

Propositional symbols and logical connectives

Inference with truth tables Inference with Resolution

Conversion to CNF Inference with Modus Ponens

Horn clauses Forward chaining Backward chaining

Page 24: Review ECE457 Applied Artificial Intelligence Fall 2007 Lecture #14

ECE457 Applied Artificial Intelligence R. Khoury (2007) Page 24

Summary of Course Lecture 7: First-Order Logic

First-Order Logic Constants, predicates, functions Universal and existential quantifiers Converting English sentences

Inference with propositionalization Inference with Generalized Modus

Ponens Unification algorithm

Inference with Resolution Conversion to CNF

Page 25: Review ECE457 Applied Artificial Intelligence Fall 2007 Lecture #14

ECE457 Applied Artificial Intelligence R. Khoury (2007) Page 25

Lecture 7: First-Order Logic Represent the following sentences in FOL using:

Take(s,c,t), Pass(s,c,t), Score(s,c,t), Student(s), French, Greek, Spring2001

Some students took French in spring 2001

Every student who takes French passes it

Only one student took Greek in Spring 2001

The best score in Greek is always higher than the best score in French

Page 26: Review ECE457 Applied Artificial Intelligence Fall 2007 Lecture #14

ECE457 Applied Artificial Intelligence R. Khoury (2007) Page 26

Lecture 7: First-Order Logic Convert this FOL sentences to

Conjunctive Normal Form. Show all steps of the conversion.

x [y F(y) G(x,y)] y G(y,x)

Page 27: Review ECE457 Applied Artificial Intelligence Fall 2007 Lecture #14

ECE457 Applied Artificial Intelligence R. Khoury (2007) Page 27

Lecture 7: First-Order Logic Find the most general unifier, if it exists. p = F(A,B,B)

q = F(x,y,z)

p = F(y,G(A,B))q = F(G(x,x),y)

p = F(G(y),y)q = F(G(x),A)

p = F(G(y),y)q = F(x,x)

Page 28: Review ECE457 Applied Artificial Intelligence Fall 2007 Lecture #14

ECE457 Applied Artificial Intelligence R. Khoury (2007) Page 28

Lecture 7: First-Order Logic Given the following KB:

Faster(x,y) Faster(y,z) Faster(x,z) Pig(x) Slug(y) Faster(x,y) Buffalo(x) Pig(y) Faster(x,y) Slug(Slimm) Pig(Pat) Buffalo(Bill)

Is Bill faster than Slimm, using forward chaining

Page 29: Review ECE457 Applied Artificial Intelligence Fall 2007 Lecture #14

ECE457 Applied Artificial Intelligence R. Khoury (2007) Page 29

Lecture 7: First-Order Logic Given the following KB:

Slimy(x) Creepy(x) Slug(x) Pig(x) Slug(y) Faster(x,y) Slimy(Slimm) Creepy(Slimm) Pig(Pat)

Is Pat faster than Slimm, using backward chaining

Page 30: Review ECE457 Applied Artificial Intelligence Fall 2007 Lecture #14

ECE457 Applied Artificial Intelligence R. Khoury (2007) Page 30

Lecture 7: First-Order Logic

Given the following KB: Person(Marcus) Pompeian(Marcus) ¬Pompeian(x1) Roman(x1) ¬Roman(x2) Loyal(x2,Caesar) Hate(x2, Caesar) ¬Person(x3) ¬Ruler (x4) ¬Assasinate(x3, x4) ¬Loyal(x3,x4)

Does Marcus hate Caesar, using resolution

Ruler(Caesar) Assasinate(Marcus, Caesar)

Page 31: Review ECE457 Applied Artificial Intelligence Fall 2007 Lecture #14

ECE457 Applied Artificial Intelligence R. Khoury (2007) Page 31

Summary of Course Lecture 8: Uncertainty

Marginalization Bayes’ Theorem Chain rule Independence and conditional

independence Naïve Bayes Classifier

Page 32: Review ECE457 Applied Artificial Intelligence Fall 2007 Lecture #14

ECE457 Applied Artificial Intelligence R. Khoury (2007) Page 32

Lecture 8: Uncertainty You tested positive for a disease. The test’s

results are accurate 99% of the time. However, the disease only strikes 1 out of 10000 people. What’s the probability that you have the disease?

Page 33: Review ECE457 Applied Artificial Intelligence Fall 2007 Lecture #14

ECE457 Applied Artificial Intelligence R. Khoury (2007) Page 33

Given the following police data, create a Naïve Bayes Classifier for stolen cars, and compute the probability that a domestic red SUV is stolen.

Lecture 8: UncertaintyC T O S

Red Sports

Domestic

Stolen

Red Sports

Domestic

Not

Red Sports

Domestic

Stolen

Yellow

Sports

Domestic

Not

Yellow

Sports

Imported

Stolen

Yellow

SUV Imported

Not

Yellow

SUV Imported

Stolen

Yellow

SUV Domestic

Not

Red SUV Imported

Not

Red Sports

Imported

Stolen

Page 34: Review ECE457 Applied Artificial Intelligence Fall 2007 Lecture #14

ECE457 Applied Artificial Intelligence R. Khoury (2007) Page 34

Summary of Course Lecture 9: Probabilistic Reasoning

Bayesian Network Connections and D-Separation Inference

Page 35: Review ECE457 Applied Artificial Intelligence Fall 2007 Lecture #14

ECE457 Applied Artificial Intelligence R. Khoury (2007) Page 35

Lecture 9: Probabilistic Reasoning

Consider this Bayesian network. Write the factored expression for

the joint probability distribution P(A, B, C, D, E, F) which is represented by this network.

Which variables are independent (d-separate) of C if: B is known. A is known. D and E are both know.

A B

C

E

D

F

Page 36: Review ECE457 Applied Artificial Intelligence Fall 2007 Lecture #14

ECE457 Applied Artificial Intelligence R. Khoury (2007) Page 36

Lecture 9: Probabilistic Reasoning

Given the following values, what is the posterior probability of F given that B is true? P(D|B) = 0.8

P(D|B) = 0.4P(F|D) = 0.75P(F|D) = 0.6

A B

C

E

D

F

Page 37: Review ECE457 Applied Artificial Intelligence Fall 2007 Lecture #14

ECE457 Applied Artificial Intelligence R. Khoury (2007) Page 37

Summary of Course Lecture 10: Decision Making

Maximum Expected Utility Utility Expected utility

Decision network Optimal policy

Computing the optimal policy Value of information

Page 38: Review ECE457 Applied Artificial Intelligence Fall 2007 Lecture #14

ECE457 Applied Artificial Intelligence R. Khoury (2007) Page 38

Lecture 10: Decision Making

Wear Protection

(Pr)

Which Way (W)

Accident (A)

U

Pr

W A U

T S T 0.4

T S F 0.7

T L T 0.3

T L F 0.6

F S T 0.1

F S F 1

F L T 0

F L F 0.9

W P(A)

S 0.6

L 0.3

Page 39: Review ECE457 Applied Artificial Intelligence Fall 2007 Lecture #14

ECE457 Applied Artificial Intelligence R. Khoury (2007) Page 39

Lecture 10: Decision Making

P(L) = 0.5

Lemon

Inspect

U

BuyReport

l b i U

F F F -300

T F F -300

F T F 1000

T T F -600

F F T -350

T F T -350

F T T 950

T T T -650

l i P(G)

P(¬G)

P(N)

F F 0 0 1

T F 0 0 1

F T 0.9 0.1 0

T T 0.2 0.8 0

Utility cost of inspection = -50

Page 43

Page 40: Review ECE457 Applied Artificial Intelligence Fall 2007 Lecture #14

ECE457 Applied Artificial Intelligence R. Khoury (2007) Page 40

Summary of Course Lecture 11: Introduction to Learning

For all learning algorithms Training data Objective of learning Evaluation General algorithm

Precision and recall Overfitting and n-fold cross-validation K-Means Q-Learning Exploration function

Page 55

Page 41: Review ECE457 Applied Artificial Intelligence Fall 2007 Lecture #14

ECE457 Applied Artificial Intelligence R. Khoury (2007) Page 41

Summary of Course Lecture 12: Introduction to Soft

Computing Artificial neural networks

Artificial neuron Perceptron network

Fuzzy logic Fuzzy sets, fuzzy membership functions,

membership degree Fuzzy rules

Genetic algorithms Individuals Operators: crossover, mutation, selection Search algorithm

Page 56

Page 42: Review ECE457 Applied Artificial Intelligence Fall 2007 Lecture #14

ECE457 Applied Artificial Intelligence R. Khoury (2007) Page 42

Summary of Course Lecture 13: Introduction to

Ontologies Objects, Categories, Relations,

Attributes Inheritance

Problems

Page 57