Presentation is loading. Please wait.

Presentation is loading. Please wait.

EA C461 – Artificial Intelligence Logical Agent

Similar presentations


Presentation on theme: "EA C461 – Artificial Intelligence Logical Agent"— Presentation transcript:

1 EA C461 – Artificial Intelligence Logical Agent
S.P.Vimal

2 To discuss… Forward Chaining Backward Chaining DPLL Algorithm
WALKSAT Algorithm Vimal EA C461- Artificial Intelligence

3 Forward and backward chaining
Horn Form (restricted) KB = conjunction of Horn clauses Horn clause = proposition symbol; or (conjunction of symbols)  symbol E.g., (C  B  A)  (C  D  B) Definite clause Horn Clause with exactly one +ve literal Fact Horn Clause With no negative literal Integrity constraints Horn Clause With no positive literals Vimal EA C461- Artificial Intelligence

4 Forward and backward chaining
Modus Ponens (for Horn Form): complete for Horn KBs α1, … ,αn , α1  …  αn  β Β Can be used with forward chaining or backward chaining. These algorithms are very natural and run in linear time Vimal EA C461- Artificial Intelligence

5 Forward chaining Idea: fire any rule whose premises are satisfied in the KB, add its conclusion to the KB, until query is found Vimal EA C461- Artificial Intelligence

6 Forward chaining algorithm
Forward chaining is sound and complete for Horn KB Vimal EA C461- Artificial Intelligence

7 Forward chaining example
Vimal EA C461- Artificial Intelligence

8 Forward chaining example
Vimal EA C461- Artificial Intelligence

9 Forward chaining example
Vimal EA C461- Artificial Intelligence

10 Forward chaining example
Vimal EA C461- Artificial Intelligence

11 Forward chaining example
Vimal EA C461- Artificial Intelligence

12 Forward chaining example
Vimal EA C461- Artificial Intelligence

13 Forward chaining example
Vimal EA C461- Artificial Intelligence

14 Forward chaining example
Vimal EA C461- Artificial Intelligence

15 Forward chaining Every inference is essentially an application of modus ponens  sound, complete. Inferred table reaches a fixed point, from which no new inferences are possible. Data-driven reasoning Focus of attention starts from the known data Incremental forward chaining Vimal EA C461- Artificial Intelligence

16 Backward chaining Idea: work backwards from the query q:
to prove q by BC, check if q is known already, or prove by BC all premises of some rule concluding q Vimal EA C461- Artificial Intelligence

17 Backward chaining example
Vimal EA C461- Artificial Intelligence

18 Backward chaining example
Vimal EA C461- Artificial Intelligence

19 Backward chaining example
Vimal EA C461- Artificial Intelligence

20 Backward chaining example
Vimal EA C461- Artificial Intelligence

21 Backward chaining example
Vimal EA C461- Artificial Intelligence

22 Backward chaining example
Vimal EA C461- Artificial Intelligence

23 Backward chaining example
Vimal EA C461- Artificial Intelligence

24 Backward chaining example
Vimal EA C461- Artificial Intelligence

25 Backward chaining example
Vimal EA C461- Artificial Intelligence

26 Backward chaining example
Vimal EA C461- Artificial Intelligence

27 Efficient propositional inference
Two families of efficient algorithms for propositional inference: Complete backtracking search algorithms DPLL algorithm (Davis, Putnam, Logemann, Loveland) Incomplete local search algorithms WalkSAT algorithm Vimal EA C461- Artificial Intelligence

28 Recall that… Satisfiability is connected to inference via the following: KB ╞ α if and only if (KB α) is unsatisfiable We will learn two class of propositional inference algorithms on model checking based on Back tracking search Local search These algorithm checks for satisfiablity of a sentence Vimal EA C461- Artificial Intelligence

29 DPLL algorithm Determine if an input propositional logic sentence (in CNF) is satisfiable. Improvements over truth table enumeration: Early termination A clause is true if any literal is true. A sentence is false if any clause is false. Pure symbol heuristic Pure symbol: always appears with the same "sign" in all clauses. e.g., In the three clauses (A  B), (B  C), (C  A), A and B are pure, C is impure. Make a pure symbol literal true. Unit clause heuristic Unit clause: only one literal in the clause The only literal in a unit clause must be true. Vimal EA C461- Artificial Intelligence

30 DPLL algorithm Vimal EA C461- Artificial Intelligence

31 WalkSAT algorithm Incomplete, local search algorithm
Evaluation function: The min-conflict heuristic of minimizing the number of unsatisfied clauses Balance between greediness and randomness Vimal EA C461- Artificial Intelligence

32 WalkSAT algorithm Vimal EA C461- Artificial Intelligence

33 WalkSAT algorithm More useful when we expect a solution to exist
Is the algorithm complete? Detecting unsatisfiablity is a problem … We need to determine unsatisfiablity to determine entailment  Vimal EA C461- Artificial Intelligence

34 Hard satisfiability problems
Consider random 3-CNF sentences. e.g., (D  B  C)  (B  A  C)  (C  B  E)  (E  D  B)  (B  E  C) m = number of clauses n = number of symbols Hard problems seem to cluster near m/n = 4.3 (critical point) Nearly satisfiable / nearly unsatisfiable Vimal EA C461- Artificial Intelligence

35 Hard satisfiability problems
Vimal EA C461- Artificial Intelligence

36 Hard satisfiability problems
Median runtime for 100 satisfiable random 3-CNF sentences, n = 50 Vimal EA C461- Artificial Intelligence

37 Hard satisfiablity problems
Problems near the critical point are difficult to solve comparing to the random instances DPLL is quite effective, averaging few thousands steps comparing to the 1015 for TTE. Of course, WALKSAT is even faster. Vimal EA C461- Artificial Intelligence

38 Summary Logical agents apply inference to a knowledge base to derive new information and make decisions Basic concepts of logic: syntax: formal structure of sentences semantics: truth of sentences wrt models entailment: necessary truth of one sentence given another inference: deriving sentences from other sentences soundness: derivations produce only entailed sentences completeness: derivations can produce all entailed sentences Wumpus world requires the ability to represent partial and negated information, reason by cases, etc. Resolution is complete for propositional logic Forward, backward chaining are linear-time, complete for Horn clauses Propositional logic lacks expressive power Vimal EA C461- Artificial Intelligence


Download ppt "EA C461 – Artificial Intelligence Logical Agent"

Similar presentations


Ads by Google