Home Robotics C++ Physics II AP Physics B Electronics AP Java Astronomy Independent Study Summer Session Contests  About
                                                       

Exercises

 

1 2 3 4 5 6 7 8 9 10

 

 

Exercise 1

Artificial Intelligence Lab 1: Prolog and Chapter 1 of the text

 

Part a: Prolog

 

¢  What does Prolog stand for?

    

¢  What features of Prolog make it a powerful language for Artificial Intelligence applications and those

      involving non-numeric programming in general?

     

¢  Define the following terms

 

     Ø  Horn Clause Logic

 

     Ø  Facts

         

     Ø  Rules

          

     Ø  Theory

          

     Ø  Goal clauses

 

     Ø  Failing

 

     Ø  Backtracking

 

     Ø  Side effects

          

¢  Define the following symbols

 

     Ø  :-

         

 

     Ø  ,

        

 

     Ø  ?-

          

   

 

Part b: Chapter 1 of the Text

 

¢  Exercises, Page 30, Exercises 1.1 and 1.3

 

¢  What is a neural network?

 

¢  Definitions

 

As the instructor and other observers have said many times, it is important to define what you are talking about early in any discussion.

The author of the text provides some definitions of AI divided into 4 categories. State the one you believe is the most appropriate

and provide a brief justification (about a paragraph or 2)

 

Exercise 2

 

¢  Assume the following relationships

     Ø  pam is the mother of bob

     Ø  bob is the father of ann and pat

     Ø  pat is the mother of jim

     Ø  tom is the father of bob and liz 

¢  Write 6 clauses describing the above, each of which declares one fact about the parent relationship

¢  Write a Prolog program that incorporates the above

¢  Translate each of the following (into English) and provide Prolog's answer to each

      Ø  parent(X, jim).

      Ø  parent(jim, X).

      Ø  parent(X, pam), parent(pat, X).

      Ø  parent(X, pam), parent(Y,X), parent(jim, Y).

 

Exercise 3

 

Part a: Refer to the earlier handout-section 1.2 - Defining Relations by Rules

1. Translate the following into Prolog rules

    a. Everybody who has a child is happy (introduce a one-argument relation happy)

    b. For all X, if X has a child who has a sister then S has two children (introduce new relation hastwochildren)

2. Define the relation aunt (X,Y) in terms of the relations parent and sister. I suggest you start by drawing a relationship diagram.

 

Part b: Refer to the earlier handout

1. Define backtracking as used by Prolog

2. Refer to figures 1.9, 1.10, and 1.11. Is backtracking used in any of the following?

    a. parent (pam, bob)

    b. mother (pam, bob)

    c. grandparent (pam, ann)

    d. grandparent (bob, jim) 

Exercise 4

 

¢ Define the following terms used in Prolog

     Ø Horn clause logic

     Ø Failing

     Ø Fact

     Ø Rule

     Ø Theory 

     Ø †Backtracking

 †    Ø Ariity

    † Ø Structure

  †   Ø List

   †  Ø Cut

     Ø Predicate 

¢ List 2 built-in Prolog predicates

¢ Define the following symbols used in Prolog

¢ A short video on neural networks was shown in the course - give a complete definition of this term - include some major challenges in your definition.

¢ In the video The Age of Intelligent Machines a paradox was mentioned - what was this paradox

¢ Languages are sometimes stated as being in 1 of 2 categories: procedural and declarative

   † Ø Define procedural language and list some strengths and weaknesses

  †  Ø Define declarative language and list some strengths and weaknesses

¢ List some strengths and weaknesses of Prolog and state which language category (procedural or declaritive) it is in

 

Exercise 5

 

 

Exercise 6

 

 

Exercise 7

 

 

Exercise 8

 

 

Exercise 9

 

 

Exercise 10