Professional Documents
Culture Documents
R4
IF
THEN
IF
THEN
IF
THEN
IF
R5
THEN
IF
R6
THEN
IF
R7
THEN
IF
R8
THEN
IF
R9
THEN
IF
R10
THEN
IF
R11
THEN
IF
R2
R3
THEN
?x has hair
?x is a mammal
?x gives milk
?x is a mammal
?x has feathers
?x is a bird
?x flies
?x lays eggs
?x is a bird
?x is a mammal
?x eats meat
?x is a carnivore
?x is a mammal
?x has pointed teeth
?x has claws
?z has forward-pointing eyes
?x is a carnivore
?x is a mammal
?x has hoofs
?x is an ungulate
?x is a mammal
?x chews cud
?x is an ungulate
?x is a carnivore
?x has tawny color
?x has dark spots
?x is a cheetah
?x is a carnivore
?x has tawny color
?x has black strips
?x is a tiger
?x is an ungulate
?x has long legs
?x has long neck
?x has tawny color
?x has dark spots
?x is a giraffe
R12
IF
R13
THEN
IF
R14
THEN
IF
R15
THEN
IF
THEN
?x is an ungulate
?x has white color
?x has black stripes
?x is a zebra
?x is a bird
?x does not fly
?x has long legs
?x has long neck
?x is black and white
?x is an ostrich
?x is a bird
?x does not fly
?x swims
?x is black and white
?x is a penguin
?x is a bird
?x is a good flyer
?x is an albatross
Assume that the Zookeeper procedure is asked to chain backward from the following
hypotheses in the given order:
Ostrich
Penguin
Albatross
Then, consider the following facts about an animal, Splashy:
Splashy has feathers.
Splashy lays eggs.
Splashy does not fly.
Splashy is black and white.
Splashy swims.
Assume that nothing else is known to be true.
(a) Simulate Zookeepers behavior so as to determine what kind of animal Splashy is. Take
care to use the hypotheses in the specified order. Indicate your answer by showing what
is the sequence in which the rules are used, what each rule is trying to do, and whether
each rule succeeds.
(b) Rework the exercise in the previous part assuming that Splashy has long legs and a long
neck. The other properties are unchanged. Why is the result peculiar?
Q4. The following rules are given:
R1:
IF
?x is a bird
?x does not fly
?x has long legs
?x has long neck
?x is black and white
IF
?x has feathers
THEN ?x is a bird with a certainty factor of 0.8.
R3:
IF
?x flies
?x lays eggs
THEN ?x is a bird with a certainty factor of 0.9.
Q5. Figure Q5 shows the membership functions for fuzzy sets A and B.
x
1.0
-4
-1
x
1
Figure Q5
(a) Derive A x and B x as mathematical equations.
(b) Find the union and intersection of fuzzy sets A and B using the max and min operators,
respectively. Illustrate the membership functions and give the mathematical equations for
AB x and AB x .
Q6. A simple controller uses an error signal e and the change in the error signal de as inputs. It has
four rules:
R1: if e = P and de = P then y = N
R2: if e = P and de = N then y = Z
R3: if e = N and de = P then y = Z
R4: if e = N and de = N then y = P
There are two fuzzy sets for each of input variables e and de: P (positive) and N (negative). The
output fuzzy variable y has three values: P (positive), Z (zero), N (negative) with the
membership functions shown in Figure Q6. Assume that the input variables have the following
membership degrees in the input fuzzy sets:
N e 0.4; P e 0.6
N de 0.5; P de 0.5
y
N
1.0
y
-2.0
-1.0
1.0
2.0
Figure Q6
(a) Find the firing strength for each rule if the min operator is utilized for the AND operation.
(b) Assume that the min operator is used for the implication process. Show the combined
output fuzzy set if the max operator is utilized to aggregate the output fuzzy sets produced
by the fired fuzzy rules.
(c) Use (i) the middle-of-maximum method and (ii) the center-of-maxima method to obtain the
crisp output y.
Q7. Discuss the pros and cons of a large population size. In the case of a small population size, how
can we ensure that a large part of the search space is covered?
Q8. Use a genetic algorithm to find a solution to the following problem:
x 2 64; solve for x.
(1) Discuss the solution (chromosome) representation.
(2) Propose a sound fitness function for the problem.
(3) Suggest the selection, crossover and mutation operators for the problem.
Q9. Table Q9 shows a population of 10 individuals with their fitness values.
(a) Complete the missing columns of the table, selection probability and accumulated
probability.
(b) Assume that the following random number sequence is generated:
0.070, 0.54, 0.78, 0.45, 0.51, 0.29, 0.17, 0.27, 0.37, 0.85.
What individuals will be selected using the roulette wheel selection?
Individual
Chromosome
Table Q9
Fitness
Selection probability,
fi
Pi
8
5
9
1
2
3
0001100000
0101111001
0000000101
1001110100
10
5
6
1010101010
1110010110
17
6
7
8
9
10
1001011011
1100000001
1001110100
0001010011
15
19
10
14
Accumulated
probability
Q10. Consider a genetic algorithm using chromosomes represented by a vector of 4 integers. The
initial population of 6 individuals are shown in Table Q10.
Individual
1
2
3
4
5
6
Table Q10
Genotype
2, 4, 1, 2
3, 2, 2, 3
2, 5, 3, 1
3, 4, 2, 3
5, 2, 4, 3
6, 2, 3, 5
Fitness
100
200
300
400
450
550