PHPackages                             lucidtaz/minimax - 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. lucidtaz/minimax

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

lucidtaz/minimax
================

MiniMax engine for game decision making

0.2.0(8y ago)426[2 issues](https://github.com/LucidTaZ/minimax/issues)MITPHPPHP &gt;=7.0.0CI failing

Since May 11Pushed 6y ago1 watchersCompare

[ Source](https://github.com/LucidTaZ/minimax)[ Packagist](https://packagist.org/packages/lucidtaz/minimax)[ RSS](/packages/lucidtaz-minimax/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (2)Versions (3)Used By (0)

[![Build Status](https://camo.githubusercontent.com/1d2d799df284f8beab83638ec2b6793966d97fc59938483621a14e575b7f93ad/68747470733a2f2f7472617669732d63692e6f72672f4c7563696454615a2f6d696e696d61782e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/LucidTaZ/minimax)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/33baa72c3e6557f739979a954e61fbb62647d868033a926e824468f27f85eb5d/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f4c7563696454615a2f6d696e696d61782f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/LucidTaZ/minimax/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/487c70df58bb7feeaa3337e8eed032a5dd5e05e29b331de5f9df7e6fda806644/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f4c7563696454615a2f6d696e696d61782f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/LucidTaZ/minimax/?branch=master)

MiniMax engine in PHP
=====================

[](#minimax-engine-in-php)

This library provides easy integration of the MiniMax game decision making algorithm into your game, using a simple interface to separate the algorithm from the game logic.

Usage
-----

[](#usage)

To use this library, first make sure you implement each interface in `lucidtaz\minimax\game`.

Then, simply construct an instance of `lucidtaz\minimax\engine\Engine`, give it the `Player` to act as, and when it is the player's turn, call the `decide()`method. This will result in the `GameState` instance that results after the engine takes its move.

In code:

```
class MyPlayer implements \lucidtaz\minimax\game\Player
{
    ...
}

class MyGameState implements \lucidtaz\minimax\game\GameState
{
    ...
}

$player = new MyPlayer(...);
$engine = new \lucidtaz\minimax\engine\Engine($player);

$gameState = new MyGameState(...);

$newGameState = $engine->decide($gameState);
```

For an example, see the `tests/tictactoe` directory or any of the other sample game implementations in `tests/`.

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance10

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

Every ~441 days

Total

2

Last Release

3211d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9b20210b4ff98833690fc7ac576d9fdb18fac680ed758415267830bf3a8256f5?d=identicon)[LucidTaZ](/maintainers/LucidTaZ)

---

Top Contributors

[![LucidTaZ](https://avatars.githubusercontent.com/u/10195108?v=4)](https://github.com/LucidTaZ "LucidTaZ (18 commits)")

---

Tags

aialgorithmgameminimax

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/lucidtaz-minimax/health.svg)

```
[![Health](https://phpackages.com/badges/lucidtaz-minimax/health.svg)](https://phpackages.com/packages/lucidtaz-minimax)
```

###  Alternatives

[klepak/nova-dynamic-page-title

Dynamically updates Laravel Nova page title based on data from Vue router.

11154.8k](/packages/klepak-nova-dynamic-page-title)

PHPackages © 2026

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