
#       Rules for "Dog vs Cat"
#
#
#       RATIONALE:
#
#       The problem is chasing a cat (if you are a dog).
#       Abstracted, the problem becomes a one-dimensional
#       tracking problem in the plane.
#
#       The dog will follow the classical pursuit path by
#       adjusting its azimuth in accordance with the relative
#       direction of the cat.
#
#       The actual rule base is simple:  Generate corrections
#       in direct proportion to the error.
#
#
#       SYSTEM VARIABLES:
#       
#       This one-dimensional problem has a single input
#       (TrackingError), and a single output (AzimuthAdjust).
#
#       TrackingError ranges from -180 to 180 (degrees).
#       AzimuthAdjust ranges from -45 to 45 (degrees).
#
#       Adjectives for the two variables have identical
#       characteristics except for scale. 
#
#
#       ASSUMPTIONS:
#
#       1.      The plane has a rectangular coordinate system.
#       2.      The location of the origin is immaterial.
#       3.      Positive angles are measured in the clockwise
#               direction.
#       4.      The preprocessor will produce a positive error signal
#               to induce a leftward correction, negative for a
#               rightward correction.
#       5.      The simulator will ADD the output signal to the
#               dog's current azimuth to get the new azimuth.
#
#       The assumptions matter since they define the basis for
#       interaction with other elements.  In view of assumption 4,
#       all participants must agree on the angle convention.
#
#
#       RULES:
#
#       Rules use five fuzzy sets.  Beyond that, they simply
#       track the input data.  The names of the fuzzy sets
#       are the same for both variables, but their meanings
#       depend on which one they are used with.  All are equally
#	important, so each has weight 1.0.
#

(1.0) If TrackingError is LargePositive
                        then make AzimuthAdjust LargePositive;

(1.0) If TrackingError is SmallPositive
                        then make AzimuthAdjust SmallPositive;

(1.0) If TrackingError is NearZero
                        then make AzimuthAdjust NearZero;

(1.0) If TrackingError is SmallNegative
                        then make AzimuthAdjust SmallNegative;

(1.0) If TrackingError is LargeNegative
                        then make AzimuthAdjust LargeNegative;

#
#       End of rules for Dog vs Cat tracking problem
#
