HomeAlgorithms & AIFuzzy Logic Controller

Fuzzy Logic Controller Simulator

Interactive fuzzy inference simulator: fuzzify temperature and humidity into membership degrees, watch a Mamdani rule base fire, and see the aggregated output defuzzified into a crisp fan-speed value.

Algorithms & AI2DEasy60 FPS📱 Mobile-adapted⇄ 3D version
fuzzy-logic ↗ Open standalone

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.

⚙ Under the hood

This simulation displays a two-input Mamdani fuzzy controller with membership functions and a 3x3 rule base that is fired using min-AND logic before centroid defuzzification.

fuzzy logiccontrol systemsrule-based systems

2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)