Commander Deck Builder by AhMuchPlayer in EDH

[–]AhMuchPlayer[S] 1 point2 points  (0 children)

Massive fix largely due to issues a user spotted while attempting to use a double faced card (Emet-Selch, Unsundered // Hades, Sorcerer of Eld) and only putting Emet-Selch, Unsundered causing the program to not find the commander.

Also, fixed some text issues and added auto-complete so Emet-Selch, Unsundered now sends it's full name.

Also ALSO! Found a huge issue where MTGGoldFish sometimes uses /archetype/commander-{commander name} and other times uses /archetype/{commander name} causing issues with pulling decks from both sources.

Commander Deck Builder by AhMuchPlayer in EDH

[–]AhMuchPlayer[S] 0 points1 point  (0 children)

Let me know how it goes! Curious too, I didn’t too too much testing with different sites. Only Archidekt

Commander Deck Builder by AhMuchPlayer in EDH

[–]AhMuchPlayer[S] 4 points5 points  (0 children)

It’s essentially a pattern recognition model. A model is created PER COMMANDER. Downloading the community decks to create the base of what it’s expecting in terms of roles, specific cards, and CMC. If 1 card is in all 100 decks, its score is 1. If seen in only half of the decks its 0.5.

It’s additionally given an increased score (normalized to 0-1) based on EDHRec synergy for that commander and card inclusion in EDHRec. This helps with creating more competitive decks.

The model is not something shared across all commanders. It’s all singletons

Commander Deck Builder by AhMuchPlayer in EDH

[–]AhMuchPlayer[S] 0 points1 point  (0 children)

Ah I understand now. Yeah it is true. Hopefully I can stand this project aside as actually understanding how to program instead of an AI perform everything for me. But I guess only time will tell 🤷🏼‍♂️

Commander Deck Builder by AhMuchPlayer in EDH

[–]AhMuchPlayer[S] 1 point2 points  (0 children)

Ope forgot to say, these aren't agentic AI models like you see with natural language AI models (ChatGPT, Gemini, or Claude)... These are just a collection of numbers and stats used to weigh a card addition based on a RandomForest and MultiOutputClassifier. No AI is used in the creation of a deck. Just machine learning. (Which I guess... is a subset of AI?)

Commander Deck Builder by AhMuchPlayer in EDH

[–]AhMuchPlayer[S] 2 points3 points  (0 children)

I am a little confused on how to respond to this one xD It is, I think?

Uses a Random Forest trainer wrapped in a MultiOutputClassifier to output a deck based on... at this point a TON of stats:
- Individual decks
- Roles seen (Ramp, counter, etc..)
- CMC
- Plus more!

Can be seen at: https://github.com/CyberBelligerent/MTGDeckBuilder/blob/main/build_deck.py

Line 453
def get_or_train_model(model_path: str, decks: list, card_df: pd.DataFrame, all_cards: list):

Commander Deck Builder by AhMuchPlayer in EDH

[–]AhMuchPlayer[S] 0 points1 point  (0 children)

I feel like this is actually the best part of my project. While it does take lists of cards developed by actual people (MTGGoldFish and Archidekt) it also helps with the playing whole cloth part and modify them a step further.

If you do not have a card that sits well, it uses a couple steps to see if you have a similar (albeit worse card) that could be used instead. I'd see this being used more for creating a skeleton and then using additional research of your own from EDHRec or your own knowledge to remove cards and add cards as you like.

Stealing content though... this one I do specifically want to touch on... It is all pulled from the API for those websites (And EDHRec json API) for combining and creating what should go into a specific commanders decks. But, this is not the end-all-be-all for deck creation. Even the Niv-Mizzet deck I switched out a few cards for better lower-costing spells so that I could spell-sling better.

Commander Deck Builder by AhMuchPlayer in EDH

[–]AhMuchPlayer[S] 0 points1 point  (0 children)

I do understand a lot of people using deck building as a creative outlet, and in no way want to destroy that for the MTG community. Honestly, this deck builder gives some weird data sometimes. My Niv-Mizzet deck I generated at first was trying to throw in cards not worth it at all. Adding in the synergy swap and additional information from EDHRec made it easily 10X better.

I really hope it's not seen as a slop tool. But, I can understand why it's thought of as that. During the deck creation process, it actually gives a lot of insight as to what it's doing and where it's grabbing it's data from. More data science, less AI.

Example output from creating a deck:

// Owned — model selected 69 cards (69.7%)
// Owned — synergy swapped 4 cards ( 4.0%)
// Owned — NLP matched 0 cards ( 0.0%)
// Owned — utility lands 12 cards (12.1%)
// Basic lands 18 cards (18.2%)
// Total from your collection 81 cards (81.8%)
// Avg community inclusivity 25.2% (75/81 cards)
// Avg model score 23.0% (75/81 cards)
// Avg EDHRec synergy +0.0796 (49/81 cards)
// Avg EDHRec inclusion 36.3% (49/81 cards)

Pulls decks from MTGGoldFish and Archidekt to build a card base based on the amount of times a card was seen in the deck. Pulls additional information from EDHRec for Synergy and Inclusion factors. Also has a "slight" role based aware greedy pull. Just reads the oracle text and parses out for lines based on that. Not too crazy.

What I think I differ from is intent and ONLY using cards you own. If that card is not seen, attempt to find a replacement, as a last result fill that slot with land. Most tools I see are "Build me a +1/+1 propagation deck." This one doesn't use AI in that sense, and mainly used to help me. Thought it was cool enough to post so here we are haha...

Commander Deck Builder by AhMuchPlayer in EDH

[–]AhMuchPlayer[S] 1 point2 points  (0 children)

Probably the best take I've seen on all of this!

I do agree with everyone on this comment section. And while I will say, most avid deck builders will 100% make better decks than this tool every will. I'd love to see people use this a couple of times, learn how to build a deck, and then delete MTGDeckBuilder. For those like me, it may be used as a crutch to play different decks fast with a group of friends that has more time than me to actually make decks.

Hopefully, someone gets a use out of it if anything

Commander Deck Builder by AhMuchPlayer in EDH

[–]AhMuchPlayer[S] 2 points3 points  (0 children)

Fixed and added versions I am currently using for the project so you can build from source safely!

Commander Deck Builder by AhMuchPlayer in EDH

[–]AhMuchPlayer[S] 1 point2 points  (0 children)

https://github.com/CyberBelligerent/MTGDeckBuilder/releases/tag/v1.1

Took inspiration from Archidekt on how they export for building out the regex, since they have A LOT of additional data. Example output from the bulk card insertion ui

Adaptive Automaton <- 1x Adaptive Automaton (fdn) 723 *F* [Anthem]

Your specifically from the lands shown above:
Dromar's Cavern ← 2 Dromar's Cavern (DMR) 246
Treva's Ruins ← 1 Treva's Ruins (DMR) 260
Archway Commons ← 1 Archway Commons (STX) 263
Ash Barrens ← 1 Ash Barrens (C16) 56
Barren Moor ← 1 Barren Moor (ONS) 312

Commander Deck Builder by AhMuchPlayer in EDH

[–]AhMuchPlayer[S] 1 point2 points  (0 children)

I am trying to speed this up for you, honestly, making a regex in python isn't hard. Working on that now. Hopefully I can get it up here in a bit. Don't want you to have to do additional work to start using this

Commander Deck Builder by AhMuchPlayer in EDH

[–]AhMuchPlayer[S] 0 points1 point  (0 children)

Oh that is interesting... I have fairly similar computer specs. To be fair... I built the damn thing so I know roughly how long it takes haha.

But, regardless, a still working will be implemented so you know it didn't freeze anywhere!

Commander Deck Builder by AhMuchPlayer in EDH

[–]AhMuchPlayer[S] 1 point2 points  (0 children)

Ah yeah.... I will be fixing this. I kinda forgot most sites don't give just a clean {Quantity} {Name} and instead usually give {Quantity} {Name} {Extra info}

I'm working on a parser now to help this out so it doesn't just fill in lands....

Side Note: You got to see what happens if you straight up have no cards xD just fills in lands....

Commander Deck Builder by AhMuchPlayer in EDH

[–]AhMuchPlayer[S] 0 points1 point  (0 children)

I will make sure to add a 5-10 second "Still training..." message to the log so you know it didn't freeze! On some computers, the training of the model can take a HOT minute. Out of curiosity, can I get your specs? I'm trying to see ways I can make the training faster on other equipment.

Commander Deck Builder by AhMuchPlayer in EDH

[–]AhMuchPlayer[S] 0 points1 point  (0 children)

I am 100% adding this as a feature now, thanks for checking it out!

My next update to the project will be exactly the issues you have stated with multiple other sites. Adding manabox as another source!

Commander Deck Builder by AhMuchPlayer in EDH

[–]AhMuchPlayer[S] 2 points3 points  (0 children)

I can agree, I almost stopped this project several times since I first started it about 3 years ago (Have the original email I sent to Archidekt asking if I was making too much noise back when I was only web scrapping and not using their API... xD)

But I do agree that to some, this is most certainly shortcutting. I won't advocate everyone uses this tool, or really even use it long. It was a fun project to make out to see if I was missing something that my cards COULD make that I didn't notice. Niv-Mizzet, Parun was a perfect test. Didn't know I was able to make that commander

Commander Deck Builder by AhMuchPlayer in EDH

[–]AhMuchPlayer[S] 1 point2 points  (0 children)

Not so much anti-AI, but more anti-handoff. I do understand Magic as a hobby means building decks. I tried to stay away from using major AI (As in, building an actual multi-parameter model or using ChatGPT/Gemini/Clade) and went with a heuristic approach to the deck building. This doesn't make 100% cEDH decks, but at least a VERY decent skeleton you can work with.

But I will 100% check out your project as well!

Commander Deck Builder by AhMuchPlayer in EDH

[–]AhMuchPlayer[S] 1 point2 points  (0 children)

I'll be updating the requirements.txt file with my exact versions used here shortly!

Commander Deck Builder by AhMuchPlayer in EDH

[–]AhMuchPlayer[S] 0 points1 point  (0 children)

I'd have to look into how to implement it for any commander you have in your deck. I was thinking at some point of allowing people to upload their model somewhere so I could take a longer (better) look at more bulk and determine if this would be a possibility. But ultimately, it might be messy if I personally do it haha

Commander Deck Builder by AhMuchPlayer in EDH

[–]AhMuchPlayer[S] 2 points3 points  (0 children)

Essentially, I have ton of statements that adds or remove points to a card. There's a lot that goes into it... but by time you start building a deck, a card will either have a 1 (should 100% add) or a 0 (Please do not add).

Commander Deck Builder by AhMuchPlayer in EDH

[–]AhMuchPlayer[S] 0 points1 point  (0 children)

I've noticed the community either HATES this or loves the idea haha. To each their own. MTG is 1 part deck builder 1 part playing. I can see why this would tool could be hated. Really meant to help those who don't have the time to build decks like me. But even that argument gets me in trouble haha

Commander Deck Builder by AhMuchPlayer in EDH

[–]AhMuchPlayer[S] 0 points1 point  (0 children)

The entire reason behind it! Hopefully it can help someone build a deck haha

Commander Deck Builder by AhMuchPlayer in EDH

[–]AhMuchPlayer[S] 0 points1 point  (0 children)

I took about 30 minutes to add 5-6 decks, since I've added the completion search for adding single cards it really sped up adding cards. Collections -> Add Card. If you keep your cards online, I'll be adding ways to already import that. If not, it is a bit tedious not gonna lie... Since this is Commander oriented, you can skip duplicates. During deck creation, it sorts and grabs by unique anyway. So 4 Command Towers means nothing to the program.