AI Fall 2006 - Test #2 Topics

Test 2 will be on Thursday, Dec 7th in class

The test will be closed book (no notes, calculators, ...)

- Topics

- Logic (Chapters 7,8,9

  • Terminology:

    • Entailment
    • Models
    • Inference
  • Propositional Logic

    • Syntax, Sentences
    • Satisfiability
    • Conjunctive Normal Form
    • Inference Rules

      • Modus Ponens
      • Resolution
    • You should know what forward and backward chaining are, but you don't have to be able to apply them to a problem.
    • The Satisfiability Problem and Davis-Putnam algorithm.
  • Predicate Logic (FOL - First Order Logic)

    • syntax: predicates, functions, variables, quantifiers
    • Resolution and FOL

      • CNF conversion
      • Unification
    • Prolog : you should be able to write some very simple prolog programs. For example: use prolog to compute factorials.

- Machine Learning

  • General Learning Agent issues
  • Supervised vs. Unsupervised vs. Reinformement Learning

- Decision Trees (chapter 18.1-3)

  • attribute based representation
  • Information Gain and picking the best attribute
  • Evaluation of Learning (testing, learning curve)

- Neural Networks (Chapter 20.5)

  • Artificial Neurons (perceptrons)

    • inputs, weights, bias weight,activation function
    • Be able to construct a perceptron that computes a simple boolean function (OR, AND, etc.). Construction means "define the weights"...
    • Limitation of perceptrons with step function (activation function): linear classifications only.
    • Perceptron learning algorithm
  • Feed-forward networks

    • Back-propagation
    • Be able to discuss the expressive power of a feed-forward network (what kind of classification functions can be represented?)

- Statistical Learning (Chapter 20.1-3)

  • There won't be questions about this material (bayesian learning).

- Reinforcement Learning (Chapter 21)

  • Policy: (understand what a policy is!)
  • Markov assumption for rewards and transistions
      why is this important?
  • Goal: cumulative sum of rewards
  • discounted rewards (when does this make sense?).
  • Q Learning

    • What is Q ?
    • Q update rule
    • Learning: exploitation vs. exploration
    • Be able to discuss the use of Q learning on a specific problem domain.

- Utility Theory (Chapter 16.1-3)

  • Decision making based on preferences
  • Utility function
  • Maximum Expected Utility
  • Lotteries (syntax and concepts)
  • Axioms of Utility Theory (no need to memorize anything, but be able to recognize and discuss)
  • Be able to discuss the general ideas of utility theory and why it is important.
  • Be able to invent/derive a potential utility function given the description of a problem domain.

- Knowledge Representation (Chapter 10)

  • Ontologies
  • Categories and Organization of Categories
  • Semantic Networks (general idea)
  • FOL and category relations (no need to memorize anything, just be able to recognize/discuss)
  • Situation Calculus

    • situations and actions
    • fleunts
    • atemporal predicates/functions
    • The Frame problem

- 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:

  • The members of a bridge club are Joe, Sally, Bill and Ellen.
  • Joe is married to Sally.
  • Bill is Ellen's Brother.
  • The spouse of every married person in the club is also the club.
  • The last meeting of the club was at Joe's house
  • Was the last meeting at Sally's house?
  • Is Ellen married?

Another problem. Given these facts:

  • Steve only likes easy courses.
  • CompSci courses are hard.
  • All the courses in the math department are easy.
  • MATH-301 is a math course.

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

sizecolorshapeAnswer
mediumbluebrickyes
smallredsphereyes
largegreenpillaryes
largegreensphereyes
smallredwedgeno
largeredwedgeno
largeredpillarno


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).