CMSC 471
Artificial Intelligence -- Fall 2002
HOMEWORK ONE
out 8/28/02 due 9/11/02
http://www.cs.umbc.edu/courses/undergraduate/471/Fall02/hw1.html
PART I. What is AI? (14 pts.)
READING: Read Chapter 1 of Russell & Norvig and John McCarthy's
paper, "What
is AI? (http://www-formal.stanford.edu/jmc/whatisai.html)"
ASSIGNMENT: R&N (p. 5) characterize AI approaches by two
dimensions: human-like vs. rational/ideal and thinking vs. behaving.
Here are seven alternative definitions of artificial intelligence. No
one definition is "correct"; they all reflect different perspectives on
what AI is, or what is important about AI. Write a short essay of 1/2 to
one page summarizing the key differences among these definitions. Be specific.
Artificial intelligence is...
-
"a collection of algorithms that are computationally tractable, adequate
approximations of intractably specified problems" (Partridge, 1991)
-
"the enterprise of constructing a physical symbol system that can reliably
pass the Turing Test" (Ginsberg, 1993)
-
"the field of computer science that studies how machines can be made to
act intelligently" (Jackson, 1986)
-
"a field of study that encompasses computational techniques for performing
tasks that apparently require intelligence when performed by humans" (Tanimoto,
1990)
-
"a very general investigation of the nature of intelligence and the principles
and mechanisms required for understanding or repicating it" (Sharples
et
al., 1989)
-
"the getting of computers to do things that seem to be intelligent" (Rowe,
1988)
PART II. AI scavenger hunt (36 pts.)
ASSIGNMENT: You will need to browse around the AI Topics website,
http://aaai.org/AITopics/aitopics.html,
to answer the following questions. This is a great site produced by AAAI
that has a lot of introductory information on artificial intelligence,
as well as pointers to many useful resources.
Very Short Answer Questions (2 pts each):
-
Who said, "Ever since computers were invented, it has been natural to wonder
whether they might be able to learn"?
-
Are genetic algorithms used for (a) planning, (b) learning, (c) creating
artificial life forms, or (d) machine vision?
-
What do you call the evaluation function used by a genetic algorithm?
-
In July 2002, the Los Angeles Times reported that someone is building an
enormous distributed program to play chess. What is this person's name,
and what is his system's name?
-
According to Katie Hafner, how good is the best computer Go player?
-
Barely as good as a novice player
-
As good as a casual player
-
As good as a strong player
-
Almost as good as the world champion
-
Able to beat the world champion
-
Who first introduced the term "robot," and in what year?
-
What is Isaac Asimov's First Law of Robotics?
-
Fill in the blank: "Qualitative reasoning is the area of AI which creates
representations for __________ aspects of the world." (--Ken Forbus)
-
Who said, "LISP has jokingly been called `the most intelligent way to misuse
a computer.' I think that description is a great compliment because it
transmits the full flavor of liberation: it has assisted a number of our
most gifted fellow humans in thinking previously impossible thoughts,"
and in what year?
-
Who first invented the term "artificial intelligence," and when?
Short Answer Questions (4 pts each): (Note that there are no
right answers to these questions, only more and less coherent and complete
discussions! Your answers should not be more than a couple of sentences
each.)
-
What's the difference between cognitive science and AI?
-
What's an ontology?
-
What's an agent?
-
List three interesting facts you learned from the AI Topics website.
PART III. Lisp introduction (50 pts.)
ASSIGNMENT: These problems are intended to help you become familiar
with the basic programming concepts in the Lisp language. Documentation
and error checking are essential in this class, so although these problems
are simple, your code must be documented, and error cases must be handled.
(For example, in problem #2, what happens if the argument isn't a list?
What if it is a list, but is less than three elements long?)
1. Writing simple functions (5 pts.)
(a) Write a function (cube n) to return the cube of its
argument n. For example, (cube 2) should return 16;
(cube
.5) should return .125.
(b) Write a function (fact n) to return the factorial of the
argument n. (The factorial of an integer is the product
of all integers from 1 to that integer.) For example, (fact 3)
should return 6; (fact 10) should return 3628800.
(What do you think (fact 'hello) should return?) You should use
recursion to write this function.
2. Operating on lists (20 pts.)
(a) 5 pts. Write the function (my-third l) which returns the third
element of the list l. Do not use the built-in function (third). You can
define this function either recursively or iteratively.
(b) 15 pts. There are often many different ways to solve the same problem
in Lisp. In this problem, you will need to use your creativity and knowledge
of Lisp functions to write the same function in several different ways.
The function (all-odds l) should take a list l of integers
and returns a list containing only the odd integers in the list. For example,
(all-odds
'(1 2 3 4 5 6 7 8 9 10)) should return (1 3 5 7 9). You can
use the built-in function oddp in your solutions.
Find (and turn in) at least three distinctly different
ways to implement the all-odds function. At least one of the implementations
should use mapcar or a related construct, such as mapcan.
(Hint: try looking at the built-in functions dolist, do,
cond,
and loop.)
3. Conditionals and strings (10 pts.)
Write a function (case? s) that returns the symbol 'upper
if
the characters in the string s are all upper case, 'lower if the
characters are all lower case, and 'mixed if there are some lower
case and some upper case letters (or if the string contains any non-letter
characters). Hint: first write two subroutines,
upper? that tests
to see if a string is upper case and lower? that tests to see
if a string is lower case. Then use cond with these subroutines to test
for which case to return. Useful built-in functions for solving this problem
include char, upper-case-p, and lower-case-p.
4. Flattening a tree (15 pts.)
Write a function (flatten-tree l) that takes an arbitrarily deeply
nested list of atoms, and returns a flattened list of these atoms (in the
same order they appear in the original list). For example, (flatten-tree
'(((1) 2) ((3 (4)) 5) 6)) should return (1 2 3 4 5 6).