Contents
Overview
Setting
Cheese
Questions
Design
Problem 1
Problem 2
Problem 3
|
Overview
The second recitation provided a dry run of the first step of
design that you will do for the class project. The goal was to get
a directed, constrained experience with identifying and describing
a task domain for AI problem solving. The recitation (and these
notes) related particularly to the concepts described in sections
2.4, 3.2 and 5.4 of Computational Intelligence.
The tasks used in the recitation center around assisting
customers in a hypothetical internet cheese shop. We began by
introducing research on internet shopping, then mapped out the
basic steps in designing the domain. Our discussion focused on
three problems that study particular aspects of the domain and
knowledge base design for the problem.
Setting
In an internet storefront, a computer program is responsible for
presenting information and managing sales with a consumer; that
effectively means that designers can set up the store to be anything and
do anything. Nevertheless, typical internet sites are little more than
slow and cumbersome catalogs; they present the same options for purchase
and the same canned information about products that an ordinary brochure
might, and add the disadvantages of heavy requirements for connectivity
and bandwith. The only reason to use such a service is price, so
it's not surprising that internet retailers turn out to charge about
10-20% less for many products (such as books, CDs and airfare). For more information, see Erik
Brynjolfsson's work at MIT,
such as the paper
Frictionless Commerce. For some, particularly in traditional
``bricks and mortar'' businesses, this has suggested to a vision of
internet retailing as a drab and cutthroat marketplace in which prices
and profitability fall in the face of relentless global competition.
Not a good place to start a business.
However, there is another way to look at things, and this is where
AI comes in. An internet storefront can make it easier to find out
information about the quality and characteristics of products, so that
consumers can be more confident about buying new or unusual things and
can find products that better match their personal tastes. Consumers
naturally value this; and storefronts that provide comprehensive,
accessible and flexible information about their specialty wares are
likely to be rewarded with loyal customers who willingly pay higher
prices. John Lynch (no web page) and Dan Ariely make this argument
with a laboratory
study of simple systems for electronic shopping for wine.
Electronic commerce can make for successful business, but only for
certain kinds of sales and, importantly, only with a powerful system for
interacting with consumers.
The AI view of an intelligent agent interacting with the world
around it, and AI technology generally, provide natural resources for
pushing this kind of capability forward; many groups are taking up the
challenge. Statistical techniques for analyzing survey responses have
been proposed to characterize people's tastes and preferences, by people
like Pattie
Maes or (closer to home) Haym Hirsh. Meanwhile, Benjamin Grosof and others at IBM are
investigating the use of knowledge bases and declarative rules to
characterize agents for e-commerce. This is the technique we will
explore further now.
Cheese
You may not realize it, but cheese is a big and complicated
business. Tiny districts of Europe have their own idiosyncratic
traditional cheeses, which can be as exotic as they are delicious. Even
within districts, makers vary in quality, in other features like aging
or the use of spices that greatly affect the taste, and of course in
price. To a conoisseur (or indeed even the newest cheese enthusiast),
the subtle and interesting variations among cheeses can be as wild and
heady as those of fine wines. (The intoxication is perhaps more
metaphorical with cheese.) Cheeses can also be as difficult as wines
for a consumer to learn about or buy well. In fact, in the US,
specialty cheeses are relatively difficult to get hold of. (Not this difficult,thankfully.) Guides
to places where cheese is a big deal like Paris or Amsterdam
rattle off batteries of stores carrying nothing but hundreds of
different kinds of cheese. For New
York, the same guides can only offer a couple of gourmet emporiums
and designer delis.
Internet to the rescue! Traditional cheeses develop encased
in protective barriers of wax or mold, and only need to be
refrigerated after they are opened. So they can be ordered on line
(here
or here) and delivered
anywhere. And, with their small local producers and huge
variations, specialty cheeses are just the kind of merchandise that
Lynch and Ariely argue consumers will pay a premium for, if they
have good information and a flexible, powerful interface. Let's
consider decision-making in such an interface as an AI task domain.
Finding the right questions
The first part of any AI problem is finding an acronym to name the
program you construct. For this homework, let's use agent for
cheese ecommerce: ACE. (It's good for this name to be
upbeat, so avoid ones like agent for cheese
ecommerce, ie. ACHE.)
The first serious step is finding a set of decisions in the
domain that seem to fit usefully into the informal task you have and
which depend on information that you can feasibly obtain and represent.
A good starting point is to brainstorm English questions that an agent
might have to know the answers to, and then to formulate English
responses that could summarize the reasoning or explanation that the
agent could use to answer the questions. Of course you don't have to
expect that these questions would be posed by the user in English and
automatically understood; they could be programmed into the agent's
decision-making or selected by the user in a menu. Similarly your agent
probably would not actually generate English explanations for what it
does; it would simply do it. The agent need not even go through
anything like this reasoning in making its decision. This exercise is
how you, as the designer, develop an understanding of the limits and
possibilities of representing the domain and the regularities that hold
there.
In the case of ACE, these questions come naturally from scenarios
for displaying information or describing cheeses to the user in response
to search requests or specific queries. As it happens, I was
disappointed by some blue cheese that I purchased recently, so I've
found it particularly easy to imagine scenarios where good information
about blue cheese could assist a user. Here are a few:
-
What are some sharp blue cheeses?
Roquefort and Gorgonzola. Roquefort is a soft sharp blue cheese
from Aveyron, France, made from ewe's milk. Gorgonzola is a soft sharp
blue cheese from Lombardy, Italy, made from cow's milk.
-
What about English blue cheese?
Stilton is a firm, mellow blue Cheese from Leicestershire, England.
It is made from cow's milk.
-
I am trying to recreate a salad I once was served with beets and
blue cheese. What kind of blue cheese is right for that?
Roquefort. The sharpness goes well with the sweetness of the
beets, and the smooth texture does not detract from beets' tenderness.
Once you have these questions, you can consider the knowledge that
goes into them. In the easiest case, you find questions that can be
answered just by considering the central objects in the domain, in this
case cheese. For example, questions about the taste or texture of
cheese like the first one above fall into this category; there are
plenty of challenges in answering questions like these but it is easy to
draw a boundary around the representation that you need to answer such
questions.
At the next level of difficulty, you find questions that depend on
the relationship between the central objects in your domain and other
objects outside your central focus, but these questions, while
potentially open-ended, turn out to depend only on coarse properties of
the outside objects. These outside objects can increase the scope of
the objects you have to represent, but need not explode the
representation of the domain overwhelmingly as long as very little
information about them is needed to answer questions in your domain.
Questions like the second above are like this. England is not a cheese.
And you could never hope to represent everything about England.
However, to answer questions about where cheese comes from, you only
need to know that England is made up of cheese regions like Leicester or
Somerset (the birthplace of Cheddar) and that England is different from
France or Italy.
Finally come the impossible questions, like the third above. These
questions depend on outside objects in a way that is clearly open-ended;
for example they may depend on comparing objects in the domain
with those outside it, or involve consideration of properties of objects
in your domain that don't matter much on their own and would otherwise
not be represented. You have no hope of addressing these questions
using a constrained, domain-specific AI approach. Almost certainly, the
work you do to program an appropriate response to one question will be
irrelevant to the next question of this kind. So you can keep
programming and make effectively no progress in how capable your agent
is.
Thus, as you classify the questions you have thought up, you get a
more precise idea of what it will be possible to do in your domain, and
what will be impossible.
Design
At this point, you can start to set up some objects to reason about
and some relations to reason about those objects with in your domain.
The objects and relations you choose make assumptions about the world;
they limit what you can easily represent and infer, and therefore they
must be designed with an eye to the questions you wish to handle in the
domain, both informally and formally.
Let's start with an example for ACE, presented in full. Then the
homework proper considers some further cases that you will have to
develop yourself.
The basic objects for ACE are kinds of cheeses, which you identify
by the name of the variety. Use a different constant for each kind of
cheese. For example:
constant |
interpretation |
stilton |
Stilton, the kind of cheese |
roquefort |
Roquefort, the kind of cheese |
gorgonzola |
Gorgonzola, the kind of cheese |
This representation assumes that specific kinds of cheese are the
smallest or most specific variety of cheese you need to reason about.
To talk about cheeses fabricated by individual makers you would need to
distinguish objects in the domain more finely.
Problem 1: Composition
Identify a set of objects in the domain that provide a simple
inventory of the kinds of things cheese can be made from. In
guiding this process, you should consider the questions and answers
above, as well as the questions and answers below:
-
Are any blue cheeses made from goat's milk?
Bluebonnet is an American blue cheese made from goat's milk.
-
What is Brie anyway?
Brie is a soft mild French cheese made from cow's cream.
-
What's a good offbeat sweet table cheese?
I suggest Wenslydale with cranberries. Wenslydale is a sweet, firm
English cheese made from cow's milk; this variety of cheese has
cranberries mixed in.
Introduce symbols for each of these objects and describe the
intended interpretation of these symbols. It may help to relate
cheeses in a few different ways to a few different kinds of ingredients.
If you do this, name these relations by symbols and describe the
intended interpretation of these symbols as well.
Explain the assumptions in identifying these objects; argue that
your representation captures the key differences among most cheeses, but
does not go too far afield in demanding complicated reasoning outside
the general topic of cheese. Which questions does your representation
handle? Which does it classify in category three as open-ended and
effectively impossible?
Problem 1 Possible
Answer
One possible representation for the components of cheese is
based on distinguishing the kind of dairy product, the kind of
dairy animal, and any additives to the cheese. For this we might
use three sets of objects---kinds of dairy products:
constant |
interpretation |
milk |
the milk of any animal |
cream |
the cream (of any animal's milk) |
constant |
interpretation |
cow |
dairy products derived from the cow |
goat |
dairy products derived from the goat |
sheep |
dairy products derived from the sheep |
constant |
interpretation |
sweet |
sweet food (other than cheese)
viewed as an additive to cheese |
savory |
savory food (other than cheese)
viewed as an additive to cheese |
none |
what is added to plain cheese |
We might use three relations to describe a cheese in terms of
these objects:
predicate |
interpretation |
dairyProduct(C,P) |
true when C is a cheese and
P is some kind of milk, adjusted for fat
content, and when the dairy products used for C are those of P. |
dairyAnimal(C,A) |
true when C is a cheese and
A is a kind of dairy products derived
from a common animal, and when the dairy products used for C are those of A. |
additive(C,I) |
true when C is a cheese and
I describes the kind of stuff that has
been added to C (perhaps none for plain cheese). |
This representation assumes that it's three differences among
cheeses in how they are made that are most important for this
application. First, there are broad differences in the amount of
fat in the cheese, which is determined by whether the cheese is
made from milk or cream. Second, there is the broad flavor of the
cheese, as it is affected by the differing flavor of cow's milk,
goat's milk and sheep's milk. Finally, there is the question of
whether the cheese is plain, or has added sweet ingredients (like
fruit) or savory ingredients (like garlic). This handles general
questions like the ones about Bluebonnet and Brie well.
Other ingredients of cheeses, like the rennet that is used to
curdle and solidify the milk or the culture that gives the cheese
its distinctive flavor, are left out of this representation.
What's more, additives to cheese are thought of as open ended, so
specific questions about, say, the differences between Wensleydale
with cranberries versus Wensleydale with apricots will not be
addressed with this representation.
Problem 2: Use
Identify a set of actions in the domain that provide a simple
inventory of the kinds of things cheese can be used for. In
guiding this process, you should consider the questions and answers
above, as well as the questions and answers below:
-
Is there a mild blue cheese to serve in a cheese board?
Yes, for example Saga. Saga is a soft mild Danish blue cheese made
from Cow's milk. It is typically used as a table cheese.
-
Are blue cheeses used in cooking?
Yes, for example Gorgonzola. It is often used melted in sauces for
pasta and vegetables.
Describe your intended interpretation for these symbols. How well
do they exhaust the uses of cheese? (This is another way of asking what
assumptions they encode about cheese!)
Your simple inventory of uses of cheeses probably restricts the
design of the agent by simplifying the kinds of questions the agent can
usefully answer. To illustrate, consider the following questions.
Would it be easy to determine which category best fits a specific use of
cheese described by the user in an English text box? Would it be easy
to provide instructions for users to select, from a menu of your uses
of cheese, the categories that are likely to fit their needs?
Problem 2 Possible Answers
Here is a simple inventory of uses for cheese.
constant |
interpretation |
table |
cheese served cold, typically to be sliced and eaten with
crackers, bread, fruit and the like |
topping |
crumbled or grated and added atop things for added flavor
(as with salad, soups or pasta), typically outside the normal
process of cooking |
melted |
cooked with other things as an ingredient, for example in
cheese sauces or casseroles |
This inventory covers much of the ways cheese is prepared as a
food. However, there are lots of other things that might count as
using cheese, in which the cheese is not eaten by the person
who is using the cheese. Think of a question like What is a
good cheese to use in a mousetrap?
The representation is also particularly coarse. This makes it
hard to classify a use of cheese automatically into one group;
you'd need to know precise vocabulary both for actions and objects
to do that. What cheese is julienned in chef's salad? On
the other hand, the user of a system might have the extensive
knowledge required to do this; so for example they could read
simple descriptions of uses of cheese like those in the table above
and select the one that matched their needs.
Problem 3: Rules and representations
This question illustrates how the right choice of rules and
representations can make specifications of agents' knowledge bases much
more compact and enable agents to perform more interesting tasks. The
motivating question for question 3 is given below:
-
How does Stilton compare to Roquefort?
Both are soft blue cheeses. They have several differences,
however.
They differ in sharpness. Stilton is mellow; Roquefort is very
sharp.
They differ in kind. Stilton is a cow's milk cheese; Roquefort is
a ewe's milk cheese.
You often use them differently. Stilton is typically a table
cheese. Roquefort is typically used crumbled onto other food.
They differ in origin. Stilton is from Leicestershire, England;
Roquefort is from Aveyron, France.
Let's concentrate on the last bit. Apparently the system needs to
know that Leicester is distinct from Aveyron; represent this by the
statement
distinct(leicester,aveyron).
If there are n cheese regions, how many statements will be
needed to list all these facts?
Write two rules to eliminate some of these facts. Encode the
symmetry of distinctness: what Aveyron's being distinct from Leicester
tells you about Leicester's being distinct from Aveyron. Next, assume a
relation subregion that relates a cheese
region and the country that cheese region is part of. Use this to
encode what France's being distinct from England tells you about
Averyon's being distinct from Leicester. If you have n cheese
regions in each of m countries, how many facts will you need to
specify with these two rules?
Consider a ternary relation, represented by the predicate difference, which has three arguments: two kinds of
cheese and an attribute. It is true when the two cheeses have different
values for that attribute. Write a rule for inferring
difference(C1,C2,origin)
in terms of a predicate originOf relating a cheese and the
cheese making region in which the cheese is made and the predicate distinct which you defined earlier.
Read the discussion of the prop predicate
from CI page 182 and following. Rewrite your rule using prop(Cheese,origin,Region). Observe that origin can now be generalized to a variable Attribute to account for all the differences
illustrated in the example. Write a corresponding rule for inferring
that two cheeses have a similarity in an attribute.
Provide the knowledge base containing the rules for distinct,
difference, similarity, stilton and roquefort which allow the statements
of difference and similarity in the example to be proved. Use the
inventory and relations (defined as attributes) that you designed in
problems 1 and 2.
Problem 3 Possible Answers
With distinct(A,B) you need
n(n-1) statements to say that each place is distinct from
each other place.
You can cut that in half by adding the first rule:
distinct(A,B) :- distinct(B,A).
The second rule is this:
distinct(A,B) :-
subregion(A,L1),
subregion(B,L2),
distinct(L1,L2).
Now if you have m countries, you need only
m(m-1)/2 statements to conclude that each of them is
different. If you have n regions in each country, you need
for each country n(n-1)/2 statements to describe the
difference among regions within a country. And the rule you've
just written handles differences between regions in different
countries. So you have to add m(m-1)/2 + mn(n-1)/2
statements (in addition to any facts for subregion). Note that with an explicit
statement, you'd need mn(mn-1), so you've saved about a
factor of m!
The two rules for difference would be
difference(C1,C2,origin) :-
originOf(C1,R1),
originOf(C2,R2),
distinct(R1,R2).
and
difference(C1,C2,A) :-
prop(C1,A,R1),
prop(C2,A,R2),
distinct(R1,R2).
For similarity, you can use the same variables to denote
identical objects:
similarity(C1,C2,origin) :-
originOf(C1,R),
originOf(C2,R).
and
similarity(C1,C2,A) :-
prop(C1,A,R),
prop(C2,A,R).
|