![]() |
|||||||||||
|
|||||||||||
|
1. FuzzyLogicThis page describes the FuzzyLogic syntax and semantics as used in the Pyro system.
self.IF( FUZZYVALUE, CONTROL, AMOUNT [, NAME])
where FUZZYVALUE is a floating point value between 0 and 1. CONTROL is any motor name passed to the BehaviorBasedControl system, amount is the amount you wish to set the motor to, and NAME is an optional name for the rule. Name is useful for debugging as the name will show up in the brain view. An example:
self.IF( .4, 'translate', .8, 'Rule1')
This might read: "This rule (named Rule1) is only somewhat true (0.4 out of 1.0) so I won't go forward nearly full speed (set translate to .8) that I would if this were more true." Often, you want to compute the FUZZYVALUE based on some criteria, for example, how close you are to a wall. For this you can use the FuzzyClass. You can use & | ! operators, which having the meanings and, or and not, respectively.
Related topics: Go here for full search functions ViewWiki | EditWiki | Webmaster@wiki.cs |