PHPackages                             scorpion/scorpfuzzy-demo - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. scorpion/scorpfuzzy-demo

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

scorpion/scorpfuzzy-demo
========================

ScorpionFuzzy To Analysis Your Data

v1.0.0(4mo ago)10MITPHPPHP &gt;=8.2

Since Dec 28Pushed 4mo agoCompare

[ Source](https://github.com/AJ-King-hash/scorpionDemo)[ Packagist](https://packagist.org/packages/scorpion/scorpfuzzy-demo)[ RSS](/packages/scorpion-scorpfuzzy-demo/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

Scorpfuzzy-demo 🧠🔥
==================

[](#scorpfuzzy-demo-)

A modern, lightweight **Fuzzy Logic** library for PHP – perfect for building intelligent scoring systems, loyalty/ranking engines, or any application where decisions are based on **vague, uncertain, or partial truth**.

```
composer require scorpion/scorpfuzzy-demo
```

✨ Features
==========

[](#-features)

Mamdani-style Fuzzy Inference (Level 1) Fuzzy Classification with custom class labels (Bronze, Silver, Gold, Diamond, etc.) Fluent, chainable builder interface Easy input/output handling Built-in demo data &amp; real-world example (user ratings + payments → loyalty level) No external dependencies (pure PHP)

📊 Demo in Action
================

[](#-demo-in-action)

1. Fuzzy Logic Level 1 (Mamdani-style reasoning)

```
PHPuse FuzzyDesign\Recognizer;

$apps = [
    ['user_id' => 2,  'rating' => 5,  'amount_paid' =>  3000],
    ['user_id' => 19, 'rating' => 1,  'amount_paid' => 22000],
    ['user_id' => 22, 'rating' => 6,  'amount_paid' =>  4000],
    ['user_id' => 4,  'rating' => 6,  'amount_paid' => 20000],
    ['user_id' => 16, 'rating' => 10, 'amount_paid' => 33000],
    ['user_id' => 9,  'rating' => 9,  'amount_paid' => 27000],
    ['user_id' => 1,  'rating' => 12, 'amount_paid' => 34000],
    ['user_id' => 3,  'rating' => 8,  'amount_paid' => 50000],
    ['user_id' => 10, 'rating' => 10, 'amount_paid' => 80000],
];

$record = Recognizer::DriverRecognition('Lvl1', function ($fuzzyBuilder) {
    $fuzzyBuilder->get_study_input([
        'data'  => ['id' => 1, 'comments' => 500, 'payments' => 400],
        'data1' => 'comments',
        'data2' => 'payments',
    ]);

    $fuzzyBuilder->makeSystem();
    $fuzzyBuilder->makeSystem2();
    $fuzzyBuilder->makeTable();
    $fuzzyBuilder->get_study_output();

    return $fuzzyBuilder;
})->get();

echo $record['final_result'];  // e.g. 120.00 (defuzzified output)
```

2. Fuzzy Classification (Loyalty / Ranking System)

```
use Classifier\Classifier;

$classifier = Classifier::create('user_id', $apps, 'amount_paid', 'rating')
->perform(['bronze', 'silver', 'gold',"Diamond"]);
print_r($classifier);
```

Example Output:
===============

[](#example-output)

```
PHPArray
(
    [bronze] => Array
        (
            [2] => 0.931
            [22] => 0.903
        )
    [silver] => Array
        (
            [19] => 0.958
            [4]  => 0.760
            [16] => 0.475
            [9]  => 0.699
        )
    [gold] => Array
        (
            [1] => 0.436
            [3] => 0.752
        )
    [Diamond] => Array
        (
            [10] => 0.895
        )
)
```

🚀 Installation
==============

[](#-installation)

```
composer require scorpion/scorpfuzzy-demo
```

📋 Requirements
==============

[](#-requirements)

PHP ≥ 8.1 Composer

🛠️ Basic Structure
==================

[](#️-basic-structure)

```
scorpfuzzy-demo/
├── src/
│   ├── FuzzyDesign/
│   │   └── Recognizer.php
│   └── Classifier/
│       └── Classifier.php
├── composer.json
└── README.md
```

🧩 Roadmap
=========

[](#-roadmap)

Support for more membership functions (Gaussian, Trapezoidal, etc.) Sugeno inference engine Rule builder / visual editor (future) Laravel integration (optional service provider)

❤️ Contributing
===============

[](#️-contributing)

Pull requests are welcome! For major changes, please open an issue first.

📄 License
=========

[](#-license)

MIT License – use it freely.

Made with ❤️ by Ali Yazan Jahjah Happy fuzzifying! 🚀

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance76

Regular maintenance activity

Popularity2

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 92.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

132d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/fab90fd274c1b0d248c0ad2a1be0b841d64aba223bf422f9e15ef70e7a1d20ca?d=identicon)[AJ-King-hash](/maintainers/AJ-King-hash)

---

Top Contributors

[![Ali-hook](https://avatars.githubusercontent.com/u/138934107?v=4)](https://github.com/Ali-hook "Ali-hook (13 commits)")[![AJ-King-hash](https://avatars.githubusercontent.com/u/175537043?v=4)](https://github.com/AJ-King-hash "AJ-King-hash (1 commits)")

---

Tags

phplaravelaifuzzy

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/scorpion-scorpfuzzy-demo/health.svg)

```
[![Health](https://phpackages.com/badges/scorpion-scorpfuzzy-demo/health.svg)](https://phpackages.com/packages/scorpion-scorpfuzzy-demo)
```

###  Alternatives

[amranidev/laracombee

Recommendation system for laravel

11636.7k1](/packages/amranidev-laracombee)[wujunze/money-wrapper

MoneyPHP Wrapper

113.8k](/packages/wujunze-money-wrapper)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
