Skip to content

MemoS77/GrandGames-Arena-Bots-SDK

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GrandGames Arena Bots SDK

Extended Documentation

In english: readme_en.md

На русском: readme_ru.md

NPM Package

https://www.npmjs.com/package/gga-bots

Examples usage this SDK

Basic usage

npm i gga-bots
import { BotSDK, GameId } from 'gga-bots'
const sdk = new BotSDK()
sdk.connect(
  'YOUR_ARENA_TOKEN',
  [GameId.Chess, GameId.Chess960],
  // Optional parameters
  {
    // Default: false.  Allow to play with guests.
    allowGuests: true,

    // Default: true.  Allow to play with other bots.
    allowBots: true,

    // Default: true.  Allow to play in train mode with any user
    allowTrain: true,

    // Default: 1.  Maximum number of active tables.
    // Set 0 - if you don't want to create tables on arena. For example, when you develop a bot and want to test it only in train mode.
    maxTables: 2,
  },
)

sdk.onPosition<{ fen: string }>(async (p) => {
  if (p.needMove) {
    // ai - your AI implementation
    const move = await ai.getBestMove(p)
    await sdk.move(p.tableId!, move)
  }
})

Adapter for chess UCI engines, gomoku Gomocup engines, and other games

GrandGames Arena Universal Bots

Bot for rock, paper, scissors game

GrandGames Arena RPS Bots

Bot for islands game:

GrandGames Arena Islands Bot

About

Public SDK for conection to platform GrandGames Arena

Topics

Resources

Stars

Watchers

Forks

Contributors