leibniz reduction in german population 15–30% in some...

Post on 25-Aug-2020

3 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

The 30 Years War (1618–1648)

Leibniz

Logic in Practice

ILP

Logics of Action

Wheeler Ruml (UNH) Lecture 14, CS 730 – 1 / 25

■ reduction in German population 15–30%■ in some terrirories 3/4 of the population died■ male population reduced by almost half■ population of Czech lands reduced by 1/3

Gottfried Wilhelm Leibniz (1646-1716)

Leibniz

Logic in Practice

ILP

Logics of Action

Wheeler Ruml (UNH) Lecture 14, CS 730 – 2 / 25

Leibniz’s dream:

”a general method in which all truths of thereason would be reduced to a kind of cal-culation. At the same time this would bea sort of universal language or script, but in-finitely different from all those projected hith-erto; for the symbols and even the words in itwould direct reason; and errors, except thoseof fact, would be mere mistakes in calcula-tion.”

If controversies were to arise, ”there would be no more need ofdisputation between two philosophers than between twoaccountants. For it would suffice to take their pencils in theirhands, and say to each other: Let us calculate.”Dissertio de Arte Combinatoria, 1666

CS 730/830: Intro AI

Leibniz

Logic in Practice

ILP

Logics of Action

Wheeler Ruml (UNH) Lecture 14, CS 730 – 3 / 25

Logic in Practice

Leibniz

Logic in Practice

■ Natural Deduction

■ Inference Rules

■ Horn Clauses

■ Semantic Nets

■ Description Logic

■ Example DL

■ Break

ILP

Logics of Action

Wheeler Ruml (UNH) Lecture 14, CS 730 – 4 / 25

Natural Deduction

Leibniz

Logic in Practice

■ Natural Deduction

■ Inference Rules

■ Horn Clauses

■ Semantic Nets

■ Description Logic

■ Example DL

■ Break

ILP

Logics of Action

Wheeler Ruml (UNH) Lecture 14, CS 730 – 5 / 25

1. given ∃, can introduce new constant2. given sentence with ground expresion, can introduce ∃3. given ∀, can introduce new constant4. given sentence, can introduce ∀ over new free variable

∧ elimination/introduction:∨ introduction:¬¬ elimination:

Inference Rules

Leibniz

Logic in Practice

■ Natural Deduction

■ Inference Rules

■ Horn Clauses

■ Semantic Nets

■ Description Logic

■ Example DL

■ Break

ILP

Logics of Action

Wheeler Ruml (UNH) Lecture 14, CS 730 – 6 / 25

Modus Ponens:

Resolution:

Abduction:

Induction:

mathematical induction 6= inductive reasoning

Alfred Horn (1951)

Leibniz

Logic in Practice

■ Natural Deduction

■ Inference Rules

■ Horn Clauses

■ Semantic Nets

■ Description Logic

■ Example DL

■ Break

ILP

Logics of Action

Wheeler Ruml (UNH) Lecture 14, CS 730 – 7 / 25

x ∧ y → z

Alfred Horn (1951)

Leibniz

Logic in Practice

■ Natural Deduction

■ Inference Rules

■ Horn Clauses

■ Semantic Nets

■ Description Logic

■ Example DL

■ Break

ILP

Logics of Action

Wheeler Ruml (UNH) Lecture 14, CS 730 – 7 / 25

x ∧ y → z ≡ ¬x ∨ ¬y ∨ z

at most one positive literal (eaxctly one = ‘definite clause’)Cat(x) :- Furry(x), Meows(x).

Cat(y) :- Feline(y).

Furry(A).

Meows(A).

? Cat(z).

Still semi-decidable in first-order case.

Propositional: Unit resolution (Modus Ponens) is sound andcomplete in linear time for Horn theories: ‘forward chaining’.Each rule ‘fires’ at most once, each variable ‘processed’ at mostonce

‘expert systems’

Semantic Networks

Leibniz

Logic in Practice

■ Natural Deduction

■ Inference Rules

■ Horn Clauses

■ Semantic Nets

■ Description Logic

■ Example DL

■ Break

ILP

Logics of Action

Wheeler Ruml (UNH) Lecture 14, CS 730 – 8 / 25

Mammals

JohnMary

Persons

MalePersons

FemalePersons

1

2

SubsetOf

SubsetOfSubsetOf

MemberOf MemberOf

SisterOf Legs

LegsHasMother

Semantic Networks

Leibniz

Logic in Practice

■ Natural Deduction

■ Inference Rules

■ Horn Clauses

■ Semantic Nets

■ Description Logic

■ Example DL

■ Break

ILP

Logics of Action

Wheeler Ruml (UNH) Lecture 14, CS 730 – 9 / 25

Multiple aspects:

■ A visual notation■ A restricted logic■ A set of implementation tricks

Typically:

■ Efficient indexing■ Precomputation■ Methods for defaults or typicality

Aka: frames, inheritence networks, semantic graphs, descriptionlogics, terminological logics, ontologies

Description Logic

Leibniz

Logic in Practice

■ Natural Deduction

■ Inference Rules

■ Horn Clauses

■ Semantic Nets

■ Description Logic

■ Example DL

■ Break

ILP

Logics of Action

Wheeler Ruml (UNH) Lecture 14, CS 730 – 10 / 25

computing categories and membershipincluding:

1. subsumption2. classification3. inheritance

missing:

1. negation2. disjunction3. nested functions4. existentials5. intractability

Example DL

Leibniz

Logic in Practice

■ Natural Deduction

■ Inference Rules

■ Horn Clauses

■ Semantic Nets

■ Description Logic

■ Example DL

■ Break

ILP

Logics of Action

Wheeler Ruml (UNH) Lecture 14, CS 730 – 11 / 25

1. concepts (primitive and derived), instances2. roles (definitional) and properties (assertional)3. subsumption: subsumes (x, y) iff

(a) x is a concept, and(b) same primitive concept ancestor, and(c) for each role of x with restriction rx

i. y has same role with restriction ry, andii. rx subsumes ry

Break

Leibniz

Logic in Practice

■ Natural Deduction

■ Inference Rules

■ Horn Clauses

■ Semantic Nets

■ Description Logic

■ Example DL

■ Break

ILP

Logics of Action

Wheeler Ruml (UNH) Lecture 14, CS 730 – 12 / 25

■ assts 6, 7■ asst 8■ preliminary proposals due next class

Inductive Logic Programming

Leibniz

Logic in Practice

ILP

■ Learning

■ ILP

■ Input

■ FOIL

■ Example

■ Specializing

■ ILP Applications

Logics of Action

Wheeler Ruml (UNH) Lecture 14, CS 730 – 13 / 25

Learning

Leibniz

Logic in Practice

ILP

■ Learning

■ ILP

■ Input

■ FOIL

■ Example

■ Specializing

■ ILP Applications

Logics of Action

Wheeler Ruml (UNH) Lecture 14, CS 730 – 14 / 25

Three types:

Supervised: classification (= prediction of class)Unsupervised: compression (= prediction of actual value)Reinforcement: sequence of decisions with occasional reward

Each can be on-line (incremental) or off-line (batch).

Terminology:

1. Hypothesis space2. Training data (vs test data, for off-line case)3. Performance metric (often on validation data)

Inductive Logic Programming

Leibniz

Logic in Practice

ILP

■ Learning

■ ILP

■ Input

■ FOIL

■ Example

■ Specializing

■ ILP Applications

Logics of Action

Wheeler Ruml (UNH) Lecture 14, CS 730 – 15 / 25

Given: ground facts and background definitionsFind: short (almost Horn) clauses that cover positive examplesand not negative ones

Background ∧ Hypothesis ∧Descriptions |= Classifications

Input

Leibniz

Logic in Practice

ILP

■ Learning

■ ILP

■ Input

■ FOIL

■ Example

■ Specializing

■ ILP Applications

Logics of Action

Wheeler Ruml (UNH) Lecture 14, CS 730 – 16 / 25

Descriptions:Father(Philip, Charles) Father(Philip, Anne)Mother(Mum, Margaret) Mother(Mum, Elizabeth)Married(Diana, Charles) Married(Elizabeth, Philip)Male(Philip) Male(Charles)Female(Beatrice) Female(Margaret)

Classifications:Grandparent(Mum, Charles) Grandparent(Elizabeth, Beatrice)¬Grandparent(Mum,Harry) ¬Grandparent(Spencer,Peter)

Background: Parent(x,y) ↔ Mother(x,y) ∨ Father(x,y)

Target: Grandparent(x,y) ↔ ∃ z Parent(x,z) ∧ Parent(z,y)

FOIL

Leibniz

Logic in Practice

ILP

■ Learning

■ ILP

■ Input

■ FOIL

■ Example

■ Specializing

■ ILP Applications

Logics of Action

Wheeler Ruml (UNH) Lecture 14, CS 730 – 17 / 25

Given: ground facts and background definitionsFind: short (almost Horn) clauses that cover positive examplesand not negative ones

Sequential covering (‘FOIL’)rules ← { }Until no remaining positives (or good enough):

new ← empty ruleWhile false positives (eg, covers any negatives):

Add best single literal preconditionAdd new to rulesRemove positive examples covered by new

Example

Leibniz

Logic in Practice

ILP

■ Learning

■ ILP

■ Input

■ FOIL

■ Example

■ Specializing

■ ILP Applications

Logics of Action

Wheeler Ruml (UNH) Lecture 14, CS 730 – 18 / 25

→ Grandfather(x,y)

Example

Leibniz

Logic in Practice

ILP

■ Learning

■ ILP

■ Input

■ FOIL

■ Example

■ Specializing

■ ILP Applications

Logics of Action

Wheeler Ruml (UNH) Lecture 14, CS 730 – 18 / 25

→ Grandfather(x,y)

Father(x,y) → Grandfather(x,y) (always wrong)Parent(x,y) → Grandfather(x,y) (many false +)Father(x,z) → Grandfather(x,y) (selected)

Example

Leibniz

Logic in Practice

ILP

■ Learning

■ ILP

■ Input

■ FOIL

■ Example

■ Specializing

■ ILP Applications

Logics of Action

Wheeler Ruml (UNH) Lecture 14, CS 730 – 18 / 25

→ Grandfather(x,y)

Father(x,y) → Grandfather(x,y) (always wrong)Parent(x,y) → Grandfather(x,y) (many false +)Father(x,z) → Grandfather(x,y) (selected)

Father(x,z) ∧ Parent(z,y) → Grandfather(x,y) (target)

Specializing

Leibniz

Logic in Practice

ILP

■ Learning

■ ILP

■ Input

■ FOIL

■ Example

■ Specializing

■ ILP Applications

Logics of Action

Wheeler Ruml (UNH) Lecture 14, CS 730 – 19 / 25

New literals:

1. Any predicate over any variables, where at least one of thevariables is in previous literal or head

2. Equal(x, y), where x and y are already in rule3. Negation of any of the above

Best: maximizes ‘information gain’

Clause must be shorter than positives it explains (cf Ockham’srazor).

ILP Applications

Leibniz

Logic in Practice

ILP

■ Learning

■ ILP

■ Input

■ FOIL

■ Example

■ Specializing

■ ILP Applications

Logics of Action

Wheeler Ruml (UNH) Lecture 14, CS 730 – 20 / 25

1. Mutagenesis2. Toxicity3. Rules of chess4. Protein structure5. Parsers

Logics of Action

Leibniz

Logic in Practice

ILP

Logics of Action

■ Event Calculus

■ Situation Calculus

■ Problems

■ EOLQs

Wheeler Ruml (UNH) Lecture 14, CS 730 – 21 / 25

Event Calculus

Leibniz

Logic in Practice

ILP

Logics of Action

■ Event Calculus

■ Situation Calculus

■ Problems

■ EOLQs

Wheeler Ruml (UNH) Lecture 14, CS 730 – 22 / 25

Events and fluents are reified:

Member(E23,Flyings)∧Agent(E23, John)∧Happens(E23, I7) . . .

T (At(John,KN133 ), t1)∧Terminates(E23,At(John,KN133 ), t2) . .

Situation Calculus

Leibniz

Logic in Practice

ILP

Logics of Action

■ Event Calculus

■ Situation Calculus

■ Problems

■ EOLQs

Wheeler Ruml (UNH) Lecture 14, CS 730 – 23 / 25

World state (= situation) is reified:

Result(GoForward, s0) = s1

Result(Turn(right), s1) = s2

∀s, a, bClear(a, s)∧Clear(b, s)→ On(a, b,Result(PutOn(a, b), s))

Problems with Logic

Leibniz

Logic in Practice

ILP

Logics of Action

■ Event Calculus

■ Situation Calculus

■ Problems

■ EOLQs

Wheeler Ruml (UNH) Lecture 14, CS 730 – 24 / 25

Defaults: hard to have coherent semantics and efficientinference (default logics, answer set programming, probabilisticlogic)

Ramification problem: choosing what to infer (specializedsystems)

Retraction: when previous truth becomes false (truthmaintenance systems)

Qualification problem: making rules correct (probabilisticlogic)

EOLQs

Leibniz

Logic in Practice

ILP

Logics of Action

■ Event Calculus

■ Situation Calculus

■ Problems

■ EOLQs

Wheeler Ruml (UNH) Lecture 14, CS 730 – 25 / 25

■ What question didn’t you get to ask today?■ What’s still confusing?■ What would you like to hear more about?

Please write down your most pressing question about AI and putit in the box on your way out.Thanks!

top related