Вы находитесь на странице: 1из 9

# MIDTERM EXAM (ICS 661: Artificial Intelligence)

Student name:

## Fuzzy Expert Systems (25%)

1 2 3 4

a) (10%) Look at the above images, and define a weighted sum membership function for
the fuzzy set car. Then, calculate the degree of membership for each item shown.

Which features you use may vary, but here are some possibilities. These are all binary,
but you could define non-binary features (number of wheels, number of passengers, etc.)
as long as you make sure they are normalized in some way.

## W(x): Has four wheels.

P(x): Can carry passengers.
S(x): Can travel faster than 30 miles per hour, but no faster than 250 miles per hour.
E(x): Has a gasoline-fueled engine.

## µcar ( x) = 0.25 * W ( x) + 0.25 * P ( x) + 0.25 * S ( x) + 0.25 * E ( x)

Note that the min is 0 and the max is 1 – a necessary condition for a membership
function.

For each picture, this function gives a membership value as follows (in some cases I’m
1. 0+0+0.25+0.25=0.5
2. 0+0+0.25+0=0.25
3. 0.25+0.25+0.25+0.25=1
4. 0.25+0.25+0+0=0.5

Common mistakes:
1
www.murdoch.edu.au
2
www.ihpva.org
3
www.gotarifa.com
4
www.burtmountain.com
- Listing features, but not giving the membership function.
- Giving a function that could return values < 0 or > 1.
- Giving a function that is not a weighted sum.

b) (15%) The two graphs below represent the membership functions for strong_wind and
high_altitude. Use the rule:

## wind is strong_wind AND NOT altitude is very high_altitude  condition is

If the altitude is now 2500 feet and the wind is 22 knots, what is the degree of the current
membership in strong_wind membership in high_altitude

1
1

degree of membership
degree of membership

0.8
0.75

0.6
0.5

0.4
0.25

0.2
0
0
0

0
00

00

00

00

00

00

00

00
50
10

15

20

25

30

35

40

50
0 5 10 15 20 25 30
knots feet

The membership in strong_wind is 0.8, and the membership in high_altitude is 0.5. The
hedge function given in the textbook for “very” is to take the square of the hedged value,
so the membership in very high_altitude is 0.25. For NOT, you take the complement, so
the membership in not very high_altitude is 0.75. For AND, you take the minimum of the
two values (0.8, 0.75), so the final answer is 0.75.

Common mistakes:
- Missing the “very” hedge.
- Missing the “not”.
- Doing something other than take the minimum for the “and”.
Representation (10%)

interpretation.

## Loki loves food.

If spring break is rainy, Kim is sad.
Some cats love food.
All cats don’t love dogs.

## ∀X : food ( X ) →loves (loki , X ).

rainy ( spring _ break ) → sad ( kim ).
∃X , Y : cat ( X )^ loves ( X , Y ).
∀X , Y : cat ( X )^ dog (Y ) →¬loves ( X , Y ).

Note that there are a few other possibilities, and you could certainly use other

## food/1: The argument is something that an animal can eat.

loki: a very fat orange cat that lives in Kaneohe.
loves/2: The first argument feels a strong positive emotion towards the second argument.
rainy/1: The argument is a period of time during which there is liquid precipitation.
spring_break: a period of time in March or April when students do not have to attend
classes.
sad/1: The argument is a human or animal who is experiencing a negative, low-energy
emotion.
cat/1: The argument is a feline animal.
dog/1: The argument is a canine animal.

Common mistakes:
- Not providing an interpretation.
- Poor syntax: most commonly, making constants uppercase and variables lowercase.
- Trying to constrain variables in the interpretation. You cannot say, for example, that the
variable X can only refer to cats – that work must be done within the logic itself.
- Not quantifying variables when necessary.
- A minor problem, but one that was discussed in WebCT: It is best to handle categories
of objects (e.g. food), as opposed to specific objects (e.g. the cat Loki), by using a
predicate, rather than a constant.
Search (25%)

B C D

E F G H I J

K G L G
a) (15%) The above search space has the start node A, and the goal states are labeled G.
For each kind of search given below, give the order in which the nodes are searched, and
the first solution path found.

##  Depth first search

ABEKG(FLCGHDIGJ).
ABEG.

ABCDEFG(HIJKGLG).
ACG.

##  Depth first search with iterative deepening

AABCDABEFCG(HDIJABEKGFLCGHDIGJ).
ACG.

Common mistakes:
- The search path and the solution path are not the same thing. The solution path is the
route you would take to a solution once you have found it. So, even though the search for
depth first search with iterative deepening goes through a lot of nodes, the solution path is
only three nodes long.
- DFS with iterative deepening is iterative, which means that the search is repeated over
and over again, with a higher depth each time. So, some nodes (e.g. A) are searched over
and over again. Some people quite correctly said that the depth of the search need not be
increased by 1 each time (the increase could be 2 or some higher number), in which case
the search path given above would be different.

c) In the following search tree, the value at each node is the result of a heuristic
evaluation of that node. Low is good. In what order would best-first-search search this
tree (do not stop at G)? Hint: Use f(n) = g(n) + h(n). Show your work. (10%)
s t a r t

A : 4 B : 3 C : 5

D : 1 E : 7 F : 2 G : 9 H : 6 I : 8

Those of you that got this wrong didn’t really show your work, so it’s hard for me to say
what your mistakes were. Please review best first search in the notes. Note that g(n) is the
distance of n from the start node, so for A, B and C g(n) = 1, and for the rest of the nodes,
g(n) = 2.

## General Questions (20% - 5% each)

appropriately.

1. What was the central point of Searle’s thought experiment, the Chinese Room?
What is one possible response?
Mention:
- Searle believes that symbol manipulation is not sufficient for intelligence. In
particular, he believes that a program could pass the Turing Test, and still not
have any true understanding or intentionality.
- The Chinese Room is a Turing-Test passing, Chinese speaking program
reimplemented as a library with a non-Chinese-speaking man in it. The CR would
still pass the Turing Test, but Searle holds that it is evident that there is no real
understanding in it, because the man doesn’t speak Chinese.
- One possible response is known as the System Response, and it holds that the
entire system, not just the man who is acting as a central processor, has the
understanding. [There are several other possible responses.]

2. What kinds of problems are appropriate for expert systems? Give an example.
Mention:
- Reasoning over uncertain, imprecise or incomplete knowledge.
- Problems that typically require human expertise to solve.
- A human expert willing and able to provide knowledge.
- Tasks in which some explanation of the system’s reasoning would be helpful.

3. What are some ways of handling imprecision and uncertainty in an expert system?
What are the pros and cons of each?
Mention:
- Bayesian reasoning. Pro: mathematically sound. Con: Requires conditional
independence. Difficult to get accurate probability estimates from human experts.
- Certainty factors. Pro: Easier to get good estimates from human experts. More
tolerant of poor estimates. Con: Not as sound as Bayesian reasoning. Doesn’t
handle imprecision as well as fuzzy logic.
- Fuzzy logic. Pro: Handles imprecise language well. Can result in a smaller rule
base. Con: Difficult to create and tune membership functions.
4. How does Artificial Intelligence (AI) differ from non-AI computer science?
Mention:
- Kinds of problem considered would require intelligence in a human, often
involve imprecise, uncertain or incomplete knowledge. Problems are usually NP-
complete, and solutions are sufficient instead of optimal.
- Goals include building intelligent machines, but also understanding aspects of
human intelligence better by trying to replicate them in a program.
- Close relationship with fields such as cognitive science, philosophy, psychology
and linguistics.
Search in two-player games (20%)

α =7 7

β =7 7 1 3

7 8 1 6 3 5

4 7 2 8 1 6 5 1 3 4 5

1. The chart above shows part of the search space for a two-player game. The values
given in the lowest layer are heuristic evaluations of those states. Higher is better
for you. You go first.

a. Using minimax (no pruning), determine the minimax score for all of the
states shown, and write them into the empty boxes.
b. Draw a box around your first move.
c. Circle all the nodes that would be evaluated using alpha-beta pruning.
Draw a line through any branches that would be pruned.