Miarmy Crowd Simulation Documentation (English)

Fuzzy Logic

Miarmy is using the orthodox fuzzy logic theory. 

Reference from Wikipedia

 

In the world of fuzzy logic, there is no "True" or "False", because the boundary of "True" and "False" have been blurred. Instead, we called them "active". If true, it's 1.0 active, and if false, it's 0.0 active, between true and false, it's a float point value from 0.0 to 1.0 active, such 0.618 active.
Make an example and take a look at the pictures below, in regular logic, an input value is -80, the output should be "True", and another input value is -100, the output should be "False". But in fuzzy logic, the input values -80 and -100 are neither true nor false. Notice the slope in in the second picture, the input -80 get active value 0.667, and the -100 get the active value 0.333



Regular Logic: Red: False, Green: True



Fuzzy Logic: Red: 1.0 Active; Green: 0.0 Active; Gradient, 0.x Active


So our Miarmy system is full Fuzzy logic system implementation. And all the calculations are based on "Fuzzy Active" rather than "True/False", including sentence test, priority and node active test.
Look at an example:
This is regular logic we are talking about, something true, do 1, something false, do 2:

  1. IF hot, THEN turn on fan.
  2. IF cool (not hot), THEN turn off it.


Color means fan speed, the dark line is the temperature


Here we bring in a concept called "active", ranging from 0 to 1, please take a look at the picture below

  • IF false, THEN the active is 0
  • IF true, THEN the active is 1
  • IF the active value 0 and 1, THEN represent the true and false

Then, this it is fuzzy logic, it make the boundary blurred:


Color means fan speed, the dark line is the temperature

 

  1. IF cold, THEN turn off fan (theactivevalue is 0.0)
  2. IF a little bit hot, THEN turn on fan (theactivevalue is 0.2)
  3. IF hotter, THEN turn up fan (theactivevalue is 0.8)
  4. IF very hot, THEN turn up fan speed to max (theactivevalue is 1.0)




 

Basefount Technology