W-Knowledge Based Agents-Propositional-Logic
W-Knowledge Based Agents-Propositional-Logic
Method 1: model-checking
For every possible world, if is true make sure that is true too
OK for propositional logic (finitely many worlds); not easy for first-order
logic
Method 2: theorem-proving
Search for a sequence of proof steps (applications of inference rules)
leading from to
E.g., from P and (P Q), infer Q by Modus Ponens
Model
assignment of a truth value to every propositional symbol (a
"possible world")
Model
For example, if P: “It is raining.” and Q: “It is Tuesday.”, a
model could be the following truth-value assignment: {P =
True, Q = False}.
This model means that it is raining, but it is not Tuesday.
However, there are more possible models in this situation
(for example, {P = True, Q =True}, where it is both raining
an a Tuesday).
In fact, the number of possible models is 2 to the power of
the number of propositions. In this case, we had 2
propositions, so 2²=4 possible models.
Knowledge Base
The knowledge base is a set of sentences known by a
knowledge-based agent.
This is knowledge that the AI is provided about the world in
the form of propositional logic sentences that can be used to
make additional inferences about the world.
Entailment (⊨)
If α ⊨ β (α entails β), then in any world where α is true, β is
true, too.
For example, if α: “It is a Tuesday in January” and β: “It is a
Tuesday,” then we know that α ⊨ β. If it is true that it is a
Tuesday in January, we also know that it is a Tuesday.
Entailment is different from implication. Implication is a
logical connective between two propositions. Entailment, on
the other hand, is a relation that means that if all the
information in α is true, then all the information in β is true.
Knowledge-Based Agents
We resolve them, arriving at the empty set, (). The empty set
is false by definition, so we have arrived at a contradiction.
Inference by Resolution: Example
Does (A ∨ B) ∧ (¬B ∨ C) ∧ (¬C) entail A?
First, to prove by contradiction, we assume that A is false. Thus,
we arrive at
(A ∨ B) ∧ (¬B∨ C) ∧ (¬C) ∧ (¬A).
Now, we can start generating new information. Since we know
that C is false (¬C), the only way (¬B ∨ C) can be true is if B is
false, too. Thus, we can add (¬B) to our KB.
Next, since we know (¬B), the only way (A ∨ B) can be true is if
A is true. Thus, we can add(A) to our KB.
Now our KB has two complementary literals, (A) and (¬A). We
resolve them, arriving at the empty set, (). The empty set is false
by definition, so we have arrived at a contradiction.