From the prep exercises you did for today:
Write down
something(s) you learned / some new idea
question(s) you still have / thing(s) that are confusing
big picture of what AI as future, regular algorithms as the past
course grading: standards. Four tested so far; how to complete those
propositional logic, first order logic
brainstorming for Beyond the Text ideas (13:55)
uninformed versus informed search: what algorithms are “AI” and which aren’t?
one way: past versus future. Best-first: only uses known (knowledge from past) path costs; A* uses heuristic (≈ future path costs).
exam 1 addressed these course standards. See syllabus for how this feeds into overall grade
disclosing AI usage: please continue doing so
just for my own curiosity, include some prompts you used
From today’s prep. Share your questions etc with others at your table. With a partner: check in about:
Likes(Rex, Ada)
Owns(Roommate(Ben), Tab)
∀x Likes(Ada, x)
what are relations, objects, functions, symbols, predicates?
Translate English ↔︎ FOL:
∀x (Dog(x) ∧ Likes(Cy, x))
∀x (Dog(x) ⇒ Likes(Cy, x))
at least two people own Tab.
only Ada owns Tab.
f is O(g):
∃ N : ∃ c : ∀ n : n > N ⇒ f(n) < c · g(n)
Negate that!
our first approach to inference with FOL is the classic CS move: reduce to a solved problem: PL inference
AIMA example: 5 objects.
All greedy kings are evil: ∀ x King(x) ∧ Greedy(x) ⇒ Evil(x)
Five objects: x = Richard, LeftLeg(Richard), John, Crown, LeftLeg(John)
King(Richard) ∧ Greedy(Richard) ⇒ Evil(Richard)
King(Crown) ∧ Greedy(Crown) ⇒ Evil(Crown)
etc
All are true PL sentences, so “∀ x (…)” is a true FOL sentence
It’s what we just did: FOL model with n objects. Take “∀ x S” and replace with n PL sentences, replacing x with each object in the model
If g is a ground term in the model: {x/g} is the
substitution of g for x; subst(x/g, S) is the
result of applying that subst to S.
Rule of UI: ∀ x Ssubst(x/g, S)
If ∃ x S, then, well, there exists an object making S true. Give it a name that’s different from all the existing symbols (Skolem constant)
∃ x Crown(x) ∧ OnHead(x, John)
Use C1 for such an x: then
Crown(C1) ∧ OnHead(C1, John)
is a true PL sentence
Ternary predicate P, 16 symbols. How many PL sentences to completely describe that predicate in the model? P(A, B, C) for all combinations of A, B, C.
163!
what about functions? Can compose them: LeftLeg(LeftLeg(John)); Owner(Owner(Ada))
just keep going. Just one function → ∞ly many sentences.
Main tool: generalized modus ponens. A formalization of UI, in some ways. KB: objects John, Richard, and sentences:
∀ x King(x) ∧ Greedy(x) ⇒ Evil(x)
King(John)
∀ y Greedy(y)
Brother(John, Richard)
How to conclude ‘Evil(John)’?
the substitution θ = { x/John, y/John } applied to ‘Greedy(y)’ gives Greedy(John) by UI;
we have King(John) in our KB;
θ applied to King(x) ∧ Greedy(x) gives ‘King(John) ∧ Greedy(John)’ (may or may not be true)
usual equivalences:
King(John), Greedy(John) King(John) ∧ Greedy(John)
so by modus ponens:
King(John) ∧ Greedy(John), (King(John) ∧ Greedy(John) ⇒ Evil(John)) Evil(John)
an implication: pi ∧ ⋯ ∧ pn ⇒ q
true sentences pi′, i 1 to n
substitution θ such that θ(pi′) = pi ∀ i
result: the above collectively entails the antecedent of the implication, so by modus ponens, q.
need to go from pile of KB sentences to pi′ that “match” or “align with” the pi
that’s unification
See the description on Moodle.
Spend some time thinking, chatting with classmates, etc.
Submit a couple ideas to the Moodle assignment (due tomorrow)
1.5. actual credit to suggestions & feedback on them
goal: address a failure mode: student who doesn’t think about or study anything between class meetings, just shows up to have knowledge poured into their head. (baby bird metaphor)
also to obviate the firehose / tsunami of content in AIMA
accountability mechanism?
didn’t get to the following..
forward chaining:
with this KB:
what can you say about Q?
PL theorem proving
a better way to do the inference you did in pre-class work for the (2,