prokki/warlight2-bot-template
Composer 安装命令:
composer require prokki/warlight2-bot-template
包简介
Bot template for Warlight AI Challenge 2
关键字:
README 文档
README
This is a php bot template for Warlight AI Challenge 2 (http://theaigames.com/competitions/warlight-ai-challenge-2).
Note: The project is in beta stage. Feel free to report any issues you encounter.
Installation
Composer
Create a new project and install the template via Composer using the following command:
composer require prokki/warlight2-bot-template
Usage
Create Your Own Bot
Create your own bot by inherit from the Prokki\Warlight2BotTemplate\AIBot class. To ensure the bot is responding correctly the class has to implement the Prokki\Warlight2BotTemplate\Bot\AI interface.
Following methods has to be overridden:
use Prokki\TheaigamesBotEngine\Bot; class AIBot implements Bot, AI { /** * Returns the pick move of the region to pick. * * These moves are going to build the response to the request `pick_starting_region` - see {@see \Prokki\Warlight2BotTemplate\Command\PickStartingRegionCommand}. * * @param integer[] $region_ids * * @return PickMove|null */ public function getPickMove($region_ids) { // put your code here } /** * Returns all place moves. * * These moves are going to build the response to the request `go place_armies` - see {@see \Prokki\Warlight2BotTemplate\Command\GoPlaceArmiesCommand}. * * @return PlaceMove[] */ public function getPlaceMoves(); { // put your code here } /** * Returns all attack and transfer moves. * * These moves are going to build the response to the request `go attack/transfer` - see {@see \Prokki\Warlight2BotTemplate\Command\GoAttackTransferCommand}. * * @return TransferMove[]|AttackMove[] */ public function getAttackTransferMoves(); { // put your code here } }
Customize Game Classes
To add heuristic data, static data or other custom data for your invincible bot, you can add custom classes to manage additional information. But instead of adding extra classes the bot engine provides a better way to add custom information for your bot: You can extend game related base classes with own properties and methods.
The \Prokki\TheaigamesBotEngine\Game\EnvironmentFactory implements the factory pattern to create all game
related objects with one class. Overriding this class gives you the power to use custom classes with custom
properties.
Take a look to example Prokki\Warlight2BotTemplate\Example\StupidRandomBot for further information.
Links
- Game challenge page: http://theaigames.com/competitions/warlight-ai-challenge-2
- Game source: https://github.com/theaigames/warlight2-engine
- Game viewer to visualize/play a (compatible) game: https://github.com/kefik/conquest-engine-gui
prokki/warlight2-bot-template 适用场景与选型建议
prokki/warlight2-bot-template 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 19 次下载、GitHub Stars 达 1, 最近一次更新时间为 2017 年 02 月 17 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「Challenge」 「conquest」 「ai」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 prokki/warlight2-bot-template 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 prokki/warlight2-bot-template 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 prokki/warlight2-bot-template 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Challenge/response spambot protection for ext:form - Challenge/response spambot protection for TYPO3 ext:form - Adds a hidden input field containing a challenge string to forms. Client must execute included JavaScript to calculate the expected response.
Illuminate — Bi-Tech Senior Laravel Hiring Challenge
A bot engine to create bots for various games on http://theaigames.com/.
Tool to automatically elect the Coder of the Month based on the Git commits within your team.
Code optimization challenge for PHP developers
This is my package flash
统计信息
- 总下载量: 19
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 4
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-02-17