CS470/570
Artificial Intelligence
Spring 2008
Project #4
Due: Tuesday May 6th (Final Exam)

For this project you need to modify the Fuzzy Logic rules of a moonlander so that it can safely land under a variety of conditions.

Rules: The lander must be going less than a minimum safe velocity to land successfully. (Note that all units in the program are arbitrary.) The velocity is controlled by firing rockets. At each time step the velocity and postion of the lander is updated based on the gravitational ACCELERATION, current velocity, and rocket burn (if any is selected). There is a random factor built into these updates to reflect variable rocket burn, turbulance, etc.

The lander has a limited amount of fuel, which is used up during rocket burns.

When the program is intialized a random initial velocity is chosen along with a random gravitational acceleration (e.g. a random moon or planet).

Fuzzy Controller: Here is the current program, lander header file, and fuzzy header file to get you started. You may modify the program, or rewrite it in another language, but please pay attention to how the velocity, accleration, and initial values are calculated - these should remain the same. E.g. you should only modify the fuzzy controller and the output (if desired).

The lander currently has a fuzzy controler to determine rocket burns. It currently uses the following inputs:
height - which is divided into the fuzzy sets high, medium, and low.
speed - which is divided into the fuzzy sets slow and fast.
And the output is:
burn - which is divided into noburn, slowburn, and fastburn.
The outputs are combined in weighted average to determine the rocket burn at each timestep.
Note that the remaining amount of fuel and the gravitational acceleration are not included in the controller. As a result it often fails to land successfully.

Tasks: You have two tasks. One, systematically compare several different fuzzy controllers. Two, improve the fuzzy controller so that the lander lands safely as often as possible. Specifically you need to do the following:

  1. Include at least one, and possibly two, more fuzzy inputs: gravitational accleration and/or fuel remaining.
  2. Try at least one other method of defuzzifying the outputs. Taking the max of the three burn options (noburn, slowburn, fastburn) instead of the weighted average would be one option.
  3. Collect data, through repeated trials, on how well some of the different controlers you are testing work. E.g. you could keep track of the number of successful landings out of 100.
  4. There are other modifications you may try. Changing the current fuzzy sets, e.g. instead of speed being slow or fast, you could try slow, medium or fast. Changing the fuzzy rules, e.g. instead of high AND slow means no burn, high OR slow means noburn. Changing the shape of the fuzzy sets, e.g. instead of triangle sets try Gaussian sets.

Hand-In:

You need to hand in a typed write-up containing the following:
  1. An abstract summarizing what you did and what the results were.
  2. An introduction explaining the basics of fuzzy logic.
  3. An algorithm section explaining your fuzzy controlers. There should be at least two that you systematically tested. Include in your descriptions:
    1. What were the fuzzy inputs, and what were their fuzzy sets.
    2. What were the outputs and how were they defuzzified.
  4. A results section. Including,
    1. A data section comparing the reseults of the two (or more) fuzzy controllers.
    2. A discussion of how the controlers behaved. Did they have any specific strengths or weaknesses? E.g. one was better in low gravity conditions.
  5. A conclusion section.