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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: cc-by-nc-4.0
|
| 3 |
+
pretty_name: Jaipur - Online Card Game Replays
|
| 4 |
+
task_categories:
|
| 5 |
+
- reinforcement-learning
|
| 6 |
+
tags:
|
| 7 |
+
- board-games
|
| 8 |
+
- card-games
|
| 9 |
+
- jaipur
|
| 10 |
+
- game-ai
|
| 11 |
+
- imperfect-information
|
| 12 |
+
- two-player
|
| 13 |
+
language:
|
| 14 |
+
- en
|
| 15 |
+
size_categories:
|
| 16 |
+
- 10K<n<100K
|
| 17 |
+
configs:
|
| 18 |
+
- config_name: default
|
| 19 |
+
data_files:
|
| 20 |
+
- split: train
|
| 21 |
+
path: data/games.parquet
|
| 22 |
+
- config_name: players
|
| 23 |
+
data_files:
|
| 24 |
+
- split: train
|
| 25 |
+
path: data/players.parquet
|
| 26 |
+
dataset_info:
|
| 27 |
+
- config_name: default
|
| 28 |
+
features:
|
| 29 |
+
- name: game_id
|
| 30 |
+
dtype: string
|
| 31 |
+
- name: variant
|
| 32 |
+
dtype: string
|
| 33 |
+
- name: player_0
|
| 34 |
+
dtype: string
|
| 35 |
+
- name: player_1
|
| 36 |
+
dtype: string
|
| 37 |
+
- name: winner
|
| 38 |
+
dtype: int8
|
| 39 |
+
- name: num_rounds
|
| 40 |
+
dtype: int8
|
| 41 |
+
- name: num_turns
|
| 42 |
+
dtype: int16
|
| 43 |
+
- name: round_scores
|
| 44 |
+
sequence:
|
| 45 |
+
sequence: int16
|
| 46 |
+
- name: turns
|
| 47 |
+
list:
|
| 48 |
+
- name: round
|
| 49 |
+
dtype: int8
|
| 50 |
+
- name: actor
|
| 51 |
+
dtype: int8
|
| 52 |
+
- name: action_type
|
| 53 |
+
dtype: string
|
| 54 |
+
- name: action_goods
|
| 55 |
+
sequence: int8
|
| 56 |
+
- name: market
|
| 57 |
+
sequence: int8
|
| 58 |
+
- name: deck_size
|
| 59 |
+
dtype: int8
|
| 60 |
+
- name: actor_hand
|
| 61 |
+
sequence: int8
|
| 62 |
+
- name: opponent_hand
|
| 63 |
+
sequence: int8
|
| 64 |
+
- name: coin_stacks
|
| 65 |
+
sequence:
|
| 66 |
+
sequence: int8
|
| 67 |
+
- name: bonus_stacks
|
| 68 |
+
sequence:
|
| 69 |
+
sequence: int8
|
| 70 |
+
- name: actor_coins
|
| 71 |
+
sequence:
|
| 72 |
+
sequence: int8
|
| 73 |
+
- name: actor_bonuses
|
| 74 |
+
sequence: int8
|
| 75 |
+
- name: actor_score
|
| 76 |
+
dtype: int16
|
| 77 |
+
- name: opponent_score
|
| 78 |
+
dtype: int16
|
| 79 |
+
splits:
|
| 80 |
+
- name: train
|
| 81 |
+
num_examples: 38077
|
| 82 |
+
- config_name: players
|
| 83 |
+
features:
|
| 84 |
+
- name: player_id
|
| 85 |
+
dtype: string
|
| 86 |
+
- name: num_games
|
| 87 |
+
dtype: int32
|
| 88 |
+
- name: num_wins
|
| 89 |
+
dtype: int32
|
| 90 |
+
- name: win_rate
|
| 91 |
+
dtype: float32
|
| 92 |
+
- name: num_games_as_p0
|
| 93 |
+
dtype: int32
|
| 94 |
+
- name: num_games_open_info
|
| 95 |
+
dtype: int32
|
| 96 |
+
- name: num_games_original
|
| 97 |
+
dtype: int32
|
| 98 |
+
splits:
|
| 99 |
+
- name: train
|
| 100 |
+
num_examples: 4264
|
| 101 |
+
---
|
| 102 |
+
|
| 103 |
+
# Jaipur: Online Card Game Replays
|
| 104 |
+
|
| 105 |
+
A dataset of **38,000+ complete Jaipur card game replays** from human players on
|
| 106 |
+
[Yucata.de](https://www.yucata.de).
|
| 107 |
+
|
| 108 |
+
[Jaipur](https://boardgamegeek.com/boardgame/54043/jaipur) is a two-player trading card game where players compete as merchants, buying and selling goods to earn the
|
| 109 |
+
most money. It features imperfect information (hidden deck and opponent hand), delayed rewards,
|
| 110 |
+
and strategic tension between short-term gains and long-term planning.
|
| 111 |
+
|
| 112 |
+
## Why This Dataset?
|
| 113 |
+
|
| 114 |
+
Jaipur is an excellent benchmark for game AI research:
|
| 115 |
+
|
| 116 |
+
- **Imperfect information**: Players cannot see the deck or (in the original variant) the
|
| 117 |
+
opponent's hand, requiring belief tracking and risk assessment
|
| 118 |
+
- **Mixed strategy space**: Actions include taking goods, selling sets, and multi-card trades
|
| 119 |
+
- **Compact but deep**: Games are short (~20-40 turns) but strategically rich
|
| 120 |
+
- **Two variants included**: Open information (both hands visible) and original rules (hidden
|
| 121 |
+
hands), enabling research on how information availability affects strategy
|
| 122 |
+
|
| 123 |
+
## Dataset Structure
|
| 124 |
+
|
| 125 |
+
### Games (`data/games.parquet`)
|
| 126 |
+
|
| 127 |
+
Each row is one complete game. The `turns` column contains the full sequence of game states
|
| 128 |
+
and actions.
|
| 129 |
+
|
| 130 |
+
| Column | Type | Description |
|
| 131 |
+
|--------|------|-------------|
|
| 132 |
+
| `game_id` | `string` | Unique anonymized game identifier |
|
| 133 |
+
| `variant` | `string` | `"open_info"` or `"original"` (whether hands are visible) |
|
| 134 |
+
| `player_0` | `string` | Anonymized player ID (consistent across games) |
|
| 135 |
+
| `player_1` | `string` | Anonymized player ID |
|
| 136 |
+
| `winner` | `int8` | `0` = player\_0 won, `1` = player\_1 won, `-1` = unknown |
|
| 137 |
+
| `num_rounds` | `int8` | Number of rounds played (1-3, best of 3) |
|
| 138 |
+
| `num_turns` | `int16` | Total turns across all rounds |
|
| 139 |
+
| `round_scores` | `list[list[int16]]` | Per-round scores `[[p0_r1, p1_r1], [p0_r2, p1_r2], ...]` |
|
| 140 |
+
| `turns` | `list[struct]` | Ordered list of turn records (see below) |
|
| 141 |
+
|
| 142 |
+
#### Turn Schema
|
| 143 |
+
|
| 144 |
+
Each element in the `turns` list is a struct with the state **before** the action and the
|
| 145 |
+
action taken:
|
| 146 |
+
|
| 147 |
+
| Field | Type | Description |
|
| 148 |
+
|-------|------|-------------|
|
| 149 |
+
| `round` | `int8` | Round index (0-based) |
|
| 150 |
+
| `actor` | `int8` | Which player acted (`0` or `1`) |
|
| 151 |
+
| `action_type` | `string` | `"take"`, `"sell"`, or `"trade"` |
|
| 152 |
+
| `action_goods` | `list[int8]` | Signed goods delta for actor: `[D, G, S, Cl, Sp, L, Ca]`. Positive = gained, negative = given away |
|
| 153 |
+
| `market` | `list[int8]` | Market goods count: `[D, G, S, Cl, Sp, L, Ca]` |
|
| 154 |
+
| `deck_size` | `int8` | Cards remaining in draw pile |
|
| 155 |
+
| `actor_hand` | `list[int8]` | Actor's hand: `[D, G, S, Cl, Sp, L, Ca]` |
|
| 156 |
+
| `opponent_hand` | `list[int8]` | Opponent's hand (always present in data, even for original variant) |
|
| 157 |
+
| `coin_stacks` | `list[list[int8]]` | Remaining coin values per good `[[D coins], [G], [S], [Cl], [Sp], [L]]`, ordered highest-first |
|
| 158 |
+
| `bonus_stacks` | `list[list[int8]]` | Remaining bonus token values `[[3-set], [4-set], [5-set]]` |
|
| 159 |
+
| `actor_coins` | `list[list[int8]]` | Coins actor has earned per good `[[D coins], ..., [L coins]]` |
|
| 160 |
+
| `actor_bonuses` | `list[int8]` | Bonus token values actor has earned |
|
| 161 |
+
| `actor_score` | `int16` | Actor's current score (goods + bonus coins) |
|
| 162 |
+
| `opponent_score` | `int16` | Opponent's current score |
|
| 163 |
+
|
| 164 |
+
**Goods order**: Diamond (D), Gold (G), Silver (S), Cloth (Cl), Spice (Sp), Leather (L), Camel (Ca) — 7 types. Coin stacks cover the 6 tradeable types (no camel coins).
|
| 165 |
+
|
| 166 |
+
### Players (`data/players.parquet`)
|
| 167 |
+
|
| 168 |
+
Aggregated statistics for each unique player across all games.
|
| 169 |
+
|
| 170 |
+
| Column | Type | Description |
|
| 171 |
+
|--------|------|-------------|
|
| 172 |
+
| `player_id` | `string` | Anonymized player ID (matches `player_0`/`player_1` in games) |
|
| 173 |
+
| `num_games` | `int32` | Total games played |
|
| 174 |
+
| `num_wins` | `int32` | Total wins |
|
| 175 |
+
| `win_rate` | `float32` | Win rate (wins / games with known outcome) |
|
| 176 |
+
| `num_games_as_p0` | `int32` | Games played as player 0 (first mover) |
|
| 177 |
+
| `num_games_open_info` | `int32` | Games played in open info variant |
|
| 178 |
+
| `num_games_original` | `int32` | Games played in original variant |
|
| 179 |
+
|
| 180 |
+
## Quick Start
|
| 181 |
+
|
| 182 |
+
```python
|
| 183 |
+
from datasets import load_dataset
|
| 184 |
+
|
| 185 |
+
# Load all games
|
| 186 |
+
ds = load_dataset("noidvan/jaipur")
|
| 187 |
+
game = ds["train"][0]
|
| 188 |
+
|
| 189 |
+
print(f"Variant: {game['variant']}")
|
| 190 |
+
print(f"Winner: player_{game['winner']}")
|
| 191 |
+
print(f"Turns: {game['num_turns']}")
|
| 192 |
+
|
| 193 |
+
# Iterate through turns
|
| 194 |
+
for turn in game["turns"]:
|
| 195 |
+
print(f" Round {turn['round']}, Player {turn['actor']}: {turn['action_type']}")
|
| 196 |
+
print(f" Market: {turn['market']}, Deck: {turn['deck_size']}")
|
| 197 |
+
|
| 198 |
+
# Load player stats
|
| 199 |
+
players = load_dataset("noidvan/jaipur", "players")
|
| 200 |
+
```
|
| 201 |
+
|
| 202 |
+
## Game Rules Summary
|
| 203 |
+
|
| 204 |
+
- **Setup**: 5 cards in market (3 camels + 2 goods initially), each player gets 5 cards
|
| 205 |
+
- **Turn actions**:
|
| 206 |
+
- **Take**: Pick one good from market (deck refills) or take all camels
|
| 207 |
+
- **Sell**: Sell 1+ cards of same type for coins (premium goods require selling 2+)
|
| 208 |
+
- **Trade**: Swap 2+ cards with market (can offer camels)
|
| 209 |
+
- **Coins**: Each good type has a coin stack with decreasing values (sell early = more coins)
|
| 210 |
+
- **Bonuses**: Selling 3/4/5+ cards earns a random bonus token
|
| 211 |
+
- **Round end**: 3 coin stacks empty OR deck exhausted. Most coins wins the round.
|
| 212 |
+
- **Game end**: Best of 3 rounds (first to 2 "seals")
|
| 213 |
+
|
| 214 |
+
## Variants
|
| 215 |
+
|
| 216 |
+
| Variant | Games | Description |
|
| 217 |
+
|---------|-------|-------------|
|
| 218 |
+
| `open_info` | ~33,000 | Both players can see each other's hands |
|
| 219 |
+
| `original` | ~5,500 | Standard rules — opponent's hand is hidden |
|
| 220 |
+
|
| 221 |
+
The `opponent_hand` field is populated for all games regardless of variant (the server
|
| 222 |
+
records full state). The `variant` field indicates what information was available to players
|
| 223 |
+
during play, which affects their strategy.
|
| 224 |
+
|
| 225 |
+
## Source & License
|
| 226 |
+
|
| 227 |
+
- **Source**: Game replays from [Yucata.de](https://www.yucata.de), an online board game platform
|
| 228 |
+
- **License**: [CC-BY-NC-4.0](https://creativecommons.org/licenses/by-nc/4.0/)
|
| 229 |
+
- **Privacy**: All player identities are anonymized with irreversible hashing. Original
|
| 230 |
+
usernames are not recoverable from the dataset. The player ID `"unknown"` represents
|
| 231 |
+
unknown users (~1,400 games); They are excluded from the players table.
|
| 232 |
+
|
| 233 |
+
## Citation
|
| 234 |
+
|
| 235 |
+
```bibtex
|
| 236 |
+
@dataset{jaipur_replays_2026,
|
| 237 |
+
title={Jaipur: Online Card Game Replays},
|
| 238 |
+
author={Yifan Lin},
|
| 239 |
+
year={2026},
|
| 240 |
+
url={https://huggingface.co/datasets/noidvan/jaipur},
|
| 241 |
+
license={CC-BY-NC-4.0}
|
| 242 |
+
}
|
| 243 |
+
```
|
data/games.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ebc21032a8eb0a0dd32ec8076112c9d1223429e6fd6f1e185b99fa091fa1f9ff
|
| 3 |
+
size 75896870
|
data/players.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9b64511108c8c7de345644f86bbbda425f5d63361b7d4bc5a97e6412a1c65b8f
|
| 3 |
+
size 55926
|