承接 lucidtaz/minimax 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

lucidtaz/minimax

Composer 安装命令:

composer require lucidtaz/minimax

包简介

MiniMax engine for game decision making

README 文档

README

Build Status Scrutinizer Code Quality Code Coverage

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

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/.

统计信息

  • 总下载量: 26
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 4
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 4
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-05-09

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固