In a run through the wumpus world, we have to tell the search engine in our AI man what actions are safe:

0110 - could mean many things:
| "2 is prime" | P |
| "I ate breakfast today" | Q |
syntax = how a sentence looks
sentence -> AtomicSentence | ComplexSentence
AtomicSentence -> T(rue) | F(alse) | Symbols
Symbols -> P | Q | R
ComplexSentence -> (Sentence) | NOT Sentence | Sentence Connective Sentence
example: (P AND Q) IMPLIES R
semantics = what a sentence means
interpretation: assigns each symbol a truth value, T or F
truth tables ("compositional semantics"):
| A | B | NOT A | A and B | A or B | A implies B | A equiv B |
|---|---|---|---|---|---|---|
| t | t | f | t | t | t | t |
| t | f | f | f | t | f | f |
| f | t | t | f | t | t | f |
| f | f | t | f | f | t | t |
EXAMPLES OR PITFALLS when sentences -> logic
Either I go to the movies or I go swimming (inclusive vs. exclusive or)
2 is odd implies that 3 is even
(Implication doesn't imply causality)
It says something about B if A is T. Otherwise it doesn't say anything.
valid = always true
satisfiable = there is an interpretation (at least one is true)
unsatisfiable = always false
example:
2 is prime. (Is this always true?)
2 is prime or 2 is not prime.
This second statement is the same as saying P OR (NOT P). Check out the truth table:
| P | NOT P | P OR (NOT P) |
|---|---|---|
| T | F | T |
| F | T | T |
Therefore it's both valid and satisfiable.
To say that a knowledge base entails a sentence =
When an interpretation makes the knowledge base true, it also makes the sentence
true as well. The advantage is that the computer does not need to know the
interpretation.
example:
Does "head, I win; tails, you lose"
- entail -
"I win"?
(note: background knowledge is important!)
symbols:
H = coin lands heads up
T = coin lands tails up
I = I win
U = You lose
background knolwedge:
(H implies I) AND (T implies U)
entails
I
Is there an interpretation, or assignment of truth values to the symbols, that is false? If so, it's no longer valid. Well, if you make the following assignment:
H is false
I is false
T is true
U is true
It doesn't follow. To check if something is valid, you can write down all the interpretations in a truth table and check. In this case, there are 2^4 = 16 interpretations since there are 4 symbols and 2 values.
Inference Procedures: these can infer the sentence from the knowledge base.
The inference procedure is sound if the knowledge base entails the sentence.
inference procedures = repeated application of inference rules. We can use these instead of constructing massive truth tables, which are exponential in the number of symbols.