A Visual Fuzzy Control Example


Let's now look at another example of fuzzy control using a tracking scenario. In a simple two-dimensional world, we have an agent that serves as the predator. Another agent in the world serves as the prey. The goal is to build a set of membership functions that provide the ability for the predator to track and ultimately catch the prey. Our membership functions will use the error angle for control (representing the difference between the predator 's current direction and the direction of the prey).

A plot of the predator membership function is shown in Figure 9.3. Seven distinct groups are defined that identify how much error is present and thus how much correction should be applied.

click to expand
Figure 9.3: Predator membership functions.

The center group is the only group in which no change is made to the current direction of the predator. Left and right are [+1, -1] respectively, far left and far right are [+8, -8], and finally extreme left and extreme right represent [+15, -15]. If the predator's error angle falls into a particular membership function, the associated correction is applied to the predator's direction and the process begins again. At each time step, the predator moves one unit for each correction.

Given the membership functions in Figure 9.3, a plot of the predator in action is shown in Figure 9.4.

click to expand
Figure 9.4: Predatory/prey example plot.

The predator begins at coordinates [100,100] where the prey begins at a random location (here, approximately [84,30]). The prey simply moves in a 45 ° line from its initial location. As shown, the predator correctly alters its course to intercept the prey (come within 5 units of the prey).




Visual Basic Developer
Visual Basic Developers Guide to ASP and IIS: Build Powerful Server-Side Web Applications with Visual Basic. (Visual Basic Developers Guides)
ISBN: 0782125573
EAN: 2147483647
Year: 1999
Pages: 175

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net