Docs / Rules

Megagem Rules

Overview

Megagem is a 3–5 player sealed-bid auction game. Players bid coins on gems and special auctions over 25 rounds, aiming to maximise their final score.

Final score = $ Balance + Adjustment + Gem Values
Setup
Players Starting coins Starting hand
3355 cards
4254 cards
5203 cards

5 gem types · 6 of each = 30 gems total · 25 auctions per game

Pink Green Blue Purple Yellow
Auction Types (25 per game)
GEM1 ×12

Win 1 gem; the losing bid's reveal card returns to the deck.

GEM2 ×5

Win 2 gems at once. If only 1 gem remains the winner still claims it.

+
INVEST5 / INVEST10 ×2 each

Bid X coins; gain X + 5 (or 10) as an end-of-game adjustment. Guaranteed positive return — but ties up coins.

LOAN10 / LOAN20 ×2 each

Receive 10 (or 20) coins now; the full amount is deducted from your final score. Useful for buying power mid-game.

Gem Valuation Charts A–E

At game start each gem type is randomly assigned one chart. A gem's per-gem value is looked up by how many of that type were auctioned off by game end — hidden information that all players are trying to infer.

gems auctioned → 0 1 2 3 4 5 6 Strategy hint
Chart A
0
4
8
12
16
20
20
Common pays more
Chart B
20
16
12
8
4
0
0
Rare pays more
Chart C
0
2
5
9
14
20
20
Exponential — high count
Chart D
20
18
15
11
6
0
0
Diminishing — low count
Chart E
0
4
10
18
6
0
0
Sweet spot at 3

Cell shade = value intensity. Per-gem score = chart value × copies in your collection. Max chart value is 20.

Missions

Four mission cards are dealt face-up at game start. Win an auction that completes a mission's required gem set to claim it — first come, first served.

📿 Pendant +5 coins

Uni-color (×5): any 2 gems of the same type
Multi-color (×10): a specific 2-gem pair

👑 Crown +10 coins

×10 cards: a specific 3-gem set required

🛡️ Shield +10–15 coins

×2 cards: pair or diversity conditions — harder to achieve, bigger reward

Tie-breaking

When bids are equal the player immediately after the last auction winner (seat order, clockwise) has priority. Use ct.beats_on_tie(other) to check whether you'd win a tie against a specific opponent this turn.

Your Bot's Turn

Each turn your bot's main(ct) must return two integers:

def main(self, ct: Controller) -> tuple[int, int]:
    bid    = ...  # coins to spend; engine caps at ct.max_bid()
    reveal = ...  # index into ct.get_hand() to reveal publicly
    return bid, reveal
bid

Coins you want to spend. The engine silently caps it at ct.max_bid(). Highest bid wins; ties go to the player after the last winner.

reveal

Index into your private hand. The winner's revealed card is added to the public value display; losers' reveals are discarded for that turn.