Skip to content

Conversation

@relh
Copy link
Contributor

@relh relh commented Jan 18, 2026

Add CogsguardTeacherPolicy for Cogsguard Agents

This PR introduces a new CogsguardTeacherPolicy that wraps the Cogsguard agent policy and forces agents to adopt specific vibes at the beginning of each episode. The policy cycles through available vibes for each agent, ensuring they take on different roles across episodes.

Key additions:

  • Created CogsguardTeacherPolicy that delegates to CogsguardAgentsMultiPolicy after forcing an initial vibe
  • Implemented CogsguardAgentsMultiPolicy that uses the new Nim-based CogsguardPolicy
  • Added Nim implementation of Cogsguard agents with specialized behaviors for different roles:
    • Miners gather resources and deposit them at hubs
    • Scouts explore the map to discover new areas
    • Aligners convert neutral depots to friendly ones
    • Scramblers target enemy depots

The policy tracks episode state to ensure vibes are only forced at the beginning of each episode and rotates through available roles for each agent.

Copy link
Contributor Author

relh commented Jan 18, 2026


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • add-to-merge-queue - adds this PR to the back of the merge queue
  • add-to-merge-queue-as-hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b1dbd3e278

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +94 to +98
available_vibes = [name[len("change_vibe_") :] for name in change_vibe_actions]
if role_vibes is None:
role_vibes = [vibe for vibe in available_vibes if vibe != "default"]
if not role_vibes:
role_vibes = available_vibes

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Restrict default role_vibes to actual Cogsguard roles

When role_vibes is None, this defaults to all change_vibe_* actions except default (here), which in Cogsguard missions includes non-role vibes like heart and gear. The Nim Cogsguard policy only handles gear/miner/scout/aligner/scrambler and falls through to noop for other vibes (see step in cogsguard_agents.nim), so forcing heart at episode start yields a no-op agent for the whole episode, and forcing gear yields a random role instead of the intended deterministic rotation. Consider filtering the default list to the actual role vibes or to those with explicit behaviors.

Useful? React with 👍 / 👎.

@blacksmith-sh

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants