โ—† Beta Gamer

Bots

Manage bots

Bots are tenant-owned identities that can be placed into the matchmaking pool or a specific session. Available for chess, checkers, connect4, and tictactoe.

POST/v1/bots

Registers a new bot for a game.

FieldTypeDescription
gamestringrequiredOne of the four bot-supported games.
namestringrequiredInternal label shown in your dashboard.
playerIdstringrequiredMust match an existing account ID in your own user system.
displayNamestringrequiredName shown to the human opponent in-game.
botTypestringrequiredalgorithmic or learned.
difficultystringif algorithmiceasy ยท medium ยท hard.
targetRatingnumberif learned3, 4, or 5 โ€” the grade the model is trained toward.
matchmakingWeightnumberoptionalRelative weight when several bots compete for a matchmaking fallback slot. Default 100.
retrainThresholdnumberoptionalGames played before a learned bot automatically retrains. Default 50.

GET /v1/bots?game=chess

Lists active bots registered for a game.

GET /v1/bots/:id

Fetches a single bot by ID.

PATCH /v1/bots/:id

Updates any bot field โ€” difficulty, weight, active state, and so on.

DELETE /v1/bots/:id

Deactivates a bot; it stops receiving matchmaking traffic.

Bot types

TypeBehaviour
algorithmicFixed-strength engine move at one of three difficulty presets.
learnedA per-grade move policy trained from your own tenant's recorded games, refreshed automatically once gamesSinceRetrain passes retrainThreshold.

Algorithmic difficulty presets (chess)

DifficultySearch depthBehaviour
easy1 ply~30% random moves, occasional blunders, responds in 0.5โ€“1.5s.
medium3 ply~15% suboptimal moves, responds in 1โ€“3s.
hard4 plyAlways plays the best move found, responds in 2โ€“5s.

Add a bot to a session

POST/v1/sessions/:id/bots?game=chess

Drops a bot into a specific pending session โ€” either a named bot you registered, or, if you omit playerId, one the service picks for you by matchmaking weight. If the session's room is already open in memory, the bot is injected live via the socket layer so play can start immediately.

FieldTypeDescription
playerIdstringoptionalOmit to let the service auto-select a bot by matchmakingWeight.
displayNamestringoptionalUsed only alongside a manual playerId.
botTypestringoptionalDefaults to algorithmic for a manual bot.
difficultystringoptionalDefaults to medium for a manual bot.
StatusMeaning
404Session not found, or (auto-pick) no active bots exist for that tenant + game.
409Session isn't pending, the player is already in it, or the room is already full.

Matchmaking fallback

Per game, you can configure how long the matchmaking queue waits for a human opponent before falling back to a bot.

GET /v1/bots/matchmaking-config?game=chess

Reads the current fallback configuration.

PATCH /v1/bots/matchmaking-config

Updates fallbackDelaySec and enabled for a game.

Request body โ€” PATCH

{
  "game": "chess",
  "fallbackDelaySec": 20,
  "enabled": true
}

When a bot is selected for fallback, one is chosen from your active bot roster in proportion to each bot's matchmakingWeight โ€” a bot with weight 200 is picked twice as often as one with weight 100.

Beta Gamer GaaS API โ€” questions? support@beta-gamer.com