← Back to portfolio
Interactive companion · A Practical Fuzzy Logic Introduction

The Fuzzy Logic Playground

Drag the weather, watch the whole pipeline think. Fuzzify the inputs, fire the rules, infer an output, then defuzzify to one crisp driving speed — and see the car actually go. Poke everything.

μ0 → 1 — truth comes in shades here
1 Fuzzify
2 Rules
3 Infer
4 Defuzzify

🎯 Guided Challenge learn by doing

Seven quick missions that march you through the whole pipeline — overlap, certainty, rule firing, hitting a target, rewriting rules, conflict, and method spread. Solve each by playing with the controls below.

Sense the world inputs

Two crisp sensor readings go in. Each one belongs to several fuzzy words at once.

Drive! crisp output

The defuzzified speed sets the dial — and the little car drives it for real.

0mph
via Centroid defuzzification
Stage 1 — Fuzzification: numbers → words

Temperature

°F

Cloud cover

%

Speed (output)

mph

Stage 2 — The rule matrix (click a cell to change or switch it off)

IF cover AND temp → speed AND = min

Each cell is a rule. It fires as strongly as its weakest condition. Cells glow live; click to cycle FastSlow → Off.

Firing strength = min( μ(cover) , μ(temp) ). Only firing cells shape the output. Try switching off the cell that's glowing brightest and watch the speed drop.
Stage 3 — Inference & aggregation: build the output shape

The aggregated fuzzy output OR = max

Each firing rule clips its output word at its strength. Stack them and take the upper envelope — that grey shape is what we must turn into one number.

Slow (clipped) Fast (clipped) Aggregated envelope Selected defuzzified speed
Stage 4 — Defuzzification: collapse the shape to a number

Pick a method, change the answer step 6

Same fuzzy output, different philosophies of "the answer." Switch methods and watch the gold marker — and the car — jump.

Built as a hands-on companion to A Practical Fuzzy Logic Introduction · © 2025 Mohd Nor Akmal. Mamdani inference · min/max operators · drag, click, and experiment freely.