apigaming starter: every sample bot and bots/standby.py

Python 3.12 or newer and its standard library only: nothing to install.
Your bot's play key: sign-up shows it once on https://apigaming.com/start, in the command that runs the bot.
Lost it? /start, or the bot's page under /account, makes a new one.

Run one bot, in this folder:

  python3 -m bots.client bots.fourfall_greedy --key ag_... --url https://apigaming.com/v1 --practice 1 --games 1 --stay
  python3 -m bots.client bots.fourfall_single_greedy --key ag_... --url https://apigaming.com/v1 --practice 1 --games 1 --stay
  python3 -m bots.client bots.hex_bot --key ag_... --url https://apigaming.com/v1 --practice 1 --games 1 --stay
  python3 -m bots.client bots.breakthrough_bot --key ag_... --url https://apigaming.com/v1 --practice 1 --games 1 --stay
  python3 -m bots.client bots.tsp_bot --key ag_... --url https://apigaming.com/v1 --practice 1 --games 1 --stay
  python3 -m bots.client bots.racetrack_bot --key ag_... --url https://apigaming.com/v1 --practice 1 --games 1 --stay
  python3 -m bots.client bots.cube_bot --key ag_... --url https://apigaming.com/v1 --practice 1 --games 1 --stay
  python3 -m bots.client bots.snooker_bot --key ag_... --url https://apigaming.com/v1 --practice 1 --games 1 --stay
  python3 -m bots.client bots.trader_bot --key ag_... --url https://apigaming.com/v1 --practice 1 --games 1 --stay

On Windows, type py in place of python3.

Keep your bots ready: bots/standby.py plays every set they are in, in any game, and accepts the
private challenges addressed to them up to --max-stake (default 50):

  python3 -m bots.standby --keys my_keys.json --url https://apigaming.com/v1

my_keys.json is {"bots": {"MyBot": {"key": "ag_..."}}}, one entry per bot.
The command plays one free practice game against the house bot at level 1 (--practice 2 or 3 for a
stronger one), then stays connected (--stay) and plays the games you start for the bot in the lobby,
until Ctrl+C. Leave out --practice 1 to take an open lobby challenge, or post one, staked from the
bot's points. When no house practice bot is online the server answers practice_unavailable: the bot
says so in one line and, with --stay, waits for lobby games.

Files:
  apigaming/__init__.py
  apigaming/engines/__init__.py
  apigaming/engines/base.py
  apigaming/engines/btc_trader/__init__.py
  apigaming/engines/btc_trader/v1_0.py
  apigaming/engines/contract.py
  apigaming/engines/fourfall/__init__.py
  apigaming/engines/fourfall/bitboard.py
  apigaming/engines/registry.py
  apigaming/engines/schema.py
  apigaming/engines/snooker/__init__.py
  apigaming/engines/snooker/physics.py
  apigaming/engines/snooker/physics_v2.py
  apigaming/engines/snooker/v1_0.py
  apigaming/engines/tsp_duel/__init__.py
  apigaming/engines/tsp_duel/v1_0.py
  apigaming/engines/twist_cube/__init__.py
  apigaming/engines/twist_cube/cube.py
  bots/__init__.py
  bots/breakthrough_bot.py
  bots/client.py
  bots/cube_bot.py
  bots/fourfall_common.py
  bots/fourfall_greedy.py
  bots/fourfall_single_greedy.py
  bots/hex_bot.py
  bots/house/__init__.py
  bots/house_bots.py
  bots/racetrack_bot.py
  bots/randomness.py
  bots/snooker_bot.py
  bots/standby.py
  bots/trader_bot.py
  bots/tsp_bot.py

The files under apigaming/ are the pure-Python game helpers the bot imports from the platform's
engines (standard library only); they are not the platform.
