Macao is a simple framework that allows the addition of powerful game AI to your JavaScript game with minimal configuration and coding.
Perhaps:
Macao is a simple framework that allows the addition of powerful game AI to your JavaScript game with minimal configuration and coding. It is based on the powerful, yet simple, Monte Carlo Tree Search algorithm. Macao makes it possible for you to add AI to your game, even if you are a bad player and don't understand the strategy. All you need to know are the rules of the game, that's it, and that's all Macao needs to know in order to work it's magic.
Although we plan to quickly expand the types of games it supports, at the moment Macao is compatible with two player, turn-based, perfect information, deterministic games. Well, that was a mouthful. Basically this means that it should work with any game similar to Chess, Checkers, Tic-Tac-Toe, Nine Men's Morris etc.
import { Macao } from "macao";
// Functions that implement the game's rules.
// These functions are provided by you.
const funcs = {
generateActions,
applyAction,
stateIsTerminal,
calculateReward
};
const config = {
duration: 30
// ...
};
const macao = new Macao(funcs, config);
// Somewhere inside your game loop
const action = macao.getAction(state);
For more indepth information on how to use Macao, please see the general documentation.
npm install macao --save
You can read the general documenation here.
You can read the API documentation here.
Please take a look at our contributing guidelines if you're interested in helping!
See CHANGELOG.md
Macao is provided under the MIT License.