Fuzzy logic implementation