Presentation is loading. Please wait.

Presentation is loading. Please wait.

Artificial Intelligence Building Knowledge Base Chapter 8.

Similar presentations


Presentation on theme: "Artificial Intelligence Building Knowledge Base Chapter 8."— Presentation transcript:

1 Artificial Intelligence Building Knowledge Base Chapter 8

2 Outline of this Chapter Knowledge engineering Knowledge Representation The electronic circuits domain

3 Knowledge engineering The process of building knowledge base Knowledge engineer (KE) –investigates a particular domain. –Determine what concepts are important in that domain –Create a formal representation of the objects & relations in the domain KE is trained in representation but not usually an expert in the domain. KE interview the real expert to become educate about the domain & elicit the required k, in a process called Knowledge acquisition. Choosing a programming language Choosing a logic writing a program Building knowledge base choosing a compiler Implementing the proof theory running a program Inferring new facts

4 Knowledge Representation Representing a knowledge of a domain goes through several stages: 1.Identify the task –KE must define series of questions that the KB will support 2.Assemble the relevant knowledge. –KE might need to work with real expert to extract what they know. 3.Decide on a vocabulary of –Predicates, functions, constants –Translate the domain level concepts into logic level names.

5 Knowledge Representation (Cont.) 4. Encode general knowledge of the domain –KE writes down the axioms/logical sentences for all the vocabulary terms 5.Encode description of specific problem instance –Involves writing atomic sentences about instances of concepts. 6.Pose queries to the inference procedure and get answer –Let the inference procedure operate on the axioms & problem- specific facts –Derive the facts that we are interested in knowing 7.Debug the knowledge base –Answers to queries normally not correct on the first try. –If an axiom is missing, some queries will not be answerable from the KB To understand these 7 steps process, we turn to some examples of its use. We will consider the domain of Boolean electronic circuits next.

6 The electronic circuits domain One-bit full adder A digital circuit C1, with 3 inputs, containing 2 XOR gates, 2 AND gates & 1 OR gate. Input: bit values to be added. Output: 1- sum bit & 2 - carry bit

7 The electronic circuits domain 1.Identify the task –Does the circuit actually add properly? (circuit verification) –If all inputs are high, what is the output of gate 2 –What are all the gates connected to the first input terminal? 2.Assemble the relevant knowledge –Composed of wires and gates –Signals flow along wires to the input terminals of gates –Each gate produces a signal on the output terminal –There are 4 types of gates: AND, OR, XOR and NOT AND, OR, XOR have 2 inputs terminals NOT has only 1 –Irrelevant: size, shape, color, cost of gates

8 The electronic circuits domain 3.Decide on a vocabulary after deciding what we want to talk about in the prev slide (circuits, signals, gates & terminals) in this step- choose functions, predicates, & constants. Naming gates : X1,X2,etc (constants) Type of gates: type(X1) = XOR, type(X5) = OR (functions) Note:- type(X1) = XOR can also be represented as type(X1,XOR) 4.Encode general knowledge of the domain  t 1,t 2 Connected(t 1, t 2 )  Signal(t 1 ) = Signal(t 2 )  t Signal(t) = 1  Signal(t) = 0 where 1 ≠ 0  t 1,t 2 Connected(t 1, t 2 )  Connected(t 2, t 1 )  g Type(g) = OR  Signal(Out(1,g)) = 1   n Signal(In(n,g)) = 1  g Type(g) = AND  Signal(Out(1,g)) = 0   n Signal(In(n,g)) = 0  g Type(g) = XOR  Signal(Out(1,g)) = 1  Signal(In(1,g)) ≠ Signal(In(2,g))  g Type(g) = NOT  Signal(Out(1,g)) ≠ Signal(In(1,g))

9 The electronic circuits domain 5.Encode the specific problem instance We categorize the gates Type(X 1 ) = XOR Type(X 2 ) = XOR Type(A 1 ) = AND Type(A 2 ) = AND Type(O 1 ) = OR Show the connection between them Connected(Out(1,X 1 ),In(1,X 2 ))Connected(In(1,C 1 ),In(1,X 1 )) Connected(Out(1,X 1 ),In(2,A 2 ))Connected(In(1,C 1 ),In(1,A 1 )) Connected(Out(1,A 2 ),In(1,O 1 )) Connected(In(2,C 1 ),In(2,X 1 )) Connected(Out(1,A 1 ),In(2,O 1 )) Connected(In(2,C 1 ),In(2,A 1 )) Connected(Out(1,X 2 ),Out(1,C 1 )) Connected(In(3,C 1 ),In(2,X 2 )) Connected(Out(1,O 1 ),Out(2,C 1 )) Connected(In(3,C 1 ),In(1,A 2 ))

10 The electronic circuits domain 6.Pose queries to the inference procedure What are the possible sets of values of all the terminals for the adder circuit? 7.Debug the knowledge base

11 Summary The process of representing Knowledge of a domain goes through several stages. 1.Identify the task 2.Assemble the relevant knowledge. 3.Decide on a vocabulary 4.Encode general knowledge of the domain 5.Encode description of specific problem instance 6.Pose queries to the inference procedure and get answer 7.Debug the knowledge base Good representation eliminate irrelevant detail, capture relevant distinctions, & express K at the most general level possible.

12 End of Chapter 8


Download ppt "Artificial Intelligence Building Knowledge Base Chapter 8."

Similar presentations


Ads by Google