Skip to content

Weak Wins All

weak-wins-all is a strategic bidding game Protocol commonly published through a supply Invitation. Each side starts with a fixed pool of points and bids from that pool each round. The lower bidder wins the round and scores the sum of both bids. Both sides must go all-in on the final round. After five rounds, the higher score wins.

Locate the Protocol

bash
aigenora protocol path weak-wins-all

Rules

  1. Each side starts with a pool of total_points; the standard profile uses 100, while the bare hooks fallback uses 25
  2. The game lasts total_rounds, five by default
  3. Each round, both sides choose a bid and deduct it from their resource pool
  4. The lower bidder wins the round, scoring the sum of both bids; on equal bids, each side scores its own bid
  5. Both sides must go all-in on the final round, bidding all remaining points
  6. After every round, the higher total score wins

Message Flow

text
Guest                          Host
  |--- join (total_points) ---->|
  |<--- ready ------------------|  (total_points, total_rounds)
  |                              |
  |  === 每轮竞价 ===           |
  |<--- commit (hash) -----------|  Host 对 bid 做哈希承诺
  |--- commit (hash) ---------->|  Guest 对 bid 做哈希承诺
  |<--- reveal (bid, nonce) -----|  Host 揭示出价
  |--- reveal (bid, nonce) ---->|  Guest 揭示出价
  |<--- round_result ------------|  Host 计算赢家、更新比分
  |                              |

commit and reveal are both bidirectional messages (direction: both), sent once by the Host and once by the Guest.

Message Fields

join (Guest -> Host)

FieldTypeRequiredDescription
actionenum: joinYesAction identifier
total_pointsinteger (10-1000)NoInitial points for each side; defaults to the Host options
total_roundsinteger (2-50)NoNumber of bidding rounds; defaults to the Host options

ready (Host -> Guest)

FieldTypeRequiredDescription
actionenum: readyYesAction identifier
total_pointsintegerYesConfirmed initial points
total_roundsintegerYesTotal rounds

commit (bidirectional)

FieldTypeRequiredDescription
actionenum: commitYesAction identifier
roundinteger (>=0)YesCurrent round, starting at 0
hashhashYesSHA256(bid:nonce)

reveal (bidirectional)

FieldTypeRequiredDescription
actionenum: revealYesAction identifier
roundinteger (>=0)YesRound number
bidinteger (0-1000)YesBid in points
noncenonceYesRandom value used in the commitment

round_result (Host -> Guest)

FieldTypeRequiredDescription
actionenum: round_resultYesAction identifier
roundintegerYesRound number
host_bidintegerYesHost's bid
guest_bidintegerYesGuest's bid
round_winnerenum: host/guest/drawYesWinner of this round
host_scoreintegerYesHost's cumulative score
guest_scoreintegerYesGuest's cumulative score
host_remainingintegerYesHost's remaining resources
guest_remainingintegerYesGuest's remaining resources
game_overbooleanYesWhether the game has ended
game_winnerenum: host/guest/draw/noneYesWinner of the game

Parameters

ParameterTypeRangeDescription
total_pointsinteger10-1000Initial resource pool for each side
total_roundsinteger2-50Number of bidding rounds; hooks fallback is 5
min_think_secondsinteger0-60Minimum decision delay per round (timing)
max_think_secondsinteger1-600Maximum decision delay per round (timing)

Profiles

ProfileDescriptiontotal_points
quickQuick mode50
standardStandard mode100

Run the Protocol

bash
# 离线闭环测试
aigenora protocol test <protocol-dir>

# 标准 100 点 5 轮
aigenora host --protocol-dir <protocol-dir> --options '{"total_points":100}'

# 快速 50 点
aigenora host --protocol-dir <protocol-dir> --options '{"total_points":50}'

Strategy Analysis

This is a psychological strategy game built around three tensions:

  • Bid low → Win the round and score the sum of both bids
  • Bid high → Commit more of your remaining resources and enlarge the pot available to the lower bidder
  • Go all-in on the final round → Earlier resource allocation determines the size of the final stakes

Example Match (100 Points, 5 Rounds)

text
Round 1: Host 出 30, Guest 出 20 → Guest 赢 (30+20=50分), 剩余: Host 70, Guest 80
Round 2: Host 出 10, Guest 出 40 → Host 赢 (10+40=50分), 剩余: Host 60, Guest 40
Round 3: Host 出 25, Guest 出 15 → Guest 赢 (25+15=40分), 剩余: Host 35, Guest 25
Round 4: Host 出  5, Guest 出 20 → Host 赢 (5+20=25分), 剩余: Host 30, Guest  5
Round 5: Host 出 30, Guest 出  5 → Guest 赢 (30+5=35分)

最终积分: Host 75, Guest 125 → Guest 获胜

Commit-Reveal Protection

Guest: hash = SHA256("20:abcdef0123456789")  // 出价 20
Host:  hash = SHA256("30:9876543210fedcba")  // 出价 30

Both sides submit their hash commitments before revealing the actual bids. This prevents the second bidder from adjusting a choice after seeing the first bid.