PHPackages                             prokki/warlight2-bot-template - 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. prokki/warlight2-bot-template

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

prokki/warlight2-bot-template
=============================

Bot template for Warlight AI Challenge 2

0.4.0(9y ago)119MITPHPPHP &gt;=5.4

Since Feb 17Pushed 9y ago2 watchersCompare

[ Source](https://github.com/prokki/warlight2-bot-template)[ Packagist](https://packagist.org/packages/prokki/warlight2-bot-template)[ Docs](https://github.com/prokki/warlight2-bot)[ RSS](/packages/prokki-warlight2-bot-template/feed)WikiDiscussions master Synced 4w ago

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

Warlight2BotTemplate
--------------------

[](#warlight2bottemplate)

[![License](https://camo.githubusercontent.com/59497bc4563dd468e37bbf539439e60cacf196f537f678b721a8efabf21c64ef/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d626c75652e7376673f7374796c653d666c6174)](https://github.com/prokki/warlight2-bot/blob/master/LICENSE)[![Packagist](https://camo.githubusercontent.com/266b151c685b11d697f7d2dd7a4c107cacb93e90a42d81d4eb1d8289ff44d5df/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5061636b61676973742d302e342e302d626c75652e7376673f7374796c653d666c6174)](https://packagist.org/packages/prokki/warlight2-bot-template)[![Minimum PHP Version](https://camo.githubusercontent.com/eafd61f3b3a049492231eb240d2e1245bb4eade25a11b6ff0f17ee4dc97926b5/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d253343253344352e362e31332d3838393242462e737667)](https://php.net/)

This is a php bot template for Warlight AI Challenge 2 ().

> Note: The project is in beta stage. Feel free to report any issues you encounter.

### Installation

[](#installation)

#### Composer

[](#composer)

Create a new project and install the template via Composer using the following command:

```
composer require prokki/warlight2-bot-template

```

### Usage

[](#usage)

#### Create Your Own Bot

[](#create-your-own-bot)

Create your own bot by inherit from the [Prokki\\Warlight2BotTemplate\\AIBot](src/AIBot.php) class. To ensure the bot is responding correctly the class has to implement the [Prokki\\Warlight2BotTemplate\\Bot\\AI](src/AI.php) 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

[](#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](examples/StupidRandomBot/src/StupidRandomBot.php) for further information.

### Links

[](#links)

- Game challenge page:
- Game source:
- Game viewer to visualize/play a (compatible) game:

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity53

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 ~4 days

Total

7

Last Release

3395d ago

PHP version history (3 changes)0.0.1PHP &gt;=5.6.0

0.1.0PHP &gt;=5.6.13

0.1.2PHP &gt;=5.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/53d7b96b1c455fca0c2900a162ddfe96df516c81f20db1847d88be9f0345e425?d=identicon)[prokki](/maintainers/prokki)

---

Top Contributors

[![prokki](https://avatars.githubusercontent.com/u/5040666?v=4)](https://github.com/prokki "prokki (46 commits)")

---

Tags

aiconquestChallenge

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/prokki-warlight2-bot-template/health.svg)

```
[![Health](https://phpackages.com/badges/prokki-warlight2-bot-template/health.svg)](https://phpackages.com/packages/prokki-warlight2-bot-template)
```

###  Alternatives

[rubix/ml

A high-level machine learning and deep learning library for the PHP language.

2.2k1.5M28](/packages/rubix-ml)[codewithkyrian/transformers

State-of-the-art Machine Learning for PHP. Run Transformers in PHP

757254.8k7](/packages/codewithkyrian-transformers)[maestroerror/laragent

Power of AI Agents in your Laravel project

639142.5k](/packages/maestroerror-laragent)[cognesy/instructor-php

The complete AI toolkit for PHP: unified LLM API, structured outputs, agents, and coding agent control

318117.1k1](/packages/cognesy-instructor-php)[symfony/ai-platform

PHP library for interacting with AI platform provider.

521.2M216](/packages/symfony-ai-platform)[ardagnsrn/ollama-php

This is a PHP library for Ollama. Ollama is an open-source project that serves as a powerful and user-friendly platform for running LLMs on your local machine. It acts as a bridge between the complexities of LLM technology and the desire for an accessible and customizable AI experience.

21074.5k](/packages/ardagnsrn-ollama-php)

PHPackages © 2026

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