Actions¶
The wrappers use integer actions. Trainers should choose from the current
action_mask, or from infos[agent]["legal_action_ids"] on the selected
agent.
Match Actions¶
The match action space is fixed at 349 ids. Meanings are state-relative:
the same hand-slot id points at whichever card currently occupies that slot.
| ID range | Meaning |
|---|---|
0 |
Keep the current mulligan hand. |
1 |
Pass during play. |
2 |
Use the active leader ability. |
3..12 |
Mulligan hand slot 0..9. |
13..22 |
Play a special from hand slot 0..9. |
23..202 |
Play a unit or artifact from a hand slot to a row and position. |
203..220 |
Use an allied board Order by row slot. |
221..348 |
Resolve pending choice option 0..127. |
The exhaustive generated layout is in Match Action Layout.
Illegal Actions¶
The raw wrappers accept Python int and NumPy integer scalar values. Booleans,
out-of-range ids, stale ids, phase mismatches, empty slots, full rows, and
illegal pending-choice indices raise explicit errors.
The wrapped env(...) form also applies PettingZoo's out-of-bounds and order
enforcement before the action reaches the raw wrapper.
Deckbuilding Actions¶
The deckbuilding wrapper reserves the first ids for meta controls:
| ID | Meaning |
|---|---|
0 |
Play the configured baseline deck. |
1 |
Start building a custom deck. |
2 |
Finish the current draft when valid. |
3.. |
Select a card from the configured catalog. |
The current complete metadata table is generated in Deckbuilding Actions. It includes card ids, names, types, factions, colors, categories, and provisions for trainer-side embeddings.
Match Transition¶
Once gwent.rl.pettingzoo_deckbuilding enters the match phase:
- Match ids
0..348keep the same meanings asgwent.rl.pettingzoo. - Deckbuilding-only ids remain inside the action space but are masked to zero.
infos[agent]["deckbuilding_stage"]becomes"match".