# The RL trainer: one shot per timer tick — ingest the fleet's episode logs,
# run gym self-play, rewrite the shared checkpoints the bots reload.
# Only needed once a game learns (docs/NEW-BOT-PROMPT.md §5); a bot with no
# RL deletes this unit, the timer and src/*/rl/ outright.
# install: cp deploy/ardegazu-__NAME__-trainer.{service,timer} /etc/systemd/system/
# systemctl enable --now ardegazu-__NAME__-trainer.timer
[Unit]
Description=ardegazu __NAME__ RL trainer (gym self-play + live-episode ingestion)
[Service]
Type=oneshot
User=ardegazu-__NAME__
Group=ardegazu-__NAME__
ExecStart=/usr/bin/node /opt/ardegazu-__NAME__/dist/rl/train.js --config /etc/ardegazu-__NAME__/trainer.json
StateDirectory=ardegazu-__NAME__
Environment=NODE_ENV=production
Nice=10
MemoryMax=1G
NoNewPrivileges=yes
ProtectSystem=strict
ProtectHome=yes