review - department of computer sciencephi/ai/slides-2017/lecture-review.pdflogic and knowledge...

26
Review Philipp Koehn 4 May 2017 Philipp Koehn Artificial Intelligence: Review 4 May 2017

Upload: others

Post on 20-Jun-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Review - Department of Computer Sciencephi/ai/slides-2017/lecture-review.pdfLogic and Knowledge Representation – Logical Agents – First Order Logic – Inference in First-Order

Review

Philipp Koehn

4 May 2017

Philipp Koehn Artificial Intelligence: Review 4 May 2017

Page 2: Review - Department of Computer Sciencephi/ai/slides-2017/lecture-review.pdfLogic and Knowledge Representation – Logical Agents – First Order Logic – Inference in First-Order

1Exam

● Date: Tuesday, May 18, 2pm–5pm

● Location: Hodson 213 (here)

● Format

– closed book– 2 pages of notes allowed

● Grading: homework is 60%, exam is 40%

Philipp Koehn Artificial Intelligence: Review 4 May 2017

Page 3: Review - Department of Computer Sciencephi/ai/slides-2017/lecture-review.pdfLogic and Knowledge Representation – Logical Agents – First Order Logic – Inference in First-Order

2Lectures Covered By Exam

● Artificial Intelligence in Context — not covered

● Intelligent Agents, Heuristic Search,and Game Playing– Intelligent Agents– Basic Search– Informed Search– Game Playing– Constraint Satisfaction

● Logic and Knowledge Representation– Logical Agents– First Order Logic– Inference in First-Order Logic– Knowledge Representation– Planning

● Uncertainty

– Probabilistic Reasoning– Bayesian Networks– Markov Decision Processes– Decision Theory

● Machine Learning

– Statistical Learning — not covered– Neural Networks — not covered– Reinforcement Learning

● Natural Language — not covered

Philipp Koehn Artificial Intelligence: Review 4 May 2017

Page 4: Review - Department of Computer Sciencephi/ai/slides-2017/lecture-review.pdfLogic and Knowledge Representation – Logical Agents – First Order Logic – Inference in First-Order

3

intelligent agents

Philipp Koehn Artificial Intelligence: Review 4 May 2017

Page 5: Review - Department of Computer Sciencephi/ai/slides-2017/lecture-review.pdfLogic and Knowledge Representation – Logical Agents – First Order Logic – Inference in First-Order

4Intelligent Agents

● Types of environments: (in)accessible, (non-)deterministic, (non)-episodic

● Types of agents: reflex, with memory, with goals, with learning, utility-based

Philipp Koehn Artificial Intelligence: Review 4 May 2017

Page 6: Review - Department of Computer Sciencephi/ai/slides-2017/lecture-review.pdfLogic and Knowledge Representation – Logical Agents – First Order Logic – Inference in First-Order

5Basic Search

● Problem solving agents

● Analysis

– completeness– time complexity– space complexity– optimality

● Basic search algorithms

– tree search– breadth / depth-first search– iterative deepening

Philipp Koehn Artificial Intelligence: Review 4 May 2017

Page 7: Review - Department of Computer Sciencephi/ai/slides-2017/lecture-review.pdfLogic and Knowledge Representation – Logical Agents – First Order Logic – Inference in First-Order

6Informed Search

● Best-first search

● A∗ search

● Heuristic algorithms

– hill-climbing– simulated annealing

Philipp Koehn Artificial Intelligence: Review 4 May 2017

Page 8: Review - Department of Computer Sciencephi/ai/slides-2017/lecture-review.pdfLogic and Knowledge Representation – Logical Agents – First Order Logic – Inference in First-Order

7Game Playing

● Types of games

– deterministic / probabilistic– (im)perfect information

● Search over game tree

– minimax algorithm– α-β pruning– evaluation functions

● Solvable games, but typically resource limits

● Probabilistic games: pruning with bounds

Philipp Koehn Artificial Intelligence: Review 4 May 2017

Page 9: Review - Department of Computer Sciencephi/ai/slides-2017/lecture-review.pdfLogic and Knowledge Representation – Logical Agents – First Order Logic – Inference in First-Order

8Constraint Satisfaction

● Variables, domains, constraints

● Backtracking search

● Constraint propagation

– forward checking– arc consistency

● Problems structure

● Iterative algorithms

Philipp Koehn Artificial Intelligence: Review 4 May 2017

Page 10: Review - Department of Computer Sciencephi/ai/slides-2017/lecture-review.pdfLogic and Knowledge Representation – Logical Agents – First Order Logic – Inference in First-Order

9

logic

Philipp Koehn Artificial Intelligence: Review 4 May 2017

Page 11: Review - Department of Computer Sciencephi/ai/slides-2017/lecture-review.pdfLogic and Knowledge Representation – Logical Agents – First Order Logic – Inference in First-Order

10Logical Agents

● Knowledge-based agents

– internal representations– incorporate new percepts– deduce hidden properties of the world

● Logic

– formal language (syntax)– truth in real world (semantics)– entailment and inference

● Algorithms

– forward chaining– backward chaining– resolution

Philipp Koehn Artificial Intelligence: Review 4 May 2017

Page 12: Review - Department of Computer Sciencephi/ai/slides-2017/lecture-review.pdfLogic and Knowledge Representation – Logical Agents – First Order Logic – Inference in First-Order

11First Order Logic

● Adding

– variables– relations– functions– quanitifiers

● Modeling natural language

● Dynamic world: states and fluents

● Situation calculus

Philipp Koehn Artificial Intelligence: Review 4 May 2017

Page 13: Review - Department of Computer Sciencephi/ai/slides-2017/lecture-review.pdfLogic and Knowledge Representation – Logical Agents – First Order Logic – Inference in First-Order

12Inference in First-Order Logic

● Reducing first-order inference to propositional inference

● Unification

● Generalized modus ponens

● Forward and backward chaining

● Logic programming (Prolog)

● Resolution

Philipp Koehn Artificial Intelligence: Review 4 May 2017

Page 14: Review - Department of Computer Sciencephi/ai/slides-2017/lecture-review.pdfLogic and Knowledge Representation – Logical Agents – First Order Logic – Inference in First-Order

13Knowledge Representation

● Representation systems

● Categories and objects→ ontologies

● Frames

● Events and scripts

● Practical examples

– Cyc– Semantic web

Philipp Koehn Artificial Intelligence: Review 4 May 2017

Page 15: Review - Department of Computer Sciencephi/ai/slides-2017/lecture-review.pdfLogic and Knowledge Representation – Logical Agents – First Order Logic – Inference in First-Order

14Planning

● Search vs. planning

● STRIPS operators

● Partial-order planning

● The real world

– incomplete information– incorrect information– quantification problem

● Conditional planning

● Monitoring and replanning

Philipp Koehn Artificial Intelligence: Review 4 May 2017

Page 16: Review - Department of Computer Sciencephi/ai/slides-2017/lecture-review.pdfLogic and Knowledge Representation – Logical Agents – First Order Logic – Inference in First-Order

15

uncertainty

Philipp Koehn Artificial Intelligence: Review 4 May 2017

Page 17: Review - Department of Computer Sciencephi/ai/slides-2017/lecture-review.pdfLogic and Knowledge Representation – Logical Agents – First Order Logic – Inference in First-Order

16Probabilistic Reasoning

● Uncertainty

● Probability

– conditional probability– independence– Bayes rule

● Inference

● Independence and Bayes’ Rule

Philipp Koehn Artificial Intelligence: Review 4 May 2017

Page 18: Review - Department of Computer Sciencephi/ai/slides-2017/lecture-review.pdfLogic and Knowledge Representation – Logical Agents – First Order Logic – Inference in First-Order

17Bayesian Networks

● Bayesian Networks

● Parameterized distributions

● Exact inference

– inference by enumeration– variable elimination

● Approximate inference

– rejection sampling– likelihood weighting– Markov chain Monte Carlo

Philipp Koehn Artificial Intelligence: Review 4 May 2017

Page 19: Review - Department of Computer Sciencephi/ai/slides-2017/lecture-review.pdfLogic and Knowledge Representation – Logical Agents – First Order Logic – Inference in First-Order

18Markov Decision Processes

● Temporal processes

● Hidden Markov models

● Inference

– filtering– smoothing– best sequence

● Kalman filters

● Dynamic Bayesian nets

● Example: speech recognition

Philipp Koehn Artificial Intelligence: Review 4 May 2017

Page 20: Review - Department of Computer Sciencephi/ai/slides-2017/lecture-review.pdfLogic and Knowledge Representation – Logical Agents – First Order Logic – Inference in First-Order

19Decision Theory

● Rational preferences

● Utilities

● Decision networks

● Value of information

● Markov decision processes

● Inference algorithms

– value iteration– policy iteration

● Partially observable Markov decision processes (POMDP)

Philipp Koehn Artificial Intelligence: Review 4 May 2017

Page 21: Review - Department of Computer Sciencephi/ai/slides-2017/lecture-review.pdfLogic and Knowledge Representation – Logical Agents – First Order Logic – Inference in First-Order

20Reinforcement Learning

● Rewards, often delayed

● Passive reinforcement learning(compute utility of policy)– adaptive dynamic programming– temporal difference learning

● Active Reinforcement Learning– greedy agent– extended adaptive dynamic programming– Q-learning

● Generalizations over the state space

● Policy search

Philipp Koehn Artificial Intelligence: Review 4 May 2017

Page 22: Review - Department of Computer Sciencephi/ai/slides-2017/lecture-review.pdfLogic and Knowledge Representation – Logical Agents – First Order Logic – Inference in First-Order

21

exam questions

Philipp Koehn Artificial Intelligence: Review 4 May 2017

Page 23: Review - Department of Computer Sciencephi/ai/slides-2017/lecture-review.pdfLogic and Knowledge Representation – Logical Agents – First Order Logic – Inference in First-Order

22Sample Exam

● Exam will assess

– understanding of core concepts

– understanding of algorithms→ ability to carry them out by hand

● Exam will be similar to last years (posted on web site)

Philipp Koehn Artificial Intelligence: Review 4 May 2017

Page 24: Review - Department of Computer Sciencephi/ai/slides-2017/lecture-review.pdfLogic and Knowledge Representation – Logical Agents – First Order Logic – Inference in First-Order

23Sample Question

Logical knowledge representation

Which of the following are semantically and syntactically correct translations of”Everyone’s zipcode within a state has the same first digit”?

1. ∀ x, s, z1 [State(s) ∧ LivesIn(x, s) ∧ Zip(x) = z1]⇒[∀ y, z2 LivesIn(y, s) ∧ Zip(y) = z2⇒ Digit(1, z1) = Digit(1, z2)].

2. ∀ x, s [State(s) ∧ LivesIn(x, s) ∧ ∃ z1 Zip(x) = z1]⇒[∀ y, z2 LivesIn(y, s) ∧ Zip(y) = z2 ∧ Digit(1, z1) = Digit(1, z2)].

3. ∀ x, y, s State(s) ∧ LivesIn(x, s) ∧ LivesIn(y, s)⇒ Digit(1, Zip(x) =Zip(y)).

4. ∀ x, y, s State(s) ∧ LivesIn(x, s) ∧ LivesIn(y, s)⇒Digit(1, Zip(x)) = Digit(1, Zip(y)).

Philipp Koehn Artificial Intelligence: Review 4 May 2017

Page 25: Review - Department of Computer Sciencephi/ai/slides-2017/lecture-review.pdfLogic and Knowledge Representation – Logical Agents – First Order Logic – Inference in First-Order

24Sample Question

Game playing

Consider the game of 2 × 2 tictactoe.

1. Draw the full game tree down to depth 2. You need not show nodes that arerotations or reflections of siblings already shown.

2. Circle any node that would not be evaluated by alpha–beta during a left-to-rightexploration of your tree.

Philipp Koehn Artificial Intelligence: Review 4 May 2017

Page 26: Review - Department of Computer Sciencephi/ai/slides-2017/lecture-review.pdfLogic and Knowledge Representation – Logical Agents – First Order Logic – Inference in First-Order

25

questions?

Philipp Koehn Artificial Intelligence: Review 4 May 2017