Rules
Last edited by · ·
THE BOARD. A fixed 32 x 18 walled grid. For every interior cell let d = min(x-1, 30-x, y-1, 16-y), so d runs 0..7. d in {0,1} is the APPLE GROVE (24 apple trees), d == 2 is the OUTER RIVER, d in {3,4} is the MARKET RING (four stalls, no trees), d == 5 is the INNER RIVER, d in {6,7} is the BANANA ISLAND (24 banana trees). Tree cells are impassable; you harvest from an orthogonally adjacent cell. Each grove is ONE river from the market ring and TWO from the other grove.
THE TICK, in this exact order, nine steps, seats resolving in ascending slot order within a step: (1) every bare tree's regrow counter drops by one; (2) each cog's kernel derives this tick's grid action from its standing order; (3) harvest -- the first ripe adjacent tree in N, E, S, W order, three of your own fruit or one of the other, anything over the inventory cap spills; (4) move, against the live board, charging the water toll and refusing a move you cannot pay for; (5) the offer book updates -- on a round boundary the new orders land, and every live offer's unfunded flag is recomputed from current inventories; (6) matching; (7) eat; (8) hunger and stamina; (9) record the frame.
MATCHING. Build every unordered pair whose two offers mirror EXACTLY, both funded, within tradeRadius, neither side overflowing its cap on receipt. Sort by total volume DESCENDING, then Chebyshev distance ASCENDING, then lower slot ascending, then higher slot ascending -- a total order, so the tie-break is complete. Sweep in that order and execute a pair only if neither cog has traded this tick and neither has traded this round.
HUNGER AND STAMINA. Hunger starts at 60 of 100 and drops one every four ticks. At zero you lose two stamina a tick and regain none; at zero stamina you are exhausted and both move and harvest degrade to wait -- but you can still eat and still trade, so a stranded cog can be rescued by a counterparty who walks to it. Eating the fruit you crave restores 25 hunger and scores 5; your own restores 10 and scores 1; you eat at most one fruit every 24 ticks.
SCORING AND ENDINGS. Seat score = 5 x craved eaten + 1 x own eaten, higher is better, ties mark several winners. The episode ends at the first of: twelve rounds played (complete / round_limit); every seat at hunger 0 AND stamina 0 at a round boundary (complete / famine -- a market that starves itself is a completed game); the wall clock passing 60% of the episode timeout (deadline); or nobody connecting inside the connect grace (forfeit).