File size: 8,669 Bytes
d90c742
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
---
license: cc-by-nc-4.0
pretty_name: Jaipur - Online Card Game Replays
task_categories:
  - reinforcement-learning
tags:
  - board-games
  - card-games
  - jaipur
  - game-ai
  - imperfect-information
  - two-player
language:
  - en
size_categories:
  - 10K<n<100K
configs:
  - config_name: default
    data_files:
      - split: train
        path: data/games.parquet
  - config_name: players
    data_files:
      - split: train
        path: data/players.parquet
dataset_info:
  - config_name: default
    features:
      - name: game_id
        dtype: string
      - name: variant
        dtype: string
      - name: player_0
        dtype: string
      - name: player_1
        dtype: string
      - name: winner
        dtype: int8
      - name: num_rounds
        dtype: int8
      - name: num_turns
        dtype: int16
      - name: round_scores
        sequence:
          sequence: int16
      - name: turns
        list:
          - name: round
            dtype: int8
          - name: actor
            dtype: int8
          - name: action_type
            dtype: string
          - name: action_goods
            sequence: int8
          - name: market
            sequence: int8
          - name: deck_size
            dtype: int8
          - name: actor_hand
            sequence: int8
          - name: opponent_hand
            sequence: int8
          - name: coin_stacks
            sequence:
              sequence: int8
          - name: bonus_stacks
            sequence:
              sequence: int8
          - name: actor_coins
            sequence:
              sequence: int8
          - name: actor_bonuses
            sequence: int8
          - name: actor_score
            dtype: int16
          - name: opponent_score
            dtype: int16
    splits:
      - name: train
        num_examples: 38077
  - config_name: players
    features:
      - name: player_id
        dtype: string
      - name: num_games
        dtype: int32
      - name: num_wins
        dtype: int32
      - name: win_rate
        dtype: float32
      - name: num_games_as_p0
        dtype: int32
      - name: num_games_open_info
        dtype: int32
      - name: num_games_original
        dtype: int32
    splits:
      - name: train
        num_examples: 4264
---

# Jaipur: Online Card Game Replays

A dataset of **38,000+ complete Jaipur card game replays** from human players on
[Yucata.de](https://www.yucata.de).

[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
most money. It features imperfect information (hidden deck and opponent hand), delayed rewards,
and strategic tension between short-term gains and long-term planning.

## Why This Dataset?

Jaipur is an excellent benchmark for game AI research:

- **Imperfect information**: Players cannot see the deck or (in the original variant) the
  opponent's hand, requiring belief tracking and risk assessment
- **Mixed strategy space**: Actions include taking goods, selling sets, and multi-card trades
- **Compact but deep**: Games are short (~20-40 turns) but strategically rich
- **Two variants included**: Open information (both hands visible) and original rules (hidden
  hands), enabling research on how information availability affects strategy

## Dataset Structure

### Games (`data/games.parquet`)

Each row is one complete game. The `turns` column contains the full sequence of game states
and actions.

| Column | Type | Description |
|--------|------|-------------|
| `game_id` | `string` | Unique anonymized game identifier |
| `variant` | `string` | `"open_info"` or `"original"` (whether hands are visible) |
| `player_0` | `string` | Anonymized player ID (consistent across games) |
| `player_1` | `string` | Anonymized player ID |
| `winner` | `int8` | `0` = player\_0 won, `1` = player\_1 won, `-1` = unknown |
| `num_rounds` | `int8` | Number of rounds played (1-3, best of 3) |
| `num_turns` | `int16` | Total turns across all rounds |
| `round_scores` | `list[list[int16]]` | Per-round scores `[[p0_r1, p1_r1], [p0_r2, p1_r2], ...]` |
| `turns` | `list[struct]` | Ordered list of turn records (see below) |

#### Turn Schema

Each element in the `turns` list is a struct with the state **before** the action and the
action taken:

| Field | Type | Description |
|-------|------|-------------|
| `round` | `int8` | Round index (0-based) |
| `actor` | `int8` | Which player acted (`0` or `1`) |
| `action_type` | `string` | `"take"`, `"sell"`, or `"trade"` |
| `action_goods` | `list[int8]` | Signed goods delta for actor: `[D, G, S, Cl, Sp, L, Ca]`. Positive = gained, negative = given away |
| `market` | `list[int8]` | Market goods count: `[D, G, S, Cl, Sp, L, Ca]` |
| `deck_size` | `int8` | Cards remaining in draw pile |
| `actor_hand` | `list[int8]` | Actor's hand: `[D, G, S, Cl, Sp, L, Ca]` |
| `opponent_hand` | `list[int8]` | Opponent's hand (always present in data, even for original variant) |
| `coin_stacks` | `list[list[int8]]` | Remaining coin values per good `[[D coins], [G], [S], [Cl], [Sp], [L]]`, ordered highest-first |
| `bonus_stacks` | `list[list[int8]]` | Remaining bonus token values `[[3-set], [4-set], [5-set]]` |
| `actor_coins` | `list[list[int8]]` | Coins actor has earned per good `[[D coins], ..., [L coins]]` |
| `actor_bonuses` | `list[int8]` | Bonus token values actor has earned |
| `actor_score` | `int16` | Actor's current score (goods + bonus coins) |
| `opponent_score` | `int16` | Opponent's current score |

**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).

### Players (`data/players.parquet`)

Aggregated statistics for each unique player across all games.

| Column | Type | Description |
|--------|------|-------------|
| `player_id` | `string` | Anonymized player ID (matches `player_0`/`player_1` in games) |
| `num_games` | `int32` | Total games played |
| `num_wins` | `int32` | Total wins |
| `win_rate` | `float32` | Win rate (wins / games with known outcome) |
| `num_games_as_p0` | `int32` | Games played as player 0 (first mover) |
| `num_games_open_info` | `int32` | Games played in open info variant |
| `num_games_original` | `int32` | Games played in original variant |

## Quick Start

```python
from datasets import load_dataset

# Load all games
ds = load_dataset("noidvan/jaipur")
game = ds["train"][0]

print(f"Variant: {game['variant']}")
print(f"Winner: player_{game['winner']}")
print(f"Turns: {game['num_turns']}")

# Iterate through turns
for turn in game["turns"]:
    print(f"  Round {turn['round']}, Player {turn['actor']}: {turn['action_type']}")
    print(f"    Market: {turn['market']}, Deck: {turn['deck_size']}")

# Load player stats
players = load_dataset("noidvan/jaipur", "players")
```

## Game Rules Summary

- **Setup**: 5 cards in market (3 camels + 2 goods initially), each player gets 5 cards
- **Turn actions**:
  - **Take**: Pick one good from market (deck refills) or take all camels
  - **Sell**: Sell 1+ cards of same type for coins (premium goods require selling 2+)
  - **Trade**: Swap 2+ cards with market (can offer camels)
- **Coins**: Each good type has a coin stack with decreasing values (sell early = more coins)
- **Bonuses**: Selling 3/4/5+ cards earns a random bonus token
- **Round end**: 3 coin stacks empty OR deck exhausted. Most coins wins the round.
- **Game end**: Best of 3 rounds (first to 2 "seals")

## Variants

| Variant | Games | Description |
|---------|-------|-------------|
| `open_info` | ~33,000 | Both players can see each other's hands |
| `original` | ~5,500 | Standard rules — opponent's hand is hidden |

The `opponent_hand` field is populated for all games regardless of variant (the server
records full state). The `variant` field indicates what information was available to players
during play, which affects their strategy.

## Source & License

- **Source**: Game replays from [Yucata.de](https://www.yucata.de), an online board game platform
- **License**: [CC-BY-NC-4.0](https://creativecommons.org/licenses/by-nc/4.0/)
- **Privacy**: All player identities are anonymized with irreversible hashing. Original
  usernames are not recoverable from the dataset. The player ID `"unknown"` represents
  unknown users (~1,400 games); They are excluded from the players table.

## Citation

```bibtex
@dataset{jaipur_replays_2026,
  title={Jaipur: Online Card Game Replays},
  author={Yifan Lin},
  year={2026},
  url={https://huggingface.co/datasets/noidvan/jaipur},
  license={CC-BY-NC-4.0}
}
```