artificial intelligencetralvex.com/pub/edu/ai/zip/ai-99a06.pdf · backgammon, go & chess...

24
Artificial Intelligence Knowledge Representation I Lecture 6 (15 September, 1999) Tralvex (Rex) Yeap University of Leeds

Upload: others

Post on 20-Mar-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Artificial Intelligencetralvex.com/pub/edu/ai/zip/ai-99a06.pdf · Backgammon, Go & Chess Students’ Mini Research Presentation by Group B Class Activity 2: Real-world Paper Reading

Artificial IntelligenceKnowledge Representation I

Lecture 6(15 September, 1999)Tralvex (Rex) YeapUniversity of Leeds

Page 2: Artificial Intelligencetralvex.com/pub/edu/ai/zip/ai-99a06.pdf · Backgammon, Go & Chess Students’ Mini Research Presentation by Group B Class Activity 2: Real-world Paper Reading

2

Content: Knowledge Representation I

Issues in Knowledge Representation

Why logic in knowledge representation?

Logical Symbols and Quantifiers

How to use logical notation for representing knowledge

A Set-Theoritical definition of LPC

Class Activity 1: Workouts on LPC

Ways of reasoning in LPC

Natural Deduction Semantic Tableau Truth Tables Relationships between (1)

Natural Deduction, (2) Semantic Tableau, and (3) Truth Table (Model Theory) Methods

What’s in Store for Lecture 7

Page 3: Artificial Intelligencetralvex.com/pub/edu/ai/zip/ai-99a06.pdf · Backgammon, Go & Chess Students’ Mini Research Presentation by Group B Class Activity 2: Real-world Paper Reading

3

Quick Review on Lecture 5

Class Activity 1: A* Search Workout for Romania Map

Why Study Games?

Game Playing as Search

Special Characteristics of Game Playing Search

Ingredients of 2-Person Games

Normal and Game Search Problem

A Game Tree for Naughts and Crosses

A Perfect Decision Strategy Based on Minimaxing

The Need for Imperfect Decision

Assigning Utilities: Evaluation Functions

When to Cut Search

Chess Positions Alpha - Beta Pruning State of the Art in Checkers,

Backgammon, Go & Chess Students’ Mini Research Presentation

by Group B Class Activity 2: Real-world Paper

Reading & Practical - “The end of an era, the begin-ning of another? HAL, Deep Blue and Kasparov”

Class Activity 3: Video on Deep Blue vs Kasparov (May, 1997) Game #6.

Class Activity 4: Real-world Paper Reading & Practical - “Smart Moves -Intelligent Pathfinding”

Page 4: Artificial Intelligencetralvex.com/pub/edu/ai/zip/ai-99a06.pdf · Backgammon, Go & Chess Students’ Mini Research Presentation by Group B Class Activity 2: Real-world Paper Reading

4

Issues in Knowledge Representation

1. How to represent knowledge2. How to manipulate/process knowledge

(2) Can be rephrased as: how to make decisionsbased on some knowledge.

Page 5: Artificial Intelligencetralvex.com/pub/edu/ai/zip/ai-99a06.pdf · Backgammon, Go & Chess Students’ Mini Research Presentation by Group B Class Activity 2: Real-world Paper Reading

5

Why logic in knowledge representation?

Logical notation can be used to express info/knowledge.

Logical notation is useful in reasoning aboutknowledge.

Page 6: Artificial Intelligencetralvex.com/pub/edu/ai/zip/ai-99a06.pdf · Backgammon, Go & Chess Students’ Mini Research Presentation by Group B Class Activity 2: Real-world Paper Reading

6

Why logic in knowledge representation?1. Logical notation for expressing info/knowledge

AltaVista search: Mary AND lamb the output is:

{p WebPages|contain(p,Mary) & contain(p,lamb)}= {p WebPages|contain(p,Mary))}

{p WebPages|contain(p,lamp)}

Page 7: Artificial Intelligencetralvex.com/pub/edu/ai/zip/ai-99a06.pdf · Backgammon, Go & Chess Students’ Mini Research Presentation by Group B Class Activity 2: Real-world Paper Reading

7

Why logic in knowledge representation?2. Logical notation is useful in reasoning (about knowledge.

eg1. John is a human if John is a human then John is mortaltherefore John is mortal.

in logic: P P P Q P Q P P Q therefore Q QQ.

Page 8: Artificial Intelligencetralvex.com/pub/edu/ai/zip/ai-99a06.pdf · Backgammon, Go & Chess Students’ Mini Research Presentation by Group B Class Activity 2: Real-world Paper Reading

8

Why logic in knowledge representation? 2. Logical notation is useful in reasoning (about knowledge)

eg1. John is a humanevery human are mortals therefore John is mortal.

In logic:human(John)h(human(h) mortal(h))therefore: human(John) mortal(John) by elim. rule

therefore: mortal(John) by elim. rule

Page 9: Artificial Intelligencetralvex.com/pub/edu/ai/zip/ai-99a06.pdf · Backgammon, Go & Chess Students’ Mini Research Presentation by Group B Class Activity 2: Real-world Paper Reading

9

Logical Symbols and Quantifiers

Logical Symbols~ NOT AND OR IMPLIES

Quantifers FOR ALL THERE EXISTS

Page 10: Artificial Intelligencetralvex.com/pub/edu/ai/zip/ai-99a06.pdf · Backgammon, Go & Chess Students’ Mini Research Presentation by Group B Class Activity 2: Real-world Paper Reading

10

Objective of this lecture

Learn about logical symbols (and their formal meaning).

Learn about the rules in using the symbols.

Learn about expressing real life problems in terms oflogical symbols.

and probably more.

Page 11: Artificial Intelligencetralvex.com/pub/edu/ai/zip/ai-99a06.pdf · Backgammon, Go & Chess Students’ Mini Research Presentation by Group B Class Activity 2: Real-world Paper Reading

11

How to use logical notation for representing knowledge

A particular logic, called: Propositional Calculus.

Studying a logic --- studying a language

Defn: A language of PC, call it LPC is defined by the following rules:1. Variables p, q, r,p2 ,q2 ,r2, ... are in LPC. We call the above

variables: undeterminate statements. 2. If a statement A is in LPC and a statement B is in LPC , then

the statement (A&B) is in LPC .Similarly for the symbols: , .3. If a statement A is in LPC, then the statement ~A is in LPC .

Note: LPC is a set. It is a set of statements which can be generated from the above rules.

Page 12: Artificial Intelligencetralvex.com/pub/edu/ai/zip/ai-99a06.pdf · Backgammon, Go & Chess Students’ Mini Research Presentation by Group B Class Activity 2: Real-world Paper Reading

12

A Set-Theoritical definition of LPC

Mathematically, we define LPC as follows:

Rule 1: p, q, r,p2 ,q2 ,r2, ... LPC

Rule 2: If ALPC and BLPC, then (A&B)LPC.Similarly for the symbols: , .

Rule 3: If ALPC, then the statement ~ALPC .

Page 13: Artificial Intelligencetralvex.com/pub/edu/ai/zip/ai-99a06.pdf · Backgammon, Go & Chess Students’ Mini Research Presentation by Group B Class Activity 2: Real-world Paper Reading

13

Class Activity 1: Workouts on LPC

Proof whether or not the following are in LPC,

1. (A ~B)

2. (A B ~)

3. (A~B)

4. (~AB)

5. (((AB)&(AB)B)

Page 14: Artificial Intelligencetralvex.com/pub/edu/ai/zip/ai-99a06.pdf · Backgammon, Go & Chess Students’ Mini Research Presentation by Group B Class Activity 2: Real-world Paper Reading

14

Ways of reasoning in LPC

1. Natural deduction

2. Semantic tableau

3. Truth table (model theory)

Page 15: Artificial Intelligencetralvex.com/pub/edu/ai/zip/ai-99a06.pdf · Backgammon, Go & Chess Students’ Mini Research Presentation by Group B Class Activity 2: Real-world Paper Reading

15

Ways of reasoning in LPC(1) Natural Deduction

Elimination Rules Introduction Rules

A BA

A BB

A A B

[A] [B] : : A B C C C

A A B

B A B

A B AB

[A]:

B .A B

A A: :: :

C ~C

.

A

A::

.

~A

A::

~A .

contradition

Page 16: Artificial Intelligencetralvex.com/pub/edu/ai/zip/ai-99a06.pdf · Backgammon, Go & Chess Students’ Mini Research Presentation by Group B Class Activity 2: Real-world Paper Reading

16

Class Activity 2: Workouts on Natural Deduction

Resolve the following using Natural Deduction:

1. AB AB

2. ((AB) AB B

3. A ~A

4. ((AB) A) A

5. A ~~A

6. ~~A A

Page 17: Artificial Intelligencetralvex.com/pub/edu/ai/zip/ai-99a06.pdf · Backgammon, Go & Chess Students’ Mini Research Presentation by Group B Class Activity 2: Real-world Paper Reading

17

Ways of reasoning in LPC(2) Semantic Tableau

Idea: Similar to Natural Deduction

Based on Proof by Contradiction~A

:: .

A

Page 18: Artificial Intelligencetralvex.com/pub/edu/ai/zip/ai-99a06.pdf · Backgammon, Go & Chess Students’ Mini Research Presentation by Group B Class Activity 2: Real-world Paper Reading

18

Rules in Semantic Tableau

A B|

A|B

A B|

-------------| |A B

A B ~A B

~(A B) ~A

~(A B) ~A

A B ~A B

|-------------| |~A B

~(A B) ~A

|-------------| |

~A ~B

~(A B) ~A

A Closed Branch A / B / / ~B

Page 19: Artificial Intelligencetralvex.com/pub/edu/ai/zip/ai-99a06.pdf · Backgammon, Go & Chess Students’ Mini Research Presentation by Group B Class Activity 2: Real-world Paper Reading

19

Rules in Semantic TableauMethod

Given Assumption: A1, A2, …,An , want to Deduce: B

1. Start from A1: Create tree by applying the rules2. Mark any closed Branch3. Repeat (1-2) for A2, …, An, ~B

The proof is completed when:* We have applied A1, …, An, ~B* All the branches are closed

Page 20: Artificial Intelligencetralvex.com/pub/edu/ai/zip/ai-99a06.pdf · Backgammon, Go & Chess Students’ Mini Research Presentation by Group B Class Activity 2: Real-world Paper Reading

20

Semantic Tableau MethodAn Example

Class workout: To show that ((AB) A) A is true.

Page 21: Artificial Intelligencetralvex.com/pub/edu/ai/zip/ai-99a06.pdf · Backgammon, Go & Chess Students’ Mini Research Presentation by Group B Class Activity 2: Real-world Paper Reading

21

Ways of reasoning in LPC(3) Truth Tables

A sentence A is valid means:1 occurs in all the rows ofA’s Truth Table

equivalently meansAll possible interpretationof the sentence A gives out 1.

An interpretation:A function from ‘undeterminatevariables’ to {0, 1}eg. { p 0,

q 0,r 1}

Given an interpretation I and a sentence S, how do we interpret S with respect to I? Ans:

Page 22: Artificial Intelligencetralvex.com/pub/edu/ai/zip/ai-99a06.pdf · Backgammon, Go & Chess Students’ Mini Research Presentation by Group B Class Activity 2: Real-world Paper Reading

22

Relationships between (1) Natural Deduction, (2) Semantic Tableau, and (3) Truth Table (Model Theory) Methods

They have the same power,

ie.

S provable in Natural Deductioniff

S provable in Semantic Tableauiff

S is valid

sound

Provable Validcomplete

Page 23: Artificial Intelligencetralvex.com/pub/edu/ai/zip/ai-99a06.pdf · Backgammon, Go & Chess Students’ Mini Research Presentation by Group B Class Activity 2: Real-world Paper Reading

23

What’s in Store for Lecture 7

Knowledge Representation II

Page 24: Artificial Intelligencetralvex.com/pub/edu/ai/zip/ai-99a06.pdf · Backgammon, Go & Chess Students’ Mini Research Presentation by Group B Class Activity 2: Real-world Paper Reading

End of Lecture 6

Good Night.