SPRING 2002
Problems :
1. Given the environment of you, the agent buying a coffee at a coffee shop, provide a PAGE (percepts, actions, goals, environment) description of this kind of an intelligent agent. Characterize the environment as being accessible, deterministic, episodic, static, and continuous or not. What agent architecture is best for this domain ?
Percepts :
Coffee Related :
Brand, Size, Price
Agent Related :
Amount of Money Available
Actions :
Obtain Coffee Information (Read, Ask)
Ask for a Clarification on Brand
Ask for a Clarification on Size
Ask for a Clarification on Price
Compare your budget with the price of the wanted
item
See if there other acceptable items
Compare your budget with the prices of other acceptable
items
Buy
Leave
Goal :
Get the preferred coffee brand in preferred size
if you can afford it or get another
brand or another size that is (are) acceptable (prise-wise
and taste-wise).
Environment :
Coffee shop with :
Other customers
Salespeople
Coffee
Price lists.
The environment is only partially accessible (complete
state of the environment is not known - availability of listed coffees,
for instance). It is deterministic (the agent's actions and the present
state fully determine the next state. Of course, this assumes that the
agent fully understands the clarifications and goes down the preferred
list in a deterministic manner (!!???!!!)). Then, the actions affect the
future state in a deterministic way. The environment is also episodic (the
agents experience is divided into episodes of dealing with particular issues
(brand, size, price, budget, ...)). The environment is dynamic because
it changes while the agent is deliberating (store may run out of agent's
favorite coffee). Finally, the environment is continuous time-wise, because
the time spans through the set of continuous values.
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.
(a) You are playing a planar tic-tac-toe game being an "O" player. You would like to (in decreasing order of preferrence) : (i) win it in as few moves as possible, or (ii) get a draw, or (iii) lose it in as many moves as possible.
Initial State : Tic-Tac_Toe Board
with one "X" on it &
Game in Progress Sign &
No "O" moves yet.
Goal Test : Game Over and
Game Report Indicating "O"'s Victory and Number of "O"'s Moves.
Operators : Put an "O" into
a free Cell
Path Cost : LostInd * (20-NumOfOMoves)
+ WinInd * 0.5 * NumOfOMoves + DrawInd * NumOfOMoves
Where LostInd, WinInd and DrawInd can be either 0 or 1 depending on the
status of the game.
(b) You are to mark each chick in a large group of chicks using the name of one of the four veterinaries who are known to be on duty. No two adjacent chicks should go to the same vet.
Initial State : No chick marked.
Goal Test : All chicks marked,
and no two adjacent chicks marked with the same vet's name.
Operators : Assign a vet's
name (mark) to a chick.
Path Cost : Number of assignments.
3. Represent the following sentences in First Order Logic using a consistent vocabulary (which you must first define) :
(a) There is pupil who does the homeworks for all first graders who don't do them themselves.
]x ( Pupil(x) && ( Vy ( (FirstGrader(y) && ! HomeworkDoer(y)) ==> HomeworkDoerFor(x, y) ) )
(b) There is a player who doesn't pass the ball to anybody except the players who he likes.
]x ( Player(x) && Vy (PassesBallTo(x, y) <==> (Player(y) && Likes(x, y)))
(c) Not all students who have good grades present their work well.
! Vx Vy ( Student(x) && GoodGrades(x) && WorkOf(y, x) ==> PresentsWell(x,y) )
(d) Not all students who present their work well have good grades.
! Vx Vy ( Student(x) && WorkOf(y, x) && PresentsWell(x,y)
==> GoodGrades(x) )
4.
What is considered ONTOLOGY for a knowledge base ? What
does the phrase GENERAL ONTOLOGY refer to in AI ? Give a brief example
of a domain requiring a very general ontology, as opposed to another one
requiring only a rather narrow one.
Finding a vocabulary for constants, functions, and relations is what's
usually refered to as ONTOLOGY. GENERAL ONTOLOGY is a theory of the representation
for a broad selection of objects and relations (usually encoded in FOL
but with more ontological committments). Grocery shopping world described
in class is a domain requiring a very general ontology, as opposed to the
digital circuits world that would be requiring only a rather narrow one.
5. Convert the following First Order Logic sentence into its Conjunctive Normal Form :
(a) Vx ( Practical(x) <==> ]y MakesPractical(y,x) )
( ! Practical(x) V MakesPractical(PracticalMaker(x), x)) && ( ! MakesPractical(z, x) V Practical(x) )
(b) Vx ( Vulnerable(x) <==> ]e ( Event(e) & MakesVulnerable(e,x) ) )
( ! Vulnerable(x) V Event (VulnerableMaker(x))) &&
( ! Vulnerable(x) V MakesVulnerable(VulnerableMaker(x), x))
&&
( ! Event(z) V ! MakesVulnerable(z, x) V Vulnerable(x) )
6. For each of the following atomic sentences give the most general unifier, if it exists :
(a) P(B,A,B), P(x,y,z)
x / B, y / A, z / B
(b) Q(w,G(A,B)), Q(G(v,v), w)
DOESN'T EXIST (w/G(v,v) and w/G(A,B), so v would have to be A and B at the same time).
(c) Younger(Son(y), y) Younger(Son(x), Mike)
x / Mike, y / Mike
(d) LivesNearby(Uncle(y),y) LivesNearby(x,x)
DOESN'T EXIST (x / Uncle(y), y / x / Uncle(y) ==>
x / Uncle(Uncle(y)) as well).
7.
The following is a knowledge base (its sentences numbered and described by Horn Clauses) :
(I)
| Joe is a good painter | 1. GoodPainter(Joe) |
| Ann is a extraordinary painter | 2. ExtraordPainter(Ann) |
| Extraordinary painters sell more paintings than good painters. | 3. Vx Vy ExtraordPainter(x) & GoodPainter(y)
==> SellMorePaintings(x,y) |
Provide a proof that Ann sells more paintings than Joe
. 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)
(AI) 2 and 1 :
ExtraordPainter(Ann) & GoodPainter(Joe)
(4)
(UE) 3 with x / Ann, y / Joe :
ExtraordPainter(Ann) & GoodPainter(Joe) ==> SellMorePaintings(Ann,
Joe) (5)
(MP) 4 and 5 :
SellMorePaintings(Ann, Joe)
(6)
(II)
| Joe is a lion | 1. Lion(Joe) |
| Ann is a zebra | 2. Zebra(Ann) |
| A zebra always stays away from a lion. | 3. Vx Vy Lion(x) & Zebra(y)
==> StaysAway(y,x) |
Provide a proof that Ann always stays away from Joe .
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)
(AI) 1 and 1 :
Lion(Joe) & Zebra(Ann)
(4)
(UE) 3 with x / Joe, y / Ann
: Lion(Joe) & Zebra(Ann)
==> StaysAway(Ann, Joe)
(5)
(MP) 4 and 5 :
StaysAway(Ann, Joe)
(6)
8. The following is a knowledge
base (its sentences numbered and described by First Order Logic clauses)
:
| Dilligent students make good grades | 1. Dilligent(x) ==>
MakingGoodGrades(x) |
| Non-dilligent students are relaxing students | 2. ! Dilligent(x) ==>
Relaxing(x) |
| Dilligent students are content | 3. MakingGoodGrades(x) ==>
Content(x) |
| Relaxing students are content | 4. Relaxing(x) ==>
Content(x) |
Provide a proof for Content(Joe). 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 Content(Joe) by proving that the knowledge base and the negation of Content(Joe) yield a contradiction.
The knowledge base in CNF :
| Dilligent students make good grades | 1. ! Dilligent(x) V
MakingGoodGrades(x) |
| Non-dilligent students are relaxing students | 2. Dilligent(x) V
Relaxing(x) |
| Dilligent students are content | 3. ! MakingGoodGrades(x) V
Content(x) |
| Relaxing students are content | 4. ! Relaxing(x) V
Content(x) |
Negated Content(Joe) in CNF :
| Joe is not content | 5. ! Content(Joe) |
(Res.) 1. and 2.
MakingGoodGrades(x) V Relaxing(x)
(6)
(Res.) 6. and 4.
MakingGoodGrades(x) V Content(x)
(7)
(Res.) 7. and 3.
Content(x)
(8)
(Res.) 8. and 5. with x / Joe
CONTRADICTION