Defining formula for fuzzy equation I'm learning fuzzy logic and more or less understand the basic concept, but i'm having a hard time understanding how to apply it to a method. I tried browsing online for explanation on how to use it, but only found some implementation and test case using the basic form of 4 rules and 3 variables, and 2 rules per variable. Anyway this is an example case, i will use Tsukamoto method.

In this case actually i have 6 rules and 3 variables with 3 rules ver variable, but i will only explain 1 of the variables because i think the rest will have the same solution. I have 3 variables one of them is "size", the range is for small it's 0-2 and for large it's 7-10. The current condition is size = 6.5. The rules is as follow(simplified to only use this variable):


[R1] size = small
[R2] size = medium
[R3] size = large


What i want to know is:


how do i define the formula for medium(the middle rule if the case is different)?
what if the rule is more than 3 (i.e. small, medium, large, ex-large)?


What i understands if the rule is only 2 i can use this formula


small[x]=(max-x)/(max-min)
large[x]=(x-min)/(max-min)


My current approach to this problem is as follow:

small[x]=1; x&lt;=2

medium[x]=(max-x)/(max-min); 2 &lt; x &lt; 7

large[x]=0; x>=7

Is this correct? Also can you refer me to some source to study this? As i mentioned before i can only find some implementation and basic explanation, it's either there is no online source for this or i don't know what to search for. Sorry if it's hard to understand i can edit and post the whole problem if you want, thanks in advance.

Extra question: what is the name of algorithm which can be used to solve the crossing bridge puzzle(the one with timer, max person, and stuff)?i forgot the name.
After i did a bit more study on this, i found this solution.



μsmall[x]


1; -> x≤0
(20-x)/(20-0); -> 0
0; -> x≥20


μmedium[x]


0; -> x≤20 or x≥70
(x-20)/(45-20); -> 20
(70-x)/(70-45); -> 45


μlarge[x]


0; -> x≤70
(x-70)/(100-70); -> 70
1; -> x≥100


For the final result i need to add 3 more rules for the function to work. So it become 9 rules and 3 variables, with 3 rules for each input variables.

To answer both of my question:


Add a triangle graph and use the formula.
Add a triangle graph for each rules.


What i learn from this is the total rules needed to determine the output is the number of input variables rules multiplied(i.e. v1 = 3 rules, v2 3 rules, total rules = 3x3=9 rules). And i'm not really sure about this one but you can combine multiple kind of graphs.