DraftZero FDN sealed deck builder v1 (docs/032): self-play ensembles, card order, results, model card
Browse files- FDN_cardnames.txt +286 -0
- README.md +116 -0
- SHA256SUMS +6 -0
- example_pool.json +73 -0
- results.json +61 -0
- sealed_builder_phaseB_gen4.pt +3 -0
- sealed_builder_phaseC_gen1.pt +3 -0
FDN_cardnames.txt
ADDED
|
@@ -0,0 +1,286 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Abrade
|
| 2 |
+
Abyssal Harvester
|
| 3 |
+
Adventuring Gear
|
| 4 |
+
Aegis Turtle
|
| 5 |
+
Aetherize
|
| 6 |
+
Affectionate Indrik
|
| 7 |
+
Ajani's Pridemate
|
| 8 |
+
Ajani, Caller of the Pride
|
| 9 |
+
Akroma's Memorial
|
| 10 |
+
Alesha, Who Laughs at Fate
|
| 11 |
+
Ambush Wolf
|
| 12 |
+
An Offer You Can't Refuse
|
| 13 |
+
Angel of Finality
|
| 14 |
+
Anthem of Champions
|
| 15 |
+
Apothecary Stomper
|
| 16 |
+
Arahbo, the First Fang
|
| 17 |
+
Arbiter of Woe
|
| 18 |
+
Arcane Epiphany
|
| 19 |
+
Archmage of Runes
|
| 20 |
+
Armasaur Guide
|
| 21 |
+
Ashroot Animist
|
| 22 |
+
Authority of the Consuls
|
| 23 |
+
Axgard Cavalry
|
| 24 |
+
Bake into a Pie
|
| 25 |
+
Balmor, Battlemage Captain
|
| 26 |
+
Banishing Light
|
| 27 |
+
Banner of Kinship
|
| 28 |
+
Battlesong Berserker
|
| 29 |
+
Beast-Kin Ranger
|
| 30 |
+
Bigfin Bouncer
|
| 31 |
+
Billowing Shriekmass
|
| 32 |
+
Bite Down
|
| 33 |
+
Blanchwood Armor
|
| 34 |
+
Blasphemous Edict
|
| 35 |
+
Bloodfell Caves
|
| 36 |
+
Bloodthirsty Conqueror
|
| 37 |
+
Bloom Tender
|
| 38 |
+
Blossoming Sands
|
| 39 |
+
Boltwave
|
| 40 |
+
Brass's Bounty
|
| 41 |
+
Brazen Scourge
|
| 42 |
+
Brineborn Cutthroat
|
| 43 |
+
Broken Wings
|
| 44 |
+
Bulk Up
|
| 45 |
+
Burglar Rat
|
| 46 |
+
Burnished Hart
|
| 47 |
+
Burst Lightning
|
| 48 |
+
Bushwhack
|
| 49 |
+
Cackling Prowler
|
| 50 |
+
Campus Guide
|
| 51 |
+
Cat Collector
|
| 52 |
+
Cathar Commando
|
| 53 |
+
Celestial Armor
|
| 54 |
+
Cephalid Inkmage
|
| 55 |
+
Chandra, Flameshaper
|
| 56 |
+
Claws Out
|
| 57 |
+
Clinquant Skymage
|
| 58 |
+
Condemn
|
| 59 |
+
Consuming Aberration
|
| 60 |
+
Courageous Goblin
|
| 61 |
+
Crackling Cyclops
|
| 62 |
+
Crypt Feaster
|
| 63 |
+
Crystal Barricade
|
| 64 |
+
Curator of Destinies
|
| 65 |
+
Dauntless Veteran
|
| 66 |
+
Day of Judgment
|
| 67 |
+
Dazzling Angel
|
| 68 |
+
Diregraf Ghoul
|
| 69 |
+
Dismal Backwater
|
| 70 |
+
Divine Resilience
|
| 71 |
+
Doubling Season
|
| 72 |
+
Dragon Trainer
|
| 73 |
+
Drake Hatcher
|
| 74 |
+
Drakuseth, Maw of Flames
|
| 75 |
+
Dreadwing Scavenger
|
| 76 |
+
Dwynen's Elite
|
| 77 |
+
Dwynen, Gilt-Leaf Daen
|
| 78 |
+
Eager Trufflesnout
|
| 79 |
+
Eaten Alive
|
| 80 |
+
Electroduplicate
|
| 81 |
+
Elementalist Adept
|
| 82 |
+
Elenda, Saint of Dusk
|
| 83 |
+
Elfsworn Giant
|
| 84 |
+
Elvish Archdruid
|
| 85 |
+
Elvish Regrower
|
| 86 |
+
Embercleave
|
| 87 |
+
Empyrean Eagle
|
| 88 |
+
Erudite Wizard
|
| 89 |
+
Essence Scatter
|
| 90 |
+
Etali, Primal Storm
|
| 91 |
+
Evolving Wilds
|
| 92 |
+
Exemplar of Light
|
| 93 |
+
Exsanguinate
|
| 94 |
+
Extravagant Replication
|
| 95 |
+
Faebloom Trick
|
| 96 |
+
Fake Your Own Death
|
| 97 |
+
Fanatical Firebrand
|
| 98 |
+
Felidar Savior
|
| 99 |
+
Felling Blow
|
| 100 |
+
Fiend Artisan
|
| 101 |
+
Fiendish Panda
|
| 102 |
+
Fiery Annihilation
|
| 103 |
+
Firebrand Archer
|
| 104 |
+
Firespitter Whelp
|
| 105 |
+
Fishing Pole
|
| 106 |
+
Flamewake Phoenix
|
| 107 |
+
Fleeting Distraction
|
| 108 |
+
Fleeting Flight
|
| 109 |
+
Forest
|
| 110 |
+
Frenzied Goblin
|
| 111 |
+
Garruk's Uprising
|
| 112 |
+
Genesis Wave
|
| 113 |
+
Ghalta, Primal Hunger
|
| 114 |
+
Giada, Font of Hope
|
| 115 |
+
Giant Growth
|
| 116 |
+
Gleaming Barrier
|
| 117 |
+
Gnarlid Colony
|
| 118 |
+
Goblin Boarders
|
| 119 |
+
Goblin Bushwhacker
|
| 120 |
+
Goblin Negotiation
|
| 121 |
+
Goblin Surprise
|
| 122 |
+
Goldvein Pick
|
| 123 |
+
Good-Fortune Unicorn
|
| 124 |
+
Gorehorn Raider
|
| 125 |
+
Grappling Kraken
|
| 126 |
+
Grim Tutor
|
| 127 |
+
Grow from the Ashes
|
| 128 |
+
Guarded Heir
|
| 129 |
+
Gutless Plunderer
|
| 130 |
+
Hare Apparent
|
| 131 |
+
Healer's Hawk
|
| 132 |
+
Heartfire Immolator
|
| 133 |
+
Helpful Hunter
|
| 134 |
+
Herald of Eternal Dawn
|
| 135 |
+
Heraldic Banner
|
| 136 |
+
Hero's Downfall
|
| 137 |
+
Heroic Reinforcements
|
| 138 |
+
Hidetsugu's Second Rite
|
| 139 |
+
High Fae Trickster
|
| 140 |
+
High-Society Hunter
|
| 141 |
+
Homunculus Horde
|
| 142 |
+
Hungry Ghoul
|
| 143 |
+
Icewind Elemental
|
| 144 |
+
Imprisoned in the Moon
|
| 145 |
+
Incinerating Blast
|
| 146 |
+
Infernal Vessel
|
| 147 |
+
Infestation Sage
|
| 148 |
+
Inspiration from Beyond
|
| 149 |
+
Inspiring Call
|
| 150 |
+
Inspiring Paladin
|
| 151 |
+
Involuntary Employment
|
| 152 |
+
Island
|
| 153 |
+
Joust Through
|
| 154 |
+
Juggernaut
|
| 155 |
+
Jungle Hollow
|
| 156 |
+
Kaito, Cunning Infiltrator
|
| 157 |
+
Kellan, Planar Trailblazer
|
| 158 |
+
Kiora, the Rising Tide
|
| 159 |
+
Koma, World-Eater
|
| 160 |
+
Krenko, Mob Boss
|
| 161 |
+
Kykar, Zephyr Awakener
|
| 162 |
+
Lathril, Blade of the Elves
|
| 163 |
+
Leyline Axe
|
| 164 |
+
Lightshell Duo
|
| 165 |
+
Liliana, Dreadhorde General
|
| 166 |
+
Llanowar Elves
|
| 167 |
+
Loot, Exuberant Explorer
|
| 168 |
+
Luminous Rebuke
|
| 169 |
+
Lunar Insight
|
| 170 |
+
Macabre Waltz
|
| 171 |
+
Make Your Move
|
| 172 |
+
Marauding Blight-Priest
|
| 173 |
+
Meteor Golem
|
| 174 |
+
Micromancer
|
| 175 |
+
Midnight Snack
|
| 176 |
+
Mild-Mannered Librarian
|
| 177 |
+
Mischievous Mystic
|
| 178 |
+
Mischievous Pup
|
| 179 |
+
Mocking Sprite
|
| 180 |
+
Mossborn Hydra
|
| 181 |
+
Mountain
|
| 182 |
+
Muldrotha, the Gravetide
|
| 183 |
+
Needletooth Pack
|
| 184 |
+
Nessian Hornbeetle
|
| 185 |
+
Nine-Lives Familiar
|
| 186 |
+
Niv-Mizzet, Visionary
|
| 187 |
+
Omniscience
|
| 188 |
+
Overrun
|
| 189 |
+
Painful Quandary
|
| 190 |
+
Paradise Druid
|
| 191 |
+
Perforating Artist
|
| 192 |
+
Phyrexian Arena
|
| 193 |
+
Pilfer
|
| 194 |
+
Plains
|
| 195 |
+
Preposterous Proportions
|
| 196 |
+
Prideful Parent
|
| 197 |
+
Progenitus
|
| 198 |
+
Quakestrider Ceratops
|
| 199 |
+
Quick-Draw Katana
|
| 200 |
+
Quilled Greatwurm
|
| 201 |
+
Raise the Past
|
| 202 |
+
Ravenous Amulet
|
| 203 |
+
Reassembling Skeleton
|
| 204 |
+
Reclamation Sage
|
| 205 |
+
Refute
|
| 206 |
+
Resolute Reinforcements
|
| 207 |
+
Revenge of the Rats
|
| 208 |
+
Rise of the Dark Realms
|
| 209 |
+
Rite of the Dragoncaller
|
| 210 |
+
Rogue's Passage
|
| 211 |
+
Ruby, Daring Tracker
|
| 212 |
+
Rugged Highlands
|
| 213 |
+
Run Away Together
|
| 214 |
+
Rune-Scarred Demon
|
| 215 |
+
Rune-Sealed Wall
|
| 216 |
+
Sanguine Syphoner
|
| 217 |
+
Savannah Lions
|
| 218 |
+
Scavenging Ooze
|
| 219 |
+
Scoured Barrens
|
| 220 |
+
Scrawling Crawler
|
| 221 |
+
Searslicer Goblin
|
| 222 |
+
Secluded Courtyard
|
| 223 |
+
Seeker's Folly
|
| 224 |
+
Seismic Rupture
|
| 225 |
+
Self-Reflection
|
| 226 |
+
Serra Angel
|
| 227 |
+
Shivan Dragon
|
| 228 |
+
Sire of Seven Deaths
|
| 229 |
+
Skyknight Squire
|
| 230 |
+
Skyship Buccaneer
|
| 231 |
+
Slagstorm
|
| 232 |
+
Slumbering Cerberus
|
| 233 |
+
Snakeskin Veil
|
| 234 |
+
Solemn Simulacrum
|
| 235 |
+
Soul-Shackled Zombie
|
| 236 |
+
Soulstone Sanctuary
|
| 237 |
+
Sower of Chaos
|
| 238 |
+
Spectral Sailor
|
| 239 |
+
Sphinx of Forgotten Lore
|
| 240 |
+
Sphinx's Tutelage
|
| 241 |
+
Spinner of Souls
|
| 242 |
+
Spitfire Lagac
|
| 243 |
+
Squad Rallier
|
| 244 |
+
Stab
|
| 245 |
+
Strix Lookout
|
| 246 |
+
Stroke of Midnight
|
| 247 |
+
Stromkirk Bloodthief
|
| 248 |
+
Strongbox Raider
|
| 249 |
+
Sun-Blessed Healer
|
| 250 |
+
Sure Strike
|
| 251 |
+
Swamp
|
| 252 |
+
Swiftblade Vindicator
|
| 253 |
+
Swiftfoot Boots
|
| 254 |
+
Swiftwater Cliffs
|
| 255 |
+
Sylvan Scavenging
|
| 256 |
+
Tatyova, Benthic Druid
|
| 257 |
+
Temporal Manipulation
|
| 258 |
+
Think Twice
|
| 259 |
+
Thornwood Falls
|
| 260 |
+
Thousand-Year Storm
|
| 261 |
+
Thrill of Possibility
|
| 262 |
+
Time Stop
|
| 263 |
+
Tinybones, Bauble Burglar
|
| 264 |
+
Tolarian Terror
|
| 265 |
+
Tragic Banshee
|
| 266 |
+
Tranquil Cove
|
| 267 |
+
Treetop Snarespinner
|
| 268 |
+
Twinblade Blessing
|
| 269 |
+
Twinflame Tyrant
|
| 270 |
+
Uncharted Voyage
|
| 271 |
+
Valkyrie's Call
|
| 272 |
+
Vampire Gourmand
|
| 273 |
+
Vampire Nighthawk
|
| 274 |
+
Vampire Soulcaller
|
| 275 |
+
Vanguard Seraph
|
| 276 |
+
Vengeful Bloodwitch
|
| 277 |
+
Vivien Reid
|
| 278 |
+
Wardens of the Cycle
|
| 279 |
+
Wary Thespian
|
| 280 |
+
Wildwood Scourge
|
| 281 |
+
Wind-Scarred Crag
|
| 282 |
+
Witness Protection
|
| 283 |
+
Youthful Valkyrie
|
| 284 |
+
Zimone, Paradox Sculptor
|
| 285 |
+
Zombify
|
| 286 |
+
Zul Ashur, Lich Lord
|
README.md
ADDED
|
@@ -0,0 +1,116 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: cc-by-4.0
|
| 3 |
+
tags:
|
| 4 |
+
- magic-the-gathering
|
| 5 |
+
- deck-building
|
| 6 |
+
- self-play
|
| 7 |
+
- sealed
|
| 8 |
+
- reinforcement-learning
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
# DraftZero: an FDN sealed deck builder learned from self-play
|
| 12 |
+
|
| 13 |
+
A deck builder for Magic: The Gathering **Foundations (FDN) sealed**, trained **only from games it played**, never from
|
| 14 |
+
human decklists. Given a sealed pool (about 81 non-basic cards from six packs), it builds a 40-card deck.
|
| 15 |
+
|
| 16 |
+
- **Report:** [docs/032](https://github.com/danieljbrooks/draft-zero/blob/main/docs/032-sealed-deckbuilding.md)
|
| 17 |
+
(experiment #5 of [DraftZero](https://github.com/danieljbrooks/draft-zero)).
|
| 18 |
+
- **Code:** [`danieljbrooks/draft-zero` @ tag `sealed-builder-v1`](https://github.com/danieljbrooks/draft-zero/tree/sealed-builder-v1),
|
| 19 |
+
`gorge/sealed/`.
|
| 20 |
+
- **Engine:** [gorge](https://github.com/adams-shaun/gorge), a Go rules engine, with DraftZero's opt-in patches
|
| 21 |
+
(`gorge/patches/`).
|
| 22 |
+
|
| 23 |
+
## What it learned
|
| 24 |
+
|
| 25 |
+
Trained only on its own games, the builder learns to build **simple, white-based creature decks that the bot playing
|
| 26 |
+
them can pilot well**: white in about 85% of its decks, white-green in 42% (human players: 17%), fewer tricks and
|
| 27 |
+
card-advantage spells than people play. More search in its training games made its decks steadily more human-like.
|
| 28 |
+
It is a deck builder *for its pilot*, gorge's search with DraftZero's network, not a model of how strong humans build.
|
| 29 |
+
|
| 30 |
+
## Results
|
| 31 |
+
|
| 32 |
+
Win rate of the builder's decks against the decks humans built from the same pools (17lands data), with both decks
|
| 33 |
+
played by gorge's search at 100 simulations. One standard error is about 1 point at 2,000 games.
|
| 34 |
+
|
| 35 |
+
| Builder | Sealed test pools (1,000) | Draft test pools (1,000; never trained on) | Cards shared with the human deck (of 40, sealed) |
|
| 36 |
+
|---|---|---|---|
|
| 37 |
+
| **`sealed_builder_phaseC_gen1.pt`** (the final model) | **63.8%** of 2,000 | | 19.9 |
|
| 38 |
+
| `sealed_builder_phaseB_gen4.pt` | **63.8%** of 2,000 | **57.5%** of 2,000 | 19.2 |
|
| 39 |
+
| 17lands heuristic (best two colours by games-in-hand win rate) | 55.2% | 50.9% | 20.5 |
|
| 40 |
+
| A builder trained to imitate the human decks | 53.0% | 52.7% | 23.6 |
|
| 41 |
+
|
| 42 |
+
All numbers are in `results.json`. The win rate measures how well a deck suits this pilot: the human decks' strengths
|
| 43 |
+
(tricks, card advantage, planeswalkers) need play the pilot doesn't have.
|
| 44 |
+
|
| 45 |
+
## Files
|
| 46 |
+
|
| 47 |
+
| File | What |
|
| 48 |
+
|---|---|
|
| 49 |
+
| `sealed_builder_phaseC_gen1.pt` | **The final model:** an ensemble of 5 deck value networks, trained on self-play games at 100 simulations (phase C, generation 1) |
|
| 50 |
+
| `sealed_builder_phaseB_gen4.pt` | The phase B generation 4 ensemble (games at 25 simulations), the other builder scored on the test pools |
|
| 51 |
+
| `FDN_cardnames.txt` | The 286 FDN card names, in the order of the networks' count vectors (17lands' column order) |
|
| 52 |
+
| `example_pool.json` | One sealed pool (17lands val pool 0) to try it on |
|
| 53 |
+
| `results.json` | The evaluation numbers above, with standard errors |
|
| 54 |
+
| `SHA256SUMS` | Checksums of every file |
|
| 55 |
+
|
| 56 |
+
## The model
|
| 57 |
+
|
| 58 |
+
Each ensemble file holds five **deck value networks** (about 26,000 parameters each) and a little metadata (the land
|
| 59 |
+
counts the training games covered; whether castability is on). A network scores a whole deck; it never outputs one.
|
| 60 |
+
|
| 61 |
+
- **Input:** a deck as a count vector over FDN's 286 cards (basic lands included), plus a fixed table of 76 printed
|
| 62 |
+
facts per card (mana cost, types, power and toughness, keywords, rarity, mechanics tags, colours a land makes),
|
| 63 |
+
stored inside the file. Each card also has learned identity parameters (an embedding and corrections), which start
|
| 64 |
+
at zero.
|
| 65 |
+
- **Output:** a deck strength s(deck). Trained as Bradley-Terry on game results:
|
| 66 |
+
P(deck A beats deck B) = sigmoid(s(A) − s(B) + β · [A played first]).
|
| 67 |
+
- **Parts:** an additive card-quality term weighted by how castable the deck's mana makes each card; a structure MLP
|
| 68 |
+
over deck totals built from learnable card roles (land-ness, effective mana value, creature-ness, colours made); a
|
| 69 |
+
DeepSets context term. Details in the report, §4.
|
| 70 |
+
|
| 71 |
+
**Building a deck** is a search against the ensemble's mean score:
|
| 72 |
+
1. Score a quick deck for each colour combination.
|
| 73 |
+
2. Refine the best four by one-for-one swaps until no swap helps.
|
| 74 |
+
3. Keep the best.
|
| 75 |
+
|
| 76 |
+
## Use
|
| 77 |
+
|
| 78 |
+
```bash
|
| 79 |
+
git clone --branch sealed-builder-v1 https://github.com/danieljbrooks/draft-zero.git
|
| 80 |
+
cd draft-zero && pip install numpy torch
|
| 81 |
+
huggingface-cli download danbrooks/draftzero-fdn-sealed-builder --local-dir hf-sealed
|
| 82 |
+
```
|
| 83 |
+
|
| 84 |
+
```python
|
| 85 |
+
import json, sys
|
| 86 |
+
import numpy as np
|
| 87 |
+
sys.path.insert(0, "gorge")
|
| 88 |
+
from sealed import model as M, build as B, decks as D
|
| 89 |
+
|
| 90 |
+
ens = M.Ensemble.load("hf-sealed/sealed_builder_phaseC_gen1.pt")
|
| 91 |
+
pool = D.C.vec(json.load(open("hf-sealed/example_pool.json"))["pool"]) # {card name: copies}, non-basic cards
|
| 92 |
+
quality = np.mean([m.quality().detach().numpy() for m in ens.members], 0)
|
| 93 |
+
deck = B.build(pool, B.Objective(ens, "mean"), quality, lands=ens.meta.get("lands"))
|
| 94 |
+
print(D.C.dict(deck)) # {card name: copies}, 40 cards
|
| 95 |
+
```
|
| 96 |
+
|
| 97 |
+
Building takes about a second per pool on a laptop CPU. FDN only: the networks know FDN's 286 cards.
|
| 98 |
+
|
| 99 |
+
## Training
|
| 100 |
+
|
| 101 |
+
- **Data:** the networks never saw a human deck. Self-play games in gorge between decks the builder made from 6,240
|
| 102 |
+
17lands sealed pools (pool contents only): about 280,000 games in the final model's lineage, out of 1.1 million in
|
| 103 |
+
the project.
|
| 104 |
+
- **Curriculum:**
|
| 105 |
+
- 3 generations of games played by gorge's heuristic bot, the first on random decks;
|
| 106 |
+
- 7 of games played by the search at 25 simulations;
|
| 107 |
+
- 2 at 100 simulations.
|
| 108 |
+
- **Each generation:** about 800 pools × 5 exploratory decks, 10,000-40,000 games.
|
| 109 |
+
- **Compute:** a laptop, a shared 2× RTX PRO 6000 box (r1, courtesy of Dama) and community RunPod pods; about $9 of
|
| 110 |
+
cloud compute.
|
| 111 |
+
|
| 112 |
+
## Licence and data
|
| 113 |
+
|
| 114 |
+
The weights are released under CC BY 4.0. Pools and human decks come from
|
| 115 |
+
[17lands' public datasets](https://www.17lands.com/public_datasets) (CC BY 4.0); 17lands does not endorse this project.
|
| 116 |
+
Card facts come from XMage (MIT) and 17lands' card table. No Forge card scripts (GPL-3.0) are included.
|
SHA256SUMS
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
9b6fc635736aa515bd66d1a4e2e57b42cbf6cbad13aa72a1baa7c197892d8dc0 README.md
|
| 2 |
+
30bd8a108bf821166341b3cf1e70f6a4ee16037489aecf51912d6acb8d9124c5 FDN_cardnames.txt
|
| 3 |
+
9242d33d26f782323d440b1b630ffef0944454c4929609aa495ecb927dc93482 example_pool.json
|
| 4 |
+
4ac4a55def98ad4ab270c2079004c20d6fd68072abb180671496f93f1217254c results.json
|
| 5 |
+
66aecc3323487fd151f766188f21b22c123a5cccd71839ee65b21663f4fb4b85 sealed_builder_phaseB_gen4.pt
|
| 6 |
+
58aa9aad59992326bd697176306685034121e8aa52a5eebef7f1eda4a7eca736 sealed_builder_phaseC_gen1.pt
|
example_pool.json
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"source": "17lands FDN sealed, val pool 0 (CC BY 4.0)",
|
| 3 |
+
"pool": {
|
| 4 |
+
"Apothecary Stomper": 1,
|
| 5 |
+
"Armasaur Guide": 1,
|
| 6 |
+
"Axgard Cavalry": 1,
|
| 7 |
+
"Bake into a Pie": 1,
|
| 8 |
+
"Banishing Light": 1,
|
| 9 |
+
"Bite Down": 1,
|
| 10 |
+
"Boltwave": 1,
|
| 11 |
+
"Brineborn Cutthroat": 1,
|
| 12 |
+
"Cackling Prowler": 2,
|
| 13 |
+
"Campus Guide": 2,
|
| 14 |
+
"Cat Collector": 1,
|
| 15 |
+
"Claws Out": 1,
|
| 16 |
+
"Consuming Aberration": 1,
|
| 17 |
+
"Courageous Goblin": 1,
|
| 18 |
+
"Crackling Cyclops": 1,
|
| 19 |
+
"Crypt Feaster": 2,
|
| 20 |
+
"Dauntless Veteran": 1,
|
| 21 |
+
"Day of Judgment": 1,
|
| 22 |
+
"Dazzling Angel": 1,
|
| 23 |
+
"Diregraf Ghoul": 1,
|
| 24 |
+
"Dismal Backwater": 1,
|
| 25 |
+
"Dragon Trainer": 2,
|
| 26 |
+
"Eaten Alive": 2,
|
| 27 |
+
"Elementalist Adept": 1,
|
| 28 |
+
"Elfsworn Giant": 1,
|
| 29 |
+
"Empyrean Eagle": 1,
|
| 30 |
+
"Erudite Wizard": 1,
|
| 31 |
+
"Evolving Wilds": 2,
|
| 32 |
+
"Exsanguinate": 1,
|
| 33 |
+
"Faebloom Trick": 1,
|
| 34 |
+
"Fanatical Firebrand": 1,
|
| 35 |
+
"Firespitter Whelp": 2,
|
| 36 |
+
"Fleeting Flight": 3,
|
| 37 |
+
"Giada, Font of Hope": 1,
|
| 38 |
+
"Gnarlid Colony": 1,
|
| 39 |
+
"Goblin Negotiation": 1,
|
| 40 |
+
"Good-Fortune Unicorn": 1,
|
| 41 |
+
"Gorehorn Raider": 1,
|
| 42 |
+
"Hero's Downfall": 1,
|
| 43 |
+
"Incinerating Blast": 1,
|
| 44 |
+
"Inspiring Call": 1,
|
| 45 |
+
"Inspiring Paladin": 1,
|
| 46 |
+
"Macabre Waltz": 1,
|
| 47 |
+
"Make Your Move": 1,
|
| 48 |
+
"Meteor Golem": 1,
|
| 49 |
+
"Midnight Snack": 1,
|
| 50 |
+
"Mocking Sprite": 2,
|
| 51 |
+
"Pilfer": 1,
|
| 52 |
+
"Prideful Parent": 1,
|
| 53 |
+
"Rise of the Dark Realms": 1,
|
| 54 |
+
"Ruby, Daring Tracker": 1,
|
| 55 |
+
"Rugged Highlands": 1,
|
| 56 |
+
"Scoured Barrens": 1,
|
| 57 |
+
"Serra Angel": 1,
|
| 58 |
+
"Soulstone Sanctuary": 1,
|
| 59 |
+
"Sower of Chaos": 1,
|
| 60 |
+
"Spectral Sailor": 1,
|
| 61 |
+
"Stab": 1,
|
| 62 |
+
"Stroke of Midnight": 1,
|
| 63 |
+
"Tolarian Terror": 1,
|
| 64 |
+
"Tragic Banshee": 1,
|
| 65 |
+
"Tranquil Cove": 1,
|
| 66 |
+
"Uncharted Voyage": 2,
|
| 67 |
+
"Vampire Gourmand": 2,
|
| 68 |
+
"Vampire Soulcaller": 2,
|
| 69 |
+
"Vanguard Seraph": 1,
|
| 70 |
+
"Wildwood Scourge": 2,
|
| 71 |
+
"Zimone, Paradox Sculptor": 1
|
| 72 |
+
}
|
| 73 |
+
}
|
results.json
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"note": "Win rate of the builder's decks against the decks humans built from the same pools; both decks played by gorge's search with docs/031's loop B gen 7 network (cpuct 0.5). Pools crossed (i, j), 4 games a pool pair. 17lands data, CC BY 4.0.",
|
| 3 |
+
"test_sealed_100sims": {
|
| 4 |
+
"sealed_builder_phaseC_gen1": {
|
| 5 |
+
"winrate": 0.638,
|
| 6 |
+
"se": 0.01,
|
| 7 |
+
"games": 2000,
|
| 8 |
+
"cards_shared_of_40": 19.9,
|
| 9 |
+
"main_colours_match": 0.26
|
| 10 |
+
},
|
| 11 |
+
"sealed_builder_phaseB_gen4": {
|
| 12 |
+
"winrate": 0.638,
|
| 13 |
+
"se": 0.01,
|
| 14 |
+
"games": 2000,
|
| 15 |
+
"cards_shared_of_40": 19.2,
|
| 16 |
+
"main_colours_match": 0.25
|
| 17 |
+
},
|
| 18 |
+
"17lands_gih_heuristic": {
|
| 19 |
+
"winrate": 0.552,
|
| 20 |
+
"se": 0.01,
|
| 21 |
+
"games": 2000,
|
| 22 |
+
"cards_shared_of_40": 20.5
|
| 23 |
+
},
|
| 24 |
+
"imitation_of_human_decks": {
|
| 25 |
+
"winrate": 0.53,
|
| 26 |
+
"se": 0.011,
|
| 27 |
+
"games": 2000,
|
| 28 |
+
"cards_shared_of_40": 23.6
|
| 29 |
+
}
|
| 30 |
+
},
|
| 31 |
+
"test_draft_100sims": {
|
| 32 |
+
"sealed_builder_phaseB_gen4": {
|
| 33 |
+
"winrate": 0.575,
|
| 34 |
+
"se": 0.01,
|
| 35 |
+
"games": 2000,
|
| 36 |
+
"cards_shared_of_40": 31.6
|
| 37 |
+
},
|
| 38 |
+
"17lands_gih_heuristic": {
|
| 39 |
+
"winrate": 0.509,
|
| 40 |
+
"se": 0.011,
|
| 41 |
+
"games": 2000,
|
| 42 |
+
"cards_shared_of_40": 33.2
|
| 43 |
+
},
|
| 44 |
+
"imitation_of_human_decks": {
|
| 45 |
+
"winrate": 0.527,
|
| 46 |
+
"se": 0.011,
|
| 47 |
+
"games": 1999,
|
| 48 |
+
"cards_shared_of_40": 34.5
|
| 49 |
+
}
|
| 50 |
+
},
|
| 51 |
+
"val_sealed": {
|
| 52 |
+
"sealed_builder_phaseC_gen1": {
|
| 53 |
+
"100sims": 0.669,
|
| 54 |
+
"300sims": 0.652
|
| 55 |
+
},
|
| 56 |
+
"sealed_builder_phaseB_gen4": {
|
| 57 |
+
"100sims": 0.661,
|
| 58 |
+
"300sims": 0.656
|
| 59 |
+
}
|
| 60 |
+
}
|
| 61 |
+
}
|
sealed_builder_phaseB_gen4.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:66aecc3323487fd151f766188f21b22c123a5cccd71839ee65b21663f4fb4b85
|
| 3 |
+
size 1102883
|
sealed_builder_phaseC_gen1.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:58aa9aad59992326bd697176306685034121e8aa52a5eebef7f1eda4a7eca736
|
| 3 |
+
size 1106825
|