Skip to content

Commit 66e3f50

Browse files
committed
Update Figgie arena for simultaneous tick model
1 parent 6f3ce4d commit 66e3f50

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

codeclash/arenas/figgie/figgie.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ class FiggieArena(CodeArena):
2929
- Goal suit: same color as 12-card suit, contains 8 or 10 cards
3030
- At end: $10 per goal suit card, remainder to player(s) with most goal suit cards
3131
32+
Trading Model (Simultaneous Tick):
33+
- Each tick, ALL players are polled for their action
34+
- Actions are executed in random order (simulates racing to the order book)
35+
- Order books cleared after each trade (per official Figgie rules)
36+
3237
Your bot (main.py) must implement:
3338
3439
def get_action(state: dict) -> dict
@@ -37,16 +42,15 @@ def get_action(state: dict) -> dict
3742
- position: your player index (0-3 or 0-4)
3843
- hand: dict of suit -> count of cards you hold
3944
- money: your current money
40-
- bids: dict of suit -> {price, player} or None
41-
- offers: dict of suit -> {price, player} or None
45+
- books: dict of suit -> {bid: {price, player} or None, ask: {price, player} or None, last_trade}
4246
- trades: list of completed trades
4347
- num_players: number of players (4 or 5)
44-
- turn: current turn number
48+
- tick: current tick number
4549
4650
Return one of:
4751
- {"type": "pass"}
4852
- {"type": "bid", "suit": "spades", "price": 5}
49-
- {"type": "offer", "suit": "spades", "price": 10}
53+
- {"type": "ask", "suit": "spades", "price": 10}
5054
- {"type": "buy", "suit": "spades"}
5155
- {"type": "sell", "suit": "spades"}
5256

0 commit comments

Comments
 (0)