Fuzzy Logic Controller Simulator

Classical logic forces every value into true or false, but real-world quantities like temperature rarely fall neatly into one category. This simulator builds a two-input Mamdani fuzzy controller step by step: crisp Temperature and Humidity readings are fuzzified against overlapping membership functions, a 3×3 rule base fires with a strength equal to the minimum of the two input memberships, the corresponding output sets are clipped and aggregated, and the result is defuzzified — by centroid or mean-of-maximum — into a single crisp fan-speed value. Drag the sliders or enable auto-sweep to see every stage of the pipeline update live.