Commit Graph

8 Commits

Author SHA1 Message Date
d1918fed10 feat(mobile): offer games against the bot
The lobby offers the bot levels after 10 seconds without an opponent, the
home screen has Play with bot, the bot is shown with its level, and a new
game after a bot game is one at the same level.
2026-10-16 14:23:22 +03:00
e66c4a3a41 feat(frontend): offer games against the bot
The lobby offers the bot levels after 10 seconds without an opponent, the
home page has a Play with bot menu, and a game against the bot ends with
Play again at the same level.
2026-10-16 14:22:04 +03:00
32d1ec98e7 feat(core): add bot levels, the bot game channel and bot names
getPlayerDisplayName shows the bot as e.g. "Bot · Medium" from its id.
2026-10-16 14:21:06 +03:00
4a018c7b53 feat(backend): save how the bot played
Saved games against the bot keep the bot's level, strength and seed in a new
bot column, so the levels can later be tuned from real games.
2026-10-16 14:19:56 +03:00
f0b75e5cee feat(backend): play games against the bot
new_bot_game starts a game against the bot at the chosen level and ends the
search for an opponent. BotPlayer works out the bot's moves on its own thread
pool and plays them on the game loop after the previous move's animation and a
thinking time. Bot games keep their settings across restarts.
2026-10-16 14:18:45 +03:00
31b51d04af feat(backend): choose bot moves by strength
Negamax with alpha-beta on Position scores every move; the strength sets the
depth, the softmax temperature and the chance of a random move. The levels
are ranges of strengths drawn per game. A calibration tournament checks that
each level beats the one below.
2026-10-16 14:18:00 +03:00
f9a96fc5f5 feat(backend): add a compact board for searching moves
Position keeps the board as 14 stone counts and plays the Mangala rules on
it without allocating. Tested against MancalaGame with the recorded games and
random games.
2026-10-16 12:47:32 +03:00
91577c0898 docs(game-bot): add the spec
Requirements, design and tasks for playing against a bot with four levels
and a strength drawn per game.
2026-10-16 12:46:20 +03:00