Fuzzy Logic: Theory, Math & 3D Simulation

Beyond Black and White

"The universe is not built on absolute zeros and ones, but on infinite degrees of possibility. Fuzzy logic empowers machines to embrace the beautiful, nuanced ambiguity of human intuition."

1. Fuzzy Logic Theory

Crisp vs. Fuzzy Sets

In classical (crisp) logic, an element either belongs to a set or it doesn't (1 or 0). In Fuzzy Logic, elements have a degree of membership ranging from 0.0 to 1.0. You might be 0.8 "Tall" and 0.2 "Average".

Mamdani vs. Sugeno

  • Mamdani: Output is a fuzzy area/shape. Great for human intuition.
  • Takagi-Sugeno: Output is a crisp number (singleton). Computationally efficient for control systems.

2. Math Model & Curves

Membership Functions available in the engine

Triangle

μ(x) =
0, if x ≤ a
(x-a)/(b-a), if a < x ≤ b
(c-x)/(c-b), if b < x < c
0, if x ≥ c

Trapezoid

μ(x) =
0, if x ≤ a or x ≥ d
(x-a)/(b-a), if a < x < b
1, if b ≤ x ≤ c
(d-x)/(d-c), if c < x < d
NEW

Gaussian (Bell)

Smooth curve driven by center (c) and standard deviation (σ). Ideal for AI.

μ(x) =
e - ½ ( (x - c) / σ )²

3. Ultimate Sandbox Explorer

Now supporting Gaussian Curves & Custom Variable Editor

Load Pre-defined Scenario

Description loads here.

Inference Engine

Active Challenge #1/2

Task definition loads here...

Crisp Inputs

010
010

Curve Editor Mode:

The graphs on the right are Interactive! Click and drag the points to manually change definitions (bounds & Gaussian width).

Input 1 (µ)

Drag to edit!

Input 2 (µ)

Drag to edit!

Dynamic Rule Builder

Aggregated Output (Mamdani)

Output sets are draggable!
Final Output
15.0 😐
Math Behind the Scenes:
Student Data Practice Mode v3.0

CSV Practice Lab

Download a template, add real student data, validate it, run fuzzy simulation in batch, and visualize the results.

1. Download
Use the active scenario template.
2. Practice
Try the sample dataset first.
3. Validate
Check numbers and value ranges.
4. Export
Download results for assignments.
Rows
0
Valid / Invalid
0 / 0
Average Output
-
Dominant Label
-
AI Tutor Mode v3.0

AI Tutor Explanation Lab

Generates student-friendly explanations from the active fuzzy rules. This version works locally without API connection.

Explanation

Active Rules

Study Questions

    Common Mistakes

      CSV Guidance

      Student Assignment Mode v3.0

      Student Assignment Lab

      Convert CSV practice into a complete classroom submission with identity, instructions, reflection answers, rubric, and printable HTML report.

      Student Identity

      Assignment Instructions

      Simple Rubric

      Student Reflection Questions

      Classroom workflow: teacher defines the scenario → student downloads template → student uploads CSV → app validates and analyzes data → student answers reflection questions → student downloads submission report.
      Research Mode v2.5

      Research Methodology Lab

      Generate methodology text, membership-function tables, rule-base tables, and thesis/article appendices from the active fuzzy model.

      Active Model
      Load or generate a scenario first.
      Suggested Use
      Thesis method section, article appendix, classroom lab sheet, or fuzzy model documentation.
      Academic Note
      Review the generated text and adapt it to your research design, data source, and journal style.

      Methodology Draft

      Editable after export
      Click “Generate” to create a methodology paragraph and model documentation from the active scenario.

      Membership Function Table

      Rule Base Table

      Teacher Panel v3.0

      Custom Scenario Builder

      Create a classroom case, auto-generate membership functions, export JSON, and share it with students.

      Case Identity

      Variables

      Logic Pattern

      Teaching workflow: build a scenario → apply it → download CSV template/sample → ask students to upload their real data → export results/report. The exported JSON can be shared so all students use the same fuzzy model.
      Classroom Package Mode v3.0

      Classroom Package Lab

      Package the active fuzzy scenario, assignment instructions, reflection questions, grading rubric, and CSV template into one shareable classroom kit.

      Package Preview

      Click Preview Kit to review the complete classroom package before sharing it with students.

      Teacher Workflow

      1. Choose or build a fuzzy scenario.
      2. Write assignment instructions.
      3. Export the JSON kit and CSV template.
      4. Ask students to import the kit and upload data.
      5. Collect HTML submission reports.
      LMS & Portfolio Mode v3.0

      LMS Submission & Student Portfolio Lab

      Prepare student work for LMS submission, portfolio evidence, and teacher archiving using one clean export package.

      Portfolio Preview

      Click Generate Preview after running CSV analysis and completing the assignment form.

      Suggested LMS Submission

      1. Student report HTML or PDF.
      2. Result CSV from the batch simulation.
      3. Portfolio evidence HTML.
      4. Teacher grading manifest, if collected in class.
      Note: The verification text is a local integrity note, not a blockchain or official certificate.
      Full Product Edition v3.0

      FuzzyLearn Project Dashboard

      Final quality-check center for classroom use: review readiness, package student evidence, and prepare a clean submission bundle.

      Readiness Dashboard

      Not checked yet
      Click Check Readiness to evaluate the student workflow.

      Final Submission Checklist

      • □ Student identity completed
      • □ CSV uploaded and validated
      • □ Fuzzy batch analysis generated
      • □ Reflection answers completed
      • □ Report and portfolio exported

      Student Deliverables

      Recommended submission: student report HTML/PDF, result CSV, portfolio HTML, and reflection answers.

      Research Evidence

      Export methodology, membership function table, rule base table, analytics summary, and appendix.

      Classroom Package

      Teachers can distribute one JSON kit so every student uses the same scenario, rule base, and assignment task.

      3D Decision Surface

      Maps all possible combinations of Input 1 & Input 2 to the resulting Output. Rotates and updates dynamically!

      Take it to the real world! Export your dynamic rules and dragged shapes directly into a ready-to-run Python script.

      Interactive Fuzzy Logic Sandbox & 3D Simulation.

      By Muhammad Ghalih