Bot scaffold and build setup #11
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Question
Create the nimble project structure, folder layout, build configuration, and static OpenBLAS linking for the RL bot.
Blocked by #9 and #10
Resolution
Scaffold created at
PPO_Bot/with 6 files:PPO_Bot.nim— minimal bot: subclasses Bot,runloops ongo(), starts withstart(bot, botJsonPath). No RL logic yet.PPO_Bot.nimble— requires nim >= 2.0.0, tankroyale_botapi >= 1.0.0, arraymancer >= 0.7.0PPO_Bot.json— bot descriptor (gameTypes: classic, melee, 1v1; platform: Nim)PPO_Bot.sh— launcher scriptconfig.nims—switch("passL", "-lopenblas")+switch("threads", "on")shell.nix— NixOS dev shell providing OpenBLAS (only build dep not globally available)Build:
nix-shell --run "nimble build"produces a 760K binary.Weight directories (
weights/latest/,weights/checkpoint_1/2/3/) are created at runtime by the bot when first needed — no empty dirs in the repo.Static OpenBLAS linking is handled via config.nims + shell.nix. For deployment to non-NixOS machines, the binary links OpenBLAS dynamically by default; true static linking (--dynlibOverride + .a) is a future build concern.