Midterm Exam

ARTIFICIAL INTELLIGENCE

CSC 380


SPRING 2005


Problems :


1.    Given an environment of a typical Automatic Teller Machine and you being the agent intending to use it (i.e. withdraw $100.00 cash and deposit a check made to you on the amount of $350.00), provide a PAGE/PEAS description of a rational ATM user. Characterize the environment as being accessible, deterministic, episodic, static, continuous, and single or multi-agent. What agent architecture is best for this domain?

ATM-related Percepts :
    Instructions on usage (card insertion, password), Menu items : Withdrawal, Deposit, Balance, Transfer

Accounts-related Percepts : Account Number, Current Balance

Agent-related Percepts :
    Amount of Money To be Withdrawn, Amount of Money Designated for Deposit
   Amount of Money Designated for Transfer

Actions :
    Read ATM's Instructions on Usage (Card Insertion, Password Verification), Insert Card, Input Password
    Read Menu Items, Select Withdrawal, Select Deposit, Select Balance, Select Transfer
    Compare Amount to be Withdrawn to the Money Available
   
Goal :  Perform intended operation(s) with the account provided that it does not violate bank’s account usage policies.

Environment :
    ATM with :
        Usage Instructions
        Account Choices
        Account Operation Choices

   The environment is fully accessible (complete state of the account(s) is known – account numbers, account amounts, account policies). It is deterministic (the agent's actions and the bank account policy fully determine next state of the affairs). The environment is also episodic (the agents experience is divided into episodes of interacting with ATM or deliberating about account-related issues). The environment is dynamic because the environment (account amount) may change while the agent is deliberating. The environment is continuous time-wise, because the time spans through the set of continuous values. Finally, it is (possibly) multi-agent for joint accounts. Goal-based architecture appears the most appropriate because of the agent’s intended goals before the interaction with ATM.
 

   (25 (=8+9+8)  points)


2.    Give the initial state, goal test, operators, and path cost function for each of the following. There are several possible formulations for each problem, with varying levels of detail. The most important aspects of your formulation should be its preciseness and coherence so that they could be implemented.

    You are to select courses that you will be taking in the next semester. The number of courses is limited to four and available courses are listed online (TESS). You’re to make your selection in such a way that (in order of preferences) : (i) no two selected courses are offered at the same time slot, (ii) no selected course has already been successfully taken by you, (iii) for each selected course you meet academic requirements, (iv) each selected course, if possible in order of preference : (a) fulfills a core requirement for your major, (b) fulfills an elective requirement for your major, (c) fulfills a general education requirement, (d) fulfills a free elective requirement.

Initial State :      No courses added to the schedule yet.
Goal Test :        All four courses added to the schedule so that (i), (ii), (iii) and (iv) are satisfied.
Operators :       (I) Add a course to the schedule, (II) Remove a course from your schedule.
Path Cost :        Number of attempts (additions and removals of courses from the schedule).
 

   (25 points)


3.    Represent the following sentences in First Order Logic using a consistent vocabulary (which you must first define) :

    (a)    There is course taken by all freshmen who didn't already take it.

$x ( Course(x) && ( "y ( (Freshman(y) &&  !Took(y,x)) ==> Taking(y,x) ) )

    (b)    There is a course that doesn’t benefit anybody except the students who didn’t take it.

$x ( Course(x) && "y (Benefits(x, y) <==> (Student(y) &&  !Took(y,x)))

    (c)    Not all courses that are interesting are also popular.

! "x ( Course(x) && Interesting(x) ==> Popular(x) )

    (d)    Not all popular courses are interesting as well.

! "x ( Course(x) && Popular(x) ==> Interesting(x) )
 

   (25 (=12+13)  points)


4.    Convert the following First Order Logic sentence into its Conjunctive Normal Form :

    "x ( AIK(x) <==> $c ( AIC(c) & TakenBy(c,x) ) )

( ! AIK(x) V AIC(CourseTakenBy(x))) &&
( ! AIK(x) V TakenBy(CourseTakenBy(x), x))  &&
( ! AIC(z) V ! TakenBy(z, x) V AIK(x) )
 

   (25 points)


6.    For each of the following atomic sentences give the most general unifier, if it exists :

    (a)    Gives(G(x,x), y),                       Gives(y, G(A,B))

DOESN'T EXIST (y/G(x,x) and y/G(A,B), so x would have to be A and B at the same time).

    (b)    Respects(Daughter(y),y)              Respects(x,x)

DOESN'T EXIST (x / Daughter(y),    y / x / Daughter(y) ==> x / Daughter(Daughter(y)) as well).
 

   (25 (=12+13)  points)


7.

    The following is a story that you will need to translate into a FOL knowledge base (its sentences numbered and described by FOL Clauses) :  The college handbook says that it is an offense meriting expulsion from the college when a student copies HW materials from online sites. The online site http://www.paperseasy.org offers various prepared answers to selected questions from various academic fields. Joe Doe is a student all of whose HWs were directly copied from the site. Prove that Joe Doe should be expelled from the college.

 

It is an offense meriting expulsion from the college when a student copies HW materials from online sites.

1.  Student(x) & HWMat(y) & OnLineSite(z) & Copied(x,y,z) è Exp(x)

The online site http://www.paperseasy.org offers various prepared answers to selected questions from various academic fields.

2. OnlineSite(PapersEasy) & Offers(PapersEasy, ANS) & Answer(ANS)

Joe Doe is a student.

3. Student(JoeDoe)

Joe Doe has submitted his homeworks.

4. ("x) HWMat (x) è HWSub(JoeDoe,x)

All of Joe Doe’s HWs were directly copied from http://www.paperseasy.org.

5. ("x) (HWMat(x) & HWSub(JoeDoe,x)  ==> Copied(JoeDoe,x,PapersEasy) )

Answers are homework materials.

6. ("x) (Answer(x) ==> HWMat (x) )

To be proved : Joe Doe should be expelled from the college.

7. Exp(JoeDoe)

Provide a proof that Joe Doe should be expelled from the college . In the proof, for each step indicate :
    (a) the inference rule being used,
    (b) the unifiers being applied,
    (c) the sentences the rule is being applied to, and
    (d) the sentence derived by the rule (number it, as well)

(AE) 2 :                                    OnlineSite(PapersEasy)                                                               (8)

(AE) 2 :                                    Answer(ANS)                                                                                (9)

(GMP) 6 and 2 : x/ANS           HWMat (ANS)                                                                               (10)

(GMP) 10 and 4 : x/ANS         HWSub (JoeDoe, ANS)                                                                (11)

(GMP) 5, 10 and 11, and 4 : x/ANS    

Copied(JoeDoe, ANS,PapersEasy)                                              (12)

(GMP) 1, 3, 10, 8, and 12 : x/JoeDoe y/ANS z/PapersEasy

                                                Exp(JoeDoe)                                                                                 (7)

   (25 points)


8.       The following is a knowledge base (its sentences numbered and described by First Order Logic clauses) :

Big dogs are very strong.

1.  BigDog(x)  ==>
                                StrongDog(x)

Dogs that are not big are full of energy.

2. ! BigDog(x)  ==>
                               EnergeticDog(x)

Strong dogs are reliable protecting homes.

3. StrongDog(x)  ==>
                               HomeProtecting(x)

Dogs full of energy are reliable protecting homes.

4. EnergeticDog(x)  ==>
                              HomeProtecting(x)

Provide a proof that my dog Meadow is reliable protecting home. In the proof, for each step indicate :
    (a) the inference rule being used,
    (b) the unifiers being applied,
    (c) the sentences the rule is being applied to, and
    (d) the sentence derived by the rule (number it, as well)

We will prove HomeProtecting(Meadow) by proving that the knowledge base and the negation of HomeProtecting(Meadow) yield a contradiction.

The knowledge base in CNF :

Big dogs are very strong.

1.  ! BigDog(x)  V
                                StrongDog(x)

Dogs that are not big are full of energy.

2. BigDog(x)  V
                               EnergeticDog(x)

Strong dogs are reliable protecting homes.

3. ! StrongDog(x)  V
                               HomeProtecting(x)

Dogs full of energy are reliable protecting homes.

4. ! EnergeticDog(x) V
                              HomeProtecting(x)


 
 Negated HomeProtecting(Meadow)  in CNF :
 

 My dog Meadow is not reliable protecting home.

 5. ! HomeProtecting(Meadow)

(Res.)  1. and 2.                                                StrongDog(x) EnergeticDog(x)                    (6)
(Res.)  6. and 4.                                                StrongDog(x) V  Achieving(x)                         (7)
(Res.)  7. and 3.                                                HomeProtectinging(x)                                      (8)
(Res.)  8. and 5. with x / Joe                              CONTRADICTION
 

   (25 points)