1 / 28

CS621: Artificial Intelligence

CS621: Artificial Intelligence. Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 24– Circuit Verification with Predicate Calculus; Prolog start 23 rd September, 2010. Resolution Tree. Search in resolution. Heuristics for Resolution Search Goal Supported Strategy

zeno
Télécharger la présentation

CS621: Artificial Intelligence

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CS621: Artificial Intelligence Pushpak BhattacharyyaCSE Dept., IIT Bombay Lecture 24– Circuit Verification with Predicate Calculus; Prolog start 23rd September, 2010

  2. Resolution Tree

  3. Search in resolution • Heuristics for Resolution Search • Goal Supported Strategy • Always start with the negated goal • Set of support strategy • Always one of the resolvents is the most recently produced resolute

  4. Inferencing in Predicate Calculus • Forward chaining • Given P, , to infer Q • P, match L.H.S of • Assert Q from R.H.S • Backward chaining • Q, Match R.H.S of • assert P • Check if P exists • Resolution – Refutation • Negate goal • Convert all pieces of knowledge into clausal form (disjunction of literals) • See if contradiction indicated by null clause can be derived

  5. P • converted to Draw the resolution tree (actually an inverted tree). Every node is a clausal form and branches are intermediate inference steps.

  6. Resolution • Theoretical basis of Resolution • Resolution proves something and the answer to the question is a side effect

  7. Resolution (cont …) • Theoretical basis of Resolution • Using Semantic Tree Contradiction

  8. Terminology • Pair of clauses being resolved is called the Resolvents. The resulting clause is called the Resolute. • Choosing the correct pair of resolvents is a matter of search.

  9. Application of Predicate Calculus Systematic Inferencing Knowledge Representation Puzzles • -- Circuit Verification • - Robotics • - Intelligent DB

  10. Circuit Verification • Does the circuit meet the specs? • Are there faults? • are they locatable?

  11. Example : 2-bit full adder X1, X2: inputs; C1: prev. carry; C2: next carry; Y: output

  12. K-Map Y x2x1 00 01 10 11 c1 0 1

  13. K-Map (contd..) C2 x2x1 00 01 10 11 c1 0 1

  14. Circuit

  15. Verification • First task (most difficult) • Building blocks : predicates • Circuit observation : Assertion on terminals

  16. Predicates & Functions

  17. Alternate Full Adder Circuit

  18. Functions Predicates • connected(t1,t2): true, if terminal t1 and t2 are connected type(X) : takes values AND, OR NOT and XOR, where X is a gate. in(n, X) : the value of signal at the nth input of gate X. out(X) : output of gate X. signal(t) : state at terminal t = 1/0

  19. General Properties • Commutativity: ∀t1,t2 [connected(t1,t2) → connected(t2,t1)] • By definition of connection: ∀t1,t2 [connected(t1,t2) → { signal(t1) = signal(t1)}]

  20. Gate properties • OR definition: • AND definition:

  21. Gate properties contd… • XOR definition: • NOT definition:

  22. Some necessary functions no_of_input(x), takes integer values Count_ls(x), returns no. of 1s in the input of X

  23. Circuit specific properties Connectivity: connected(x1, in(1,A1)) connected(x1, in(2, A1)) connected(out(A1), in(1, A2)) connected(c1, in(2, A2)) connected(y, out(A2)) … Circuit elements: type(A1) = XOR, type(A2) = XOR, type(A3) = AND …

  24. Circuit

  25. Prolog

  26. Introduction • PROgramming in LOGic • Emphasis on what rather than how Problem in Declarative Form LogicMachine Basic Machine

  27. Prolog’s strong and weak points • Assists thinking in terms of objects and entities • Not good for number crunching • Useful applications of Prolog in • Expert Systems (Knowledge Representation and Inferencing) • Natural Language Processing • Relational Databases

  28. A Typical Prolog program Compute_length ([],0). Compute_length ([Head|Tail], Length):- Compute_length (Tail,Tail_length), Length is Tail_length+1. High level explanation: The length of a list is 1 plus the length of the tail of the list, obtained by removing the first element of the list. This is a declarative description of the computation.

More Related