Pauperformance / pauperformance-bot

Myr (Pauperformance bot).
GNU General Public License v3.0
1 stars 2 forks source link

WIP: Feature/archetype centroid #78

Closed Sprootsy closed 6 months ago

Sprootsy commented 2 years ago

First working solution for #75 I've tried it with 3 archetypes with different settings (see the main fun in the main.py Here are the results:

# BURN
## DECKS
nr. decks: 1404 max: ('Lightning Bolt', {'decks': 1404, 'count': 5614})
max deck freq.: ('Searing Blaze', 1.1025641025641026)
staples(decks): ['Chain Lightning', 'Fireblast', 'Lava Spike', 'Lightning Bolt', 'Needle Drop', 'Rift Bolt', 'Searing Blaze']
stdev: 0.26507620094684603 mean 0.11472955268575706 variance: 0.0702653923084127
staples(decks): ['Chain Lightning', 'Curse of the Pierced Heart', 'Electrickery', 'Fireblast', 'Firebrand Archer', 'Flame Rift', 'Flaring Pain', 'Ghitu Lavarunner', 'Incinerate', 'Keldon Marauders', 'Kiln Fiend', 'Lava Spike', 'Lightning Bolt', 'Martyr of Ashes', 'Molten Rain', 'Needle Drop', 'Pyroblast', 'Rift Bolt', 'Searing Blaze', 'Shard Volley', 'Skewer the Critics', 'Staggershock', 'Thermo-Alchemist']
## CARDS
max card freq ('Lightning Bolt', 0.07511774780560908)
staples(cards): ['Chain Lightning', 'Fireblast', 'Lava Spike', 'Lightning Bolt', 'Rift Bolt', 'Searing Blaze']
stdev: 0.01823388787767337 mean 0.0072992700729927005 variance: 0.00033247466713556384
staples(cards): ['Chain Lightning', 'Curse of the Pierced Heart', 'Electrickery', 'Fireblast', 'Flame Rift', 'Flaring Pain', 'Ghitu Lavarunner', 'Goblin Fireslinger', 'Incinerate', 'Keldon Marauders', 'Kiln Fiend', 'Lava Spike', 'Lightning Bolt', 'Martyr of Ashes', 'Molten Rain', 'Needle Drop', 'Pyroblast', 'Rift Bolt', 'Searing Blaze', 'Shard Volley', 'Skewer the Critics', 'Staggershock', 'Thermo-Alchemist']

# Stompy
## DECKS
max deck freq.: ('Vines of Vastwood', 1.0437893531768747) max card freq ('Rancor', 0.07080759260296716)
staples(decks): ['Gleeful Sabotage', 'Hunger of the Howlpack', 'Nettle Sentinel', 'Quirion Ranger', 'Rancor', 'Skarrgan Pit-Skulk', 'Vines of Vastwood']
stdev: 0.24695354881615056 mean 0.10891476610506134 variance: 0.06098605527289086
staples(decks): ['Epic Confrontation', 'Fog', 'Gather Courage', 'Gleeful Sabotage', 'Groundswell', 'Hornet Sting', 'Hunger of the Howlpack', 'Nest Invader', 'Nettle Sentinel', 'Quirion Ranger', 'Rancor', 'River Boa', 'Scattershot Archer', "Shinen of Life's Roar", 'Silhana Ledgewalker', 'Skarrgan Pit-Skulk', 'Vault Skirge', 'Vines of Vastwood', 'Young Wolf']
## CARDS
staples(cards): ['Nettle Sentinel', 'Rancor']
stdev: 0.015191058558437394 mean 0.006024096385542169 variance: 0.00023076826012587398
staples(cards): ['Burning-Tree Emissary', 'Gather Courage', 'Gleeful Sabotage', 'Groundswell', 'Hornet Sting', 'Hunger of the Howlpack', 'Nest Invader', 'Nettle Sentinel', 'Quirion Ranger', 'Rancor', 'River Boa', 'Scattershot Archer', 'Silhana Ledgewalker', 'Skarrgan Pit-Skulk', 'Vault Skirge', 'Vines of Vastwood', 'Young Wolf']

# Izzet Faeries
## DECKS
max deck freq.: ('Skred', 1.0330528846153846)
staples(decks): ['Augur of Bolas', 'Brainstorm', 'Counterspell', 'Lightning Bolt', 'Ninja of the Deep Hours', 'Preordain', 'Skred', 'Spellstutter Sprite']
stdev: 0.24274328967689218 mean 0.10053095261697066 variance: 0.05892430468315959
staples(decks): ['Augur of Bolas', 'Brainstorm', 'Counterspell', 'Delver of Secrets', 'Dispel', 'Echoing Truth', 'Electrickery', 'Faerie Miscreant', 'Faerie Seer', 'Gorilla Shaman', 'Gush', 'Hydroblast', 'Lightning Bolt', 'Ninja of the Deep Hours', 'Ponder', 'Preordain', 'Pyroblast', 'Relic of Progenitus', 'Skred', 'Spellstutter Sprite', 'Stormbound Geist']
## CARDS
max card freq ('Spellstutter Sprite', 0.0729338911762421)
staples(cards): ['Counterspell', 'Ninja of the Deep Hours', 'Spellstutter Sprite']
stdev: 0.014502144957401469 mean 0.005154639175257732 variance: 0.00021031220836548482
staples(cards): ['Augur of Bolas', 'Brainstorm', 'Counterspell', 'Delver of Secrets', 'Electrickery', 'Faerie Miscreant', 'Faerie Seer', 'Gorilla Shaman', 'Hydroblast', 'Lightning Bolt', 'Ninja of the Deep Hours', 'Ponder', 'Preordain', 'Pyroblast', 'Skred', 'Spellstutter Sprite']

I think the second line after ## DECKS is the most solid (corresponds to line 158 in the main.py) because the data is more sparse (stdev is higher). This is ignoring the amount of copies played. It's only counting the nr. of decks that contain a certain card, so it's basically the frequency of use in tournaments.

I did not implement the filter for the set index yet.

ShadowTemplate commented 2 years ago

Very interesting! What I'm missing is how you plan to compute the number of copies for each card.

Are you trying to solve one problem at a time? First identify the cards, then compute the quantities?

Sprootsy commented 2 years ago

Very interesting! What I'm missing is how you plan to compute the number of copies for each card.

Are you trying to solve one problem at a time? First identify the cards, then compute the quantities?

It's already there, at line 138 is summing quantities and the one above it counts for the nr. of decks where the card is present.

Sprootsy commented 2 years ago

However, using the nr. of copies seems to lead to less sparse data, so it makes it more difficult to define the staples

Sprootsy commented 2 years ago

I noticed that I pushed some code that was not supposed to be here, so I removed that.

I also added the ArchetypeCentroid class.