| AI Fall 2006 - Test #2 Topics |
|   AI Home |
The test will be closed book (no notes, calculators, ...)
- Topics
- Logic (Chapters 7,8,9
Terminology:
Propositional Logic
Inference Rules
Predicate Logic (FOL - First Order Logic)
Resolution and FOL
Prolog : you should be able to write some very simple prolog programs. For example: use prolog to compute factorials.
- Machine Learning
- Decision Trees (chapter 18.1-3)
- Neural Networks (Chapter 20.5)
Artificial Neurons (perceptrons)
Feed-forward networks
- Statistical Learning (Chapter 20.1-3)
- Reinforcement Learning (Chapter 21)
Q Learning
- Utility Theory (Chapter 16.1-3)
- Knowledge Representation (Chapter 10)
Situation Calculus
- What to expect
You should be able to take an english description of a problem, convert to Propositional Logic (identify propositions and sentences that describe the problem), and solve using modus ponens or resolution.
You should be able to take an english description of a problem, convert to Propositional Logic and infer additional facts from the sentences.
Sample problem:
Alice, Bob and Carl are each either liars (always lie), or truth-tellers (never tell a lie).
Alice says "Bob is a liar"
Bob says "Carl is a liar"
Carl says "Alice and Bob are both liars"
Who is telling the truth? (use propositional logic/resolution to answer this question).
Answer: Carl and Alice are liars. Bob is a truth-teller.
Derivation:
A is "Alice is a truth-teller" B is "Bob is a truth-teller" C is "Carl is a truth-teller" ---------------- Sentences: Alice says Bob is a big fat liar: A <=> !B Bob says Carl is a liar: B <=> !C Carl says both Alice and Bob are liars: C <=> (!A ^ !B) ------------------ Conversion to CNF A <=> !B is (A => !B) ^ (!B => A) is (!A v !B) ^ (B v !A) add these two facts to KB. B <=> !C is (B => !C) ^ (!C => B) is (!B v !C) ^ (C v B) add these two facts to KB. C <=> (!A ^ !B) is [(C => (!A ^ !B)] ^ [ (!A ^ !B) => C] is [(!C v (!A ^ !B)] ^ [ !(!A ^ !B) v C] is [(!C v !A) ^ (!C v !B) ] ^ [A v B v C] add these three facts to KB --------------------------------------------------- KB: 1) !A v !B 2) A v B 3) !B v !C 4) B v C 5) !C v !A 6) !C v !B 7) A v B v C --------------------------------------------------- Try to prove that Alice is a truth-teller. Add rule to KB (negation of what we want to prove) 8) !A --------------------------------------------------- Resolution: combine 8 and 2 to produce B (new rule) 9) B combine 9 and 3 to produce !C (new rule) 10) !C any more applications of resolution will result in facts already in the KB, so there is no point in continuing. We can't prove that Alice is a truth-teller. We can try to prove she is a liar. We start over with the initial KB, and now add A (we are trying to prove Alice is a liar, so we add the negation to the KB). KB: 1) !A v !B 2) A v B 3) !B v !C 4) B v C 5) !C v !A 6) !C v !B 7) A v B v C --------------------------------------------------- 8) A combine 8 and 1 to get !B 9) !B combine 9 and 4 to get C 10) C combine 8 and 5 to get !C 11) !C combine 10 and 11 to get nothing, this is a contradiction and proves that by adding the rule A to our KB messes things up, so !A must be true. Alice is a liar. To find out about Bob and Carl, we add !A to the KB (this is now a derived fact!) and see if we can prove something about B and C. To Prove B: add !B and do resolution. 1) !A v !B 2) A v B 3) !B v !C 4) B v C 5) !C v !A 6) !C v !B 7) A v B v C 8) !A 9) !B combine 9 and 2 to produce A 10) A combine 10 and 8 to produce null, therefore !B messes things up, so we have proved B is true. To prove Carl is a liar we can add C to the KB, which can then be reduced to null proving Carl is a liar. Intuitively we can see Carl is a liar since Bob says so, and we know B (Bob is a truth teller).
You should be able to take an english description of a problem, and solve the problem using predicate logic (resolution).
Sample Problem:
Another problem. Given these facts:
Use resolution to answer the question, "What course would Steve like?"
Given some data for a small classification problem (as a set of attribute values and correct classification), be able to create a decision tree using Information Gain to pick attributes to split the tree on.
Sample Question: Turn this data into a decision tree
| size | color | shape | Answer |
|---|---|---|---|
| medium | blue | brick | yes |
| small | red | sphere | yes |
| large | green | pillar | yes |
| large | green | sphere | yes |
| small | red | wedge | no |
| large | red | wedge | no |
| large | red | pillar | no |
You should be able to build an artificial neuron, (perhaps a very small two layer network) given a classification problem or boolean function. Designing such a network or perceptron simply requires specifying all the weights.
Sample Problem: Design a perceptron (with linear threshold) that compute the binary function AND (two input and).
Sample Problem: Design a feed-forward neural network based on perceptrons with linear thresholds that computes the binary function XOR (exclusive or).
You should be able to discuss Utility Theory, Knowledge Representation, Reinforcement Learning, etc (you can expect some short answer questions in addition to the type of problems shown above).