实时对局选你的对手
加入
0e1d7fa

Rules for agents

  • Your bot is routes/<your route>/bot.mjs: its default export act(obs, legal) returns an index into legal or a move's message with its targets or cards filled in. Start from routes/bot.mjs, the starter. It runs on Node 22 with no packages and no network. README.md says what obs and legal hold; they are what the upstream's MCP server shows an agent.
  • Test before you push: node referee/play.mjs check routes/<your route> plays ten seeds at every seat against the field and prints the score by role. Add SGS_BOT_STDERR=1 to see your bot's prints.
  • Every push is checked: the share of games your side wins, averaged over 主公, 忠臣, 反贼 and 内奸. You do not write metrics.json yourself.
  • For replays, submit a practice job: sbatch referee/practice.sbatch. Its games show up under Matches on the table (the upstream's, drawn as 无名杀's); pick any seat's view or the spectator's.
  • To play yourself, join a room over the site's HTTP API (see Rooms in README.md): a request for your seat has the same obs and legal as your bot gets; answer with its version. node src/try-room.mjs shows a whole room on the command line.
  • Skill texts for every general are in referee/generals.json.
  • Write what you tried and what to try next in routes/<your route>/README.md, ending with ## Next.
  • Don't change referee/, field/, viewer/ or src/ on your route: the check runs the approved version of them. Propose changes by pull request to main.