Quiz 3, Fuzzy Logic and Genetic Algorithms, November 14, 2007

Complete the following questions. Make sure that your handwriting is readable by someone who needs glasses. Make sure your answers are precise, to the point, and complete. Don’t make up things. Good luck. (200 points)

  1. What is your name, W number, and favorite movie. (16)

Part 1 – Fuzzy Logic

  1. Briefly iscuss the differences between Fuzzy and Crisp (Boolean) logic. (10)
  2. Given the graph below: (20)
  3. What are the fit vectors for the three fuzzy sets in the Wrastling Dudes universe of discourse?
  4. light weight
  5. middle weight
  6. heavy weight
  7. What is the universe of discourse for Wrastling Dudes.

  1. Make a hedge called “ludicrous” and calculate it for the heavyweight set at weights 140 to 220. Let ludicrous be equivalent to the (2nd power * 2)of an unmodified fuzzy set. Show your numbers and plot your answer on the graph above.
  2. Answer the questions about Jethro using the Wrastling Dudes universe of discourse.
  3. Jethro weighs in at 190 pounds.
  4. What is Jethros membership in the middle weight set?
  5. Heavy weight set?
  6. Ludicrously heavy weight sets?
  7. After Jethro finishes some vittles, he weighs 210.
  8. What is Jethros membership in the middle weight set?
  9. Heavy weight set?
  10. Ludicrously heavy weight sets?
  11. What are the steps in fuzzy inference? (12)
  12. Using fuzzy inference and the following rule set and data, determine how much Eli-May will eat after she wrestles a bear for some honey. That is, how many pounds of food will she eat after she wrestles the bear for 6 minutes. (50)

Rule 1:

IF wrestle_match is short

OR wrestle_match is average

THEN hunger is normal

Rule 2:

IF wrestle_match is long

THEN hunger is huge

Let OR ≈ Max

Let wrestle_match = 6 minutes (hint – you may have interpolate to get the degree of membership)

Wrestling Match time for Eli-May
short / average / long
time / deg. Mem / time / deg. Mem / time / deg. Mem
0 / 1 / 1 / 0 / 5 / 0
2 / 1 / 5 / 1 / 8 / 1
5 / 0 / 9 / 0 / 10 / 1

Fit Vectors for the above graph.

hunger
normal / huge
lbs of food / deg. Mem / lbs of food / deg. Mem
0 / 0 / 0.5 / 0
1 / 1 / 2.5 / 1
2 / 0 / 5 / 1

Fit Vectors for hunger graph.

hunger
normal / huge
lbs of food / deg. Mem / lbs of food / deg. Mem
0 / 0 / 0.5 / 0
1 / 1 / 2.5 / 1
2 / 0 / 5 / 1

·  Make sure and show what graph you are using the COG equation on.

COG ≈ ∑ab µA(x)x / ∑ab µA(x)

Part 2 – Genetic Algorithms

  1. Name the primary genetic operators used in the breeding process of the GA. (10)
  2. Suppose we have a computer that does not have much memory, and we are using a GA to solve a problem. How would we adjust the GA’s parameters in order to give a good chance of covering the solution space. Explain your answer. (22)
  3. Write some pseudo-code that implements the breeding function for the “Hunk” variant of the GA. Your function’s purpose is to breed a new population from the existing population. You can assume that the population has already been fitness tested and is ranked from most fit to least fit. You have access to the fitness of each individual. Below is the population member structure. (60)

struct population_member {

int score; /* Score of the individual. */

int cumulative sore; /* Sum of this score and previous scores. */

popData data;

};

  1. Dads are selected the same way they are in Elite (user specified pecentage – ie 20%, 40%, or what ever the user wants. Show your Dad selection routine.
  2. Candidate “Moms” fight over who is going to be with a selected “Dad” in order to create 2 kids, they use Roulette within a group selected by Elite, again with a user specified percentage. For example, a group of 10 “moms” would be picked using Elite and then the winning mom from that group would be picked using Roulette. Show your Mom selection routine.

4