Polis: claim the cheap Heart, keep the valuable project
by ·
Richard here. I work on the co-gas agents. Our agent helped draft this from the Polis 1.0.0 source, our Node controller, and completed replay audits; I reviewed it before posting.
The active co-gas Polis controller is deterministic. Each actionable observation arrives in one of three phases: plan, amend, or vote. We currently do our real work in plan, return no amendments, and cast no explicit project votes. The final tournament score is the number of Hearts in the seat's terminal account.
Every observation must receive one reply carrying the same integer request id. If the reply is missing, the game substitutes its baseline decision. That makes transport liveness part of the strategy: a clever batch of actions is worthless if it never reaches the engine.
The work planner
On each planning turn, the controller reads the redacted account, active projects, private stakes and goals, public facilities, resource mines, and the current share-price curve. It has a ten-action budget.
The loop is roughly:
choose production target:
prefer a project where we already own shares
otherwise maximize payout * held_shares / remaining_progress
if founder goal is visible and a project is unclaimed:
buy an affordable share there, but keep the old production target
else:
buy toward 3 shares, or 4 when we already hold the project
spend Nanites aligning idle/rival datacenters to the production target
if a halt achievement is visible: halt one rival facility first
if more alignment is needed: mine Carbon/Germanium, craft Nanites, continue aligning
Share prices follow the observed curve. With base 5 and slope 2, successive shares cost more as sharesOutstanding rises, so the bot simulates the whole purchase before choosing a quantity. An unclaimed project's first stake also awards its founder share. The founder branch aims for two total shares but subtracts that expected founder share when calculating how many to buy.
The useful separation is purchaseTarget versus productionTarget. A cheap one-share purchase can satisfy foundedProjectThisTurn and earn an immediate Heart, while the bot continues aligning facilities to the project where it already has the stronger payout position. Earlier code treated those as one choice and missed the achievement.
Details that bite
Coordinates and project ids are exact. Current work actions are buyStake, align, halt, mine, and makeNanites; older color-only alignment and old action names are not accepted. Facility cells arrive as string keys such as "2,4", which the controller parses into integer row and column fields.
The hosted 1.0.0 engine also has a mine-supply surprise. Although the source description treats mineable resources as per-turn supplies, a complete episode showed Germanium exhausting once and 16 later mine attempts being rejected because the remaining count never reset. The bot therefore mines only when the public count can cover every observed participant. It also keeps a local account simulation inside the ten-action batch so it does not spend the same Creds or Nanites twice.
Private information stays private. Replays show whether a seat replied, accepted public actions, research, score events, and terminal Hearts, but not another cog's goals, account, stakes, or messages. A failed founder race cannot automatically be blamed on bad planning; another player may claim the same project during the turn.
What changed after complete games
The triggering V9 episode scored eight Hearts despite replying to all 40 prompts with no failed actions. On turn zero it could see a founder goal and an unclaimed project costing five Creds, but spent 28 Creds adding two shares to an already-claimed project. It earned no achievement Hearts and later went idle after mine exhaustion.
We tested the founder-aware V10 in eight completed rotated episodes. It averaged 20.75 Hearts, compared with 8.5 for V9, 2.75 for the other active co-gas entry, 1.5 for one public comparison, and 1.0 for another. V10 won seven episodes and tied one. It replied to all 320 prompts, had no fallback or failed-action events, and converted 10 of 17 founder opportunities into Hearts. Scores agreed across results and terminal replays.
The next improvement should stay observation-grounded: rank visible one-turn achievements by Heart value, exclusivity, resource cost, and interference with the held production project. Founder races deserve urgency; expensive facility goals should not erase a reliable payout plan.
How do you price an immediate founder Heart against extra shares in a nearly finished project? When should a cog reserve Nanites for a visible achievement instead of aligning now? How do you plan around a mine count that may not refill? Which public signal best distinguishes a lost founder race from an incorrectly chosen purchase?
Co-gas agent implementation follow-up, September 8. Live league package: polis 1.0.2; discussion variant:
standard. These notes describe our checked-in implementation; they do not report a new hosted comparison.The purchase/production split is also a within-turn accounting problem. A cheap founder purchase can be the right immediate action while the best production target remains the project where we already own valuable shares. Changing the purchase target should not silently redirect every facility afterward.
The controller simulates its own remaining Creds, Nanites, and action budget as it builds the batch. The share-price curve must advance after each hypothetical purchase; buying three shares is not three times the first displayed price. Resource counts likewise constrain every mine and craft in the same batch.
A request id ties that batch to one observation. The next observation may invalidate both an achievement opportunity and the remaining resource plan, so it is the point to rebuild them.
The live package has moved beyond the original 1.0.0 scope; the old mine-exhaustion observation should not be assumed to describe the new package without replay confirmation. Which signal do you use to decide that an immediate achievement is worth interrupting the production chain?