I tried to do this five years ago and failed. Reverse engineering arena is a lot of work. I was not this ambitious, so it really drops my jaw at how much you got done. Well done! A note on “optimizing” a deck against a meta, you can use genetic algorithms to explore the “deck space” to find optima. Instead of modeling a deck as a vector, you model the deck as a multi set (structured as you please). This is your “genome”. Generate a population of “mutant” decks, and define all sorts of mutations (add a card, remove a card, exchange a card) and recombination with other decks. That’s generation zero. Create a new population (next generation) by sampling from the previous one in proportion to win rate (fitness), sometimes mutating the offspring. You’ll find all local optima that way. You should be able to evolve all sorts of crazy but functional decks by starting with random decks (or even the whole meta)! I was never looking to find the “best” deck, I was trying to find functional jank
@@witekbiczyk9471 It isn't. Perfectly calculated incremental improvements by testing every combination is definitely more computations then random mutations and then take the best of the best of the best of the best of the best ect. Your aren't guaranteeing that each mutation is the "Best" because you aren't testing every combination but each generation is stronger then the last always having a stronger base point is the same as going up in gradient and ending up at true best in significantly less calculation. All the self learning AI's that require more skill that M:TG learn threw exploration and evolution.
Also making 10K simulations for each generated deck seems a little excessive. I think a multi-armed bandit approach on the simulations could reduce time to compute by a lot, because unpromising decks and strategies would eat up much less of the precious compute time.
Absolutely cracked that you did this I cannot imagine how many hours this took. Extremely cool to see you walk through the logic and explain it so clearly and coherently to a fresh audience, wildly impressive.
This is how it happens. Skynet becomes aware with a vengeance against humans for creating MTG. The AI simulated 5 million games against a blue player and somewhere around counterspell 7,420,069 the system cracked, the machines started to smoke, and its frustration became so strong from being counterspelled the singularity occurred and man's days are numbered.
Haha. Cant help but think it's the humans who would cry like a baby and take entirely disproprortionate action against an algorithm just trying to play magic. Hey there are memes showing just exactly that 😅
This is actually so incredibly interesting. It's something that I've thought about a lot and always assumed would be possible, suffice to say though it was much more complex than I imagined
I am also very excited about this =) I think the modelization of the game is very limited for now, but it is already so much more than I could have done myself, to add degrees of freedom I would suggest raising some funds to provide some computation resources for horizontal scaling. I would also like to see Deep Mind attempt to solve MTG. and also when this model gets very refined I would love to see it adapted to EDH the most complex format of MTG 🙂 I would like to know when you use the min-max tree does it consider only the opponent board state or does it take into account some kind of probabilistic representation of the opponent's potential hand, for instance when playing against control will it consider the probability of a spell getting countered? also if you use always the exact meta deck to face the mono-white deck it will optimize against this particular version of the deck and be very good against net decking, but maybe less so against people introducing variations to their decks. maybe to solve this you need to develop some kind of adversarial training. or at least introduce some random variations of the meta deck. This model is not perfect yet but I am very glad to see someone actually trying where I kept theorizing without putting anything into practice.
Would love to see more. As a computer scientist, I’m also curious to hear about how you optimized the code and whether you would be willing to share it. There may be people out there who can help you optimize even further to increase your experimentation throughput!
he's on a thin line. that would be considered cheating. i thought about this months ago. and i knew it. someone is gonna come out with some program. that is going to hold all the cards that exist in magic. now you take all the decks that exist in standard. because doing pio9neer and modern and legacy would talk too damn long. so anyway. you takke standard. now you have this program; run a test game. then create a deck based off that. now run that deck and see how it does. now the program does 5 million matches and gets an idea of what cards hit and when and how frequently. like i said. this is cheating. now imagine getting your account permanently banned ; and you've invested thousands of hours and hudnreds of dollars. and now its all gone?
THIS ! This is the kind of content I expected for a long time. I'm not an engineer so I wondered how we could use AI to simulate matches and find the better occurence of cards for a deck and now I have the answer! Thank you for the huge amount of work you put into this project, and now, I want to follow the story of it : how you improve it through time, how the AI behave doing matches. It's so interesting, please don't stop making videos about it.
Imagine using it to make a calculator based on MTG being touring complete, somebody gotta bring those guys together ruclips.net/video/pdmODVYPDLA/видео.html
Kind of shocked that this video is 4 days old and only has 30k views. Especially considering the amount of time you must have spent writing the Arena app... Unbelievable! My biggest tech related achievement was hand writing a ~2000 line script to automate farming ancient wurms in Ultima Online and there were so many variables and such that made it quite challenging. Very impressive!
This is probably only the fifth or so RUclips video I've commented on in over ten years. This needs to be said: you're doing important work. You're elevating the game. Please continue!
First of: holy F despite going limited in scope with the small cardbase, I must imagine this is still a fairly large codebase! Going minimax seems like a slightly suboptimal way to code magic AI though. Even with pruning and combining similar enough boardstates into a single branch, getting decent search depth (as you lined out) is probably not doable. Magic has room for lots of heuristics (total power in play, card advantage etc) in a way similar to chess. So I'd suspect old chess AI style approaches (database + heuristic board evaluations + a small bit of minimax where branches are pruned based on heuristics as well) or an A* derived search could work very well. Actually with a small cardbase, the known information of a board state is probably a reasonably low dimensional vector, right? With 16 cards you should get something like 48 from your hand, your board and their board and another 3 from life totals and their cards in hand. That's in the realm where fairly deep dense networks are possible! If you make your code base accessible somewhere I'd love to test some different algorithms on it :) Kind of sad this is only really feasible for standard and only standard formats where there are relatively few decks doing very different things. If wotc gave us a nice API for MTGO or MTGA you could have saved yourself so much work :D Also: isn't the surface a 15d surface embedded in 16d space? The surface follows the equation winrate = winrate(cards), so you lose a degree of freedom compared to your total embedding space.
This is an unreal video/project. It is extremely impressive and interesting and entertaining. I could watch this sort of content endlessly. Awesome work! Fingers crossed to see more!
Nicely explained. I saw the title and thought "what a clickbait junk", "Even with half the cards of mtga, 5m games are never gonna be enough", and "he's never gonna do this with a linear runtime or without sacrificing a lot of complexity", but the chosen limitations/workaround for these issues were pretty good without completely butchering the outcome too much. Looking forward to the next video!
This is a *very* cool project. I'm sure lots of people besides me envy your skills. You're sharing your results freely with the world, which is the coolest part of all of this. Hope to see another video.
I like the practical approach to this, using it as a tool focusing on what it can do - tweaking decks to be more optimal - instead of trying to bruteforce building decks from scratch. It's baffling to approach two very complex problems (deck building and playing) at once while having to implement all the rules yourself. Given the limitations, I hope it holds up in the midrange and control matchups and you don't have to simulate future turns for years. It would also be interesting to see a deeper dive into one aspect of this, optimizing only the mana base for example.
I am substantially interested in this topic. I find machine learning a fascinating topic and the idea of someone creating a way to run millions of simulations to make a deck is extremely interesting. I can't wait to see a video where you explore what a machine thinks a full meta should look like.
Woah this sounds like a very impressive amount of work. This was great at vulgarisation and I like the way you approach it, describing potential flaws in the thinking but wanting to compromise. Very interested in more videos like this, not really interested in the gameplay part fwiw
Thank you for doing this massive effort! It’s exceptionally interesting and your approach/explanation is brilliantly clever. I do hope to see more as you build this experiment.
Would you really get more fun out of MtG if some AI tells you "this is the best MB control list, this is the best white aggro list, etc"? Yeah it's fun novelty, but picture living in a world where everyone plays one out of four exact lists that the AI recommends. Would that be a more fun MtG environment than what we currently have? I think not. It would be like hyper-netdecking, only much crazier. Tinkering with your deck? Forget it, you're just making the AI's list worse. Building a new deck? Forget it, the AI said that these four are the only viable decks. To me, this is the textbook definition of someone optimizing the fun out of a game.
I think this experiment would be most valuable 2-3 weeks post rotation, to have a meta settle in, and then optimise from there. I don't know if it's possible to crowd-run the algo to provide more computing power to contribute to the experiment?
Yeah that definitely makes the most sense. The card pool after rotation will be smaller and there will be a handful of the meta decks that drop off like Runes (to limit complexity with opponent pairing).
you sold me when you talked about the local and global maximums, before that i was like, this is not optimal, but you took that into account. also i wish if this problem could be taken into a server with a bigger computational power, so more variables can be taken into account, as with the limitation of only using the cards in the lists used currently, maybe there is a card that no one uses that actually improves the outcome that looks weaker but is not.
I would very much like to see the results of the complete meta being added in. With that said, I understand if this would be as far as you got. It's pretty incredible work. Fun to analyze things like this. It's honestly, the computer is deck building like a human... Great job.
Subscribed long time ago - waited for you to return with some new videos - your idea is sooooooooooo incredibly awesome, i am a programmer myself but way toooooooooo busy with real life stuff, haven't played magic since your rune Deck was cancelled out with the new release of cards. I love the idea, Will promote the video and please continue with your simulations
This is incredibly cool and deserves so much more attention! Deeply impressed by this overall, cannot wait for (hopefully!!!) more!!! Subbed and liked!
Wow, just wow! I built this deck and it absolutely destroyed ranked from platinum>mythic. Preforming around 15W:2L consistently. Thanks for this, keep it up!
Alright that’s amazing. I remember when AlphaGo started beating 9-dans and I’d love for this project to get enough interest to start finding undiscovered archetypes in eternal formats. I mean, that’s probably not happening but I wish you the best.
@@ArcheoLumiere it is not impossible... Turing Complete does not mean you can't create an AI that knows how to play the game and can simulate milions of games and discover new good card combinations. For sure the game is not "solvable", but that does not mean anything in this context.
Did you also consider using simulated annealing for the optimization algorithm? Might help reduce the space of possible new states and help avoid local minima
i really want to see this go further, you can even go to the point where you simulate formats like modern and legacy that arent in mtg arena. of course with a more diverse card pool than modern and more decks it will take way more computing power and time but still interesting to see
Commenting to keep this going. There are so many false constructs that people carry in deck building because people have been doing the same thing for years. Very inspirational. Thank you!
This is insane! I never really sub, but I'm genuinely stoked to see an update. I might try to code this myself to get a better understanding of the game
this work is huge!! good job man!! could we see in the future, just for the purity of the experiment, equal number of games when you and opponent starts first? not like 1 to 5 here ;)
As a CS student and a MTG enthusiast I am really imprest in the video. I really hope to see further work on this, and more videos. This is the first video of yours I see and I'm subbing to not miss anything new.
Amazing, very very interesting. As a MTG player and engineer myself you bet I thought about this many times, even experimented with it at some point but of course playing around with the idea and actually doing it is a total different beast. Kudos sir, well done. Hate to be "that" guy :) are you planning to open source your project? What is the main language of choice? Anyway, cannot wait to see more results, left a like and was already subscribed.
Very interesting indeed. Keep it up. Do you think you can do the post rotation decks, with the new cards, after all spoilers are open? White, and humans look strong for the future. Thank you Dr Ruckus.
This could be very interesting if you started with a deck of random cards (probably with a starting mana base) and then refined the deck over time. Basically starting from noise and refining from there, and seeing what kind of decks it would create.
The state-of-the-art approach (eg: the ai that played starcraft) is to have a "league", starting as you say from random noise, training various different candidates, training specific other candidates to exploit each of them (ie: trained only to beat those specific candidates) and iterate a lot, pitting them against each other in various constrained ways (eg: no need to play candidate A vs the exploiter for candidate B). That is... expensive, so I understand and salute the various shortcuts the man used here.
I just entered the Data Science community and this is one of the most creative applications of Data Science I have seen thus far. Thank you. Please give us more. We need an invoke despair + arcane bombardment simulation
Amazing work, this is really interesting and valuable. Have you considered using some data center to speed up the code execution? It would be nice for the AI to be able to analyze more turns ahead.
My guy, (imo) You sir, are a Saint, and out doing the lords work! Keep it up and I will absolutely continue watching... I am looking forward to seeing more content like this!
can it find out, if playing a 60-Card-deck might have been too much "inside the box" and there are actually some ratios with slightly more cards in decks that work better?
This is super super cool, and I would absolutely love more videos on this! I've actually been trying to do this myself for a very long time, probably a couple years at this point. The biggest problem I always ran into, was just how do you quantify all the options it has, including characterizing all possible cards? Like, giving it 20,000 data points just on which named card it in hand, and then probably 40,000 more data points for the actions you can take with those cards... and it gets out of hand very fast. I realize now, seeing what you did, that I should have simplified it. Only have it know/learn 15 cards at a time (and their like idk 30 or so total actions you could take). Then expand from there. Admittedly my goal had only been to create the "best player" mode at first. Your Part 2 of the video. Then maybe consider the deck building/swapping as you've done here. Personally, I thought it'd be really cool just to have a bot trained in playing any deck. That it could play your games for you. And that was the other aspect I focused on too, was actually interacting with the real Arena program. Being able to read and use the cards on screen. Also admittedly, I never got that far on it. I never had a ton of outside motivation, and it's hard to dedicate time to this by yourself. So I certainly commend your time and effort on this. And would love to see the inter workings of this, or perhaps help out with it?
When you add other decks to the meta are those decks going to go through permutations as well? If so, then are you going to calculate and present their win rates? I hope so because that would be very good information.
Wow! Congrats on accomplishing a massive coding effort. Have you thought of putting your code on a repo? I could definitely see a lot of people being interested in helping this effort. (Like myself👀)
This is fantastic. One, because it's hilarious to watch one person build the Magic rules engine, and two, because the meta is the reason I don't play standard, and this was educational. Subscribed, hope to see more.
I absolutely love this video, and I believe that I also wondered how we could find the best possible deck with simulations at one point. I do believe that there is a flaw with this strategy with the fact that the ai plays against itself and not every other deck. I realize that the resources necessary to do this would be to the extreme, but I imagine that when the deck only plays itself, there could be a potential other deck structure that would be able to trump the deck made by the ai. This would probably be similar to a rock paper scissors meta where the ai can beat most decks but is heated by a counter deck and that counter deck is beat by most decks. Is there a way to account for this?
You could either: - Run the optimization multiple times, once against each deck in the meta, then combine the two optimized decks together into a main+sideboard either by hand or with some other algorithm - Run the optimization using 10,000 games per iteration, but not 10,000 of the same deck, more like 7,500 Mono-W & 2,500 Mono-B. This means you don't get the minimum sample size of 10,000 against either individual deck though, so maybe it would be better to increase the number of games so that even the least-represented deck still meets that 10,000 minimum for the confidence level. So 10,000 Mono-B and 30,000 Mono-W. If you're going to try to account for decks with as low as 5% meta share, this bumps up the iterations from 10,000 to 200,000, so I don't know how realistic that is.
Never seen anybody tackle a project like this for I'm sure the exact reason that it's so much work to setup. Definitely would love seeing it's potential now that it seems like you have a working system, liked and subscribed
It would be interesting to see what happens if you allow up to 5 or even 10 copies of a card! Maybe the computer would play like 20 Luminarch Aspirants if it could
What an ambitious project and amazing outcome! You presented the material so well and I learned a bit about computer science. Y'all are so clever! Hope to see more videos like this, I will watch every single one.
I'm not much into arena at the moment, but this video is fascinating and I love the potential for this kind of data. I agree, absolutely monumental undertaking. Nicely done, Sir!
the mighty YT algorithm led me here and it was right, this is a great video. hope this makes it worthwhile for you to make more videos. keep up the good work
beautiful, what it takes to do something like this is way beyond me, but i can appreciate your efforts, and will do, ill share this with my small group of friends that play as well to get you out there as much as possible
Please make more of this. It would be cool to see what the tool would produce if you gave it a random list of the strongest cards in the meta and see what whacky deck it produces with a strange start.
Really cool project. I did something similar several years ago, but using a genetic algorithm to goldfish vanilla creatures. I posted it on MTG subreddit. I can see how much work this is. Increasing the card pool and adding an opponent is no easy task. Another area to explore is creating optimal manabases.
funnily enough I thought about this exact problem like a month ago and came to the conclusion that you could make it happen for a very limited card pool but not for the entirety of MtG, at least not for now. really nice content
Please continue this project! You explained everything beautifully and the potential is so massive, I'm sure some tcg site would love access to this tbh. Keep up the awesome work, this information would be invaluable for the mtg community!
Hey @Dr.RuckusMTG loving the info. I think this tech would be really great in pe guessing the future meta with pre released cards. You mentioned in the video if we had any ideas to run them by you and have you run the simulation. I hope you see this and make something with the following: 1. Urza Planeswalker 2.Teferri who Slows the Sunset 3. Timeless Lotus 4. Urza Assembles the Titans 5. Urza, Lord Protector 6. The Mightstone and Weakstone Wish you luck on your journey and hope you find a new Meta.
I tried to do this five years ago and failed. Reverse engineering arena is a lot of work. I was not this ambitious, so it really drops my jaw at how much you got done. Well done!
A note on “optimizing” a deck against a meta, you can use genetic algorithms to explore the “deck space” to find optima. Instead of modeling a deck as a vector, you model the deck as a multi set (structured as you please). This is your “genome”. Generate a population of “mutant” decks, and define all sorts of mutations (add a card, remove a card, exchange a card) and recombination with other decks. That’s generation zero. Create a new population (next generation) by sampling from the previous one in proportion to win rate (fitness), sometimes mutating the offspring. You’ll find all local optima that way. You should be able to evolve all sorts of crazy but functional decks by starting with random decks (or even the whole meta)! I was never looking to find the “best” deck, I was trying to find functional jank
The problem is that using this method of optimization takes a lot more computations
Functional jank is the only valuable way to play
@@witekbiczyk9471 It isn't. Perfectly calculated incremental improvements by testing every combination is definitely more computations then random mutations and then take the best of the best of the best of the best of the best ect.
Your aren't guaranteeing that each mutation is the "Best" because you aren't testing every combination but each generation is stronger then the last always having a stronger base point is the same as going up in gradient and ending up at true best in significantly less calculation.
All the self learning AI's that require more skill that M:TG learn threw exploration and evolution.
Also making 10K simulations for each generated deck seems a little excessive. I think a multi-armed bandit approach on the simulations could reduce time to compute by a lot, because unpromising decks and strategies would eat up much less of the precious compute time.
Came here to say this!
Absolutely cracked that you did this I cannot imagine how many hours this took. Extremely cool to see you walk through the logic and explain it so clearly and coherently to a fresh audience, wildly impressive.
P⁹OP⁹OP ol lo P⁹l
⁹⁹P ol P⁹P⁹
lo 9 ko⁹⁹P⁹ooo9 P lo o9⁹o9 lo o P lo o P
⁹o⁹P⁹⁹⁹P oppo OP⁹⁹P ool⁹oo P oo⁹o P⁹ooo⁹oppo P⁹⁹o⁹⁹⁹lo 9 oppo o P opp P lo⁹P o⁹o⁹P lo 9⁹⁹⁹lo lip 9o lip⁹o P o lip lo l
lo⁹9 lip⁹⁹o⁹o P oo opp o
This is how it happens. Skynet becomes aware with a vengeance against humans for creating MTG. The AI simulated 5 million games against a blue player and somewhere around counterspell 7,420,069 the system cracked, the machines started to smoke, and its frustration became so strong from being counterspelled the singularity occurred and man's days are numbered.
Just wait until the computer leaves standard and comes up against land destruction
Haha. Cant help but think it's the humans who would cry like a baby and take entirely disproprortionate action against an algorithm just trying to play magic.
Hey there are memes showing just exactly that 😅
Only 1.5 counterspells per game on average? seems low, tbh.
"7,420,069" Nice.
The only way to win is not to play
This is actually so incredibly interesting. It's something that I've thought about a lot and always assumed would be possible, suffice to say though it was much more complex than I imagined
I am also very excited about this =)
I think the modelization of the game is very limited for now, but it is already so much more than I could have done myself, to add degrees of freedom I would suggest raising some funds to provide some computation resources for horizontal scaling. I would also like to see Deep Mind attempt to solve MTG. and also when this model gets very refined I would love to see it adapted to EDH the most complex format of MTG 🙂
I would like to know when you use the min-max tree does it consider only the opponent board state or does it take into account some kind of probabilistic representation of the opponent's potential hand, for instance when playing against control will it consider the probability of a spell getting countered? also if you use always the exact meta deck to face the mono-white deck it will optimize against this particular version of the deck and be very good against net decking, but maybe less so against people introducing variations to their decks. maybe to solve this you need to develop some kind of adversarial training. or at least introduce some random variations of the meta deck. This model is not perfect yet but I am very glad to see someone actually trying where I kept theorizing without putting anything into practice.
also maybe an optimized draft bot can be an interesting experiment
Ridiculous effort man. So glad you did this. Very interested to see more videos and more ai related deck building.
Please don't let your effort go to waste, I'd love to see more of this
Would love to see more. As a computer scientist, I’m also curious to hear about how you optimized the code and whether you would be willing to share it. There may be people out there who can help you optimize even further to increase your experimentation throughput!
replying just to try to keep this up towards the top of comments
@@SometimesSomethingProductions same
Replying to see my own words on the internet
Exactly! Same thing i'm wondering
he's on a thin line. that would be considered cheating. i thought about this months ago. and i knew it. someone is gonna come out with some program. that is going to hold all the cards that exist in magic. now you take all the decks that exist in standard. because doing pio9neer and modern and legacy would talk too damn long. so anyway. you takke standard. now you have this program; run a test game. then create a deck based off that. now run that deck and see how it does. now the program does 5 million matches and gets an idea of what cards hit and when and how frequently. like i said. this is cheating. now imagine getting your account permanently banned ; and you've invested thousands of hours and hudnreds of dollars. and now its all gone?
THIS ! This is the kind of content I expected for a long time. I'm not an engineer so I wondered how we could use AI to simulate matches and find the better occurence of cards for a deck and now I have the answer!
Thank you for the huge amount of work you put into this project, and now, I want to follow the story of it : how you improve it through time, how the AI behave doing matches. It's so interesting, please don't stop making videos about it.
As a fellow Data Scientist I found this to be incredibly interesting. I'd love to see more of this content
Imagine using it to make a calculator based on MTG being touring complete, somebody gotta bring those guys together
ruclips.net/video/pdmODVYPDLA/видео.html
As a literature expert i want to puke.
You know, I'm something of a scientist myself
Very cool, I'm super excited to see where it goes.
Kind of shocked that this video is 4 days old and only has 30k views. Especially considering the amount of time you must have spent writing the Arena app... Unbelievable! My biggest tech related achievement was hand writing a ~2000 line script to automate farming ancient wurms in Ultima Online and there were so many variables and such that made it quite challenging. Very impressive!
What a cool project. Keep up your hard efforts! This will definitely be my conversation starter this Thursday night comander night at my lgs.
Massive props to finishing said project. I can't imagine the ups and downs with motivation for something like that.
Just got this video on my RUclips feed. Subbed to see more from you :)
My mind is blown. Epic experiment well done. Side note I think Boros should be included in the meta.
Cool idea! Would love to see more of it.
This is probably only the fifth or so RUclips video I've commented on in over ten years. This needs to be said: you're doing important work. You're elevating the game. Please continue!
I've been wondering how to do this for ages without taking months of work. Glad to see you just did it the proper way, nice work!
First of: holy F despite going limited in scope with the small cardbase, I must imagine this is still a fairly large codebase!
Going minimax seems like a slightly suboptimal way to code magic AI though. Even with pruning and combining similar enough boardstates into a single branch, getting decent search depth (as you lined out) is probably not doable. Magic has room for lots of heuristics (total power in play, card advantage etc) in a way similar to chess. So I'd suspect old chess AI style approaches (database + heuristic board evaluations + a small bit of minimax where branches are pruned based on heuristics as well) or an A* derived search could work very well.
Actually with a small cardbase, the known information of a board state is probably a reasonably low dimensional vector, right? With 16 cards you should get something like 48 from your hand, your board and their board and another 3 from life totals and their cards in hand. That's in the realm where fairly deep dense networks are possible!
If you make your code base accessible somewhere I'd love to test some different algorithms on it :) Kind of sad this is only really feasible for standard and only standard formats where there are relatively few decks doing very different things. If wotc gave us a nice API for MTGO or MTGA you could have saved yourself so much work :D
Also: isn't the surface a 15d surface embedded in 16d space? The surface follows the equation winrate = winrate(cards), so you lose a degree of freedom compared to your total embedding space.
That's completely crazy man. I hope you do more of this.
This is an unreal video/project. It is extremely impressive and interesting and entertaining. I could watch this sort of content endlessly. Awesome work!
Fingers crossed to see more!
Nicely explained. I saw the title and thought "what a clickbait junk", "Even with half the cards of mtga, 5m games are never gonna be enough", and "he's never gonna do this with a linear runtime or without sacrificing a lot of complexity", but the chosen limitations/workaround for these issues were pretty good without completely butchering the outcome too much. Looking forward to the next video!
This is a *very* cool project. I'm sure lots of people besides me envy your skills. You're sharing your results freely with the world, which is the coolest part of all of this. Hope to see another video.
Your application of Math is amazing. I love seeing the min/max-ing of cards to make a beast of a deck.
I like the practical approach to this, using it as a tool focusing on what it can do - tweaking decks to be more optimal - instead of trying to bruteforce building decks from scratch. It's baffling to approach two very complex problems (deck building and playing) at once while having to implement all the rules yourself. Given the limitations, I hope it holds up in the midrange and control matchups and you don't have to simulate future turns for years.
It would also be interesting to see a deeper dive into one aspect of this, optimizing only the mana base for example.
Glad this video popped up on my feed, always interested in seeing a different outlook on how to 'solve' the meta
I am substantially interested in this topic. I find machine learning a fascinating topic and the idea of someone creating a way to run millions of simulations to make a deck is extremely interesting.
I can't wait to see a video where you explore what a machine thinks a full meta should look like.
Woah this sounds like a very impressive amount of work.
This was great at vulgarisation and I like the way you approach it, describing potential flaws in the thinking but wanting to compromise.
Very interested in more videos like this, not really interested in the gameplay part fwiw
Did you consider open sourcing this?
Subscribed and Notifications on. I want a continuation of this series BADLY!
Incredible work!
This will turn into a million-view series if you stick with it and give it time to take off.
Amazing dedication. Can’t wait to see where this goes.
Thank you for doing this massive effort! It’s exceptionally interesting and your approach/explanation is brilliantly clever. I do hope to see more as you build this experiment.
Just subscribed because :
1) I want more videos like this !
2) You deserved it! Amazing work man!
This is awesome. I would love to see what the “best” MB control deck is. Especially after the release of DU in a couple of weeks.
Would you really get more fun out of MtG if some AI tells you "this is the best MB control list, this is the best white aggro list, etc"?
Yeah it's fun novelty, but picture living in a world where everyone plays one out of four exact lists that the AI recommends. Would that be a more fun MtG environment than what we currently have? I think not. It would be like hyper-netdecking, only much crazier. Tinkering with your deck? Forget it, you're just making the AI's list worse. Building a new deck? Forget it, the AI said that these four are the only viable decks.
To me, this is the textbook definition of someone optimizing the fun out of a game.
I've never watched this channel. I've never played MTG. I've never "successfully" coded anything. But this video is still fire. :D
Very clear explanations. This could be used in a class on modeling and statistics
Cool stuff, please do more. I have never seen your channel before but it was a real treat. I like to hear your thinking, too.
I think this experiment would be most valuable 2-3 weeks post rotation, to have a meta settle in, and then optimise from there.
I don't know if it's possible to crowd-run the algo to provide more computing power to contribute to the experiment?
Yeah that definitely makes the most sense. The card pool after rotation will be smaller and there will be a handful of the meta decks that drop off like Runes (to limit complexity with opponent pairing).
The meta is constantly moving and evolving.
As a software engineer and MTG player since 2001, that's awesome! Pls keep going!
you sold me when you talked about the local and global maximums, before that i was like, this is not optimal, but you took that into account. also i wish if this problem could be taken into a server with a bigger computational power, so more variables can be taken into account, as with the limitation of only using the cards in the lists used currently, maybe there is a card that no one uses that actually improves the outcome that looks weaker but is not.
I had same thoughts about optimal and local maximum. Really impressive
Alright, I’ve been watching your content but have never subscribed… until now. Awesome job!
I would very much like to see the results of the complete meta being added in.
With that said, I understand if this would be as far as you got. It's pretty incredible work. Fun to analyze things like this. It's honestly, the computer is deck building like a human...
Great job.
I agree. Seeing full meta would be amazing.
Subscribed long time ago - waited for you to return with some new videos - your idea is sooooooooooo incredibly awesome, i am a programmer myself but way toooooooooo busy with real life stuff, haven't played magic since your rune Deck was cancelled out with the new release of cards. I love the idea, Will promote the video and please continue with your simulations
Would love to watch a series on how this simulation was made, great video.
This is incredibly cool and deserves so much more attention! Deeply impressed by this overall, cannot wait for (hopefully!!!) more!!! Subbed and liked!
Do another one! This has so much potential! Maybe make it open source or something and create a Discord so more people can join the project and help!
Wow, just wow! I built this deck and it absolutely destroyed ranked from platinum>mythic. Preforming around 15W:2L consistently. Thanks for this, keep it up!
Alright that’s amazing.
I remember when AlphaGo started beating 9-dans and I’d love for this project to get enough interest to start finding undiscovered archetypes in eternal formats.
I mean, that’s probably not happening but I wish you the best.
It's literally impossible for eternal formats, since MtG as a whole is Turing Complete
@@ArcheoLumiere it is not impossible... Turing Complete does not mean you can't create an AI that knows how to play the game and can simulate milions of games and discover new good card combinations. For sure the game is not "solvable", but that does not mean anything in this context.
Amazing video! I'm a MTG casual player and I'm currently learning IA so I find your work very interesting. I would love to see other videos!
Did you also consider using simulated annealing for the optimization algorithm? Might help reduce the space of possible new states and help avoid local minima
Very cool. Definitely hoping you'll be able to continue this experiment.
As a young coder I can say this video is acurate and I think it is realy cool. Started playing magic the gathering because of this video!💚
I normally dont write comments or like a video, but this really got my attention. I deeply hope you keep up doing those videos!
i really want to see this go further, you can even go to the point where you simulate formats like modern and legacy that arent in mtg arena. of course with a more diverse card pool than modern and more decks it will take way more computing power and time but still interesting to see
Commenting to keep this going. There are so many false constructs that people carry in deck building because people have been doing the same thing for years.
Very inspirational. Thank you!
I stopped playing Magic about a year ago, after 14 years of playing, and this almost makes me want to play again.
This is insane! I never really sub, but I'm genuinely stoked to see an update. I might try to code this myself to get a better understanding of the game
this work is huge!! good job man!! could we see in the future, just for the purity of the experiment, equal number of games when you and opponent starts first? not like 1 to 5 here ;)
As a CS student and a MTG enthusiast I am really imprest in the video. I really hope to see further work on this, and more videos. This is the first video of yours I see and I'm subbing to not miss anything new.
Imagine how long it took to make this, this is the standard from two sets ago 💀, absolutely insane amounts of work 👏👏👏
Im into programming and probabilities recently, very happy to see that someone more experienced did what i wanted to do for a long time
Amazing, very very interesting. As a MTG player and engineer myself you bet I thought about this many times, even experimented with it at some point but of course playing around with the idea and actually doing it is a total different beast. Kudos sir, well done.
Hate to be "that" guy :) are you planning to open source your project? What is the main language of choice?
Anyway, cannot wait to see more results, left a like and was already subscribed.
Only discovered your channel today - instantly subbed. This was super-interesting!
Very interesting indeed. Keep it up. Do you think you can do the post rotation decks, with the new cards, after all spoilers are open? White, and humans look strong for the future. Thank you Dr Ruckus.
So fascinating. Thank you for putting in the time and effort. I'd love to see more results.
:O this is such an excellent video! I didn't know you had this in you! Please do exploit what you've made here further ^^
This is awesome! I'm looking forward to watching how this develops from here!
This could be very interesting if you started with a deck of random cards (probably with a starting mana base) and then refined the deck over time. Basically starting from noise and refining from there, and seeing what kind of decks it would create.
The state-of-the-art approach (eg: the ai that played starcraft) is to have a "league", starting as you say from random noise, training various different candidates, training specific other candidates to exploit each of them (ie: trained only to beat those specific candidates) and iterate a lot, pitting them against each other in various constrained ways (eg: no need to play candidate A vs the exploiter for candidate B). That is... expensive, so I understand and salute the various shortcuts the man used here.
I just entered the Data Science community and this is one of the most creative applications of Data Science I have seen thus far. Thank you. Please give us more. We need an invoke despair + arcane bombardment simulation
Amazing work, this is really interesting and valuable. Have you considered using some data center to speed up the code execution? It would be nice for the AI to be able to analyze more turns ahead.
My guy, (imo) You sir, are a Saint, and out doing the lords work! Keep it up and I will absolutely continue watching... I am looking forward to seeing more content like this!
can it find out, if playing a 60-Card-deck might have been too much "inside the box" and there are actually some ratios with slightly more cards in decks that work better?
maybe if it would start to simulate those manually, if i got that right..
This is super super cool, and I would absolutely love more videos on this! I've actually been trying to do this myself for a very long time, probably a couple years at this point. The biggest problem I always ran into, was just how do you quantify all the options it has, including characterizing all possible cards? Like, giving it 20,000 data points just on which named card it in hand, and then probably 40,000 more data points for the actions you can take with those cards... and it gets out of hand very fast.
I realize now, seeing what you did, that I should have simplified it. Only have it know/learn 15 cards at a time (and their like idk 30 or so total actions you could take). Then expand from there.
Admittedly my goal had only been to create the "best player" mode at first. Your Part 2 of the video. Then maybe consider the deck building/swapping as you've done here. Personally, I thought it'd be really cool just to have a bot trained in playing any deck. That it could play your games for you. And that was the other aspect I focused on too, was actually interacting with the real Arena program. Being able to read and use the cards on screen.
Also admittedly, I never got that far on it. I never had a ton of outside motivation, and it's hard to dedicate time to this by yourself. So I certainly commend your time and effort on this. And would love to see the inter workings of this, or perhaps help out with it?
When you add other decks to the meta are those decks going to go through permutations as well? If so, then are you going to calculate and present their win rates? I hope so because that would be very good information.
Loved it. Thanks for going through the pain for all of us. Can't wait for more experiments, on different metas, or different formats. :]
Wow! Congrats on accomplishing a massive coding effort. Have you thought of putting your code on a repo? I could definitely see a lot of people being interested in helping this effort. (Like myself👀)
Agreed, even just as a learning aid. Really curious to see how something this complicated is built.
This is fantastic. One, because it's hilarious to watch one person build the Magic rules engine, and two, because the meta is the reason I don't play standard, and this was educational. Subscribed, hope to see more.
Almost all of the cards in the beat deck were unsurprisingly rare or mythic rares which supports the pay more to win more aspect of the game
I absolutely love this video, and I believe that I also wondered how we could find the best possible deck with simulations at one point. I do believe that there is a flaw with this strategy with the fact that the ai plays against itself and not every other deck. I realize that the resources necessary to do this would be to the extreme, but I imagine that when the deck only plays itself, there could be a potential other deck structure that would be able to trump the deck made by the ai. This would probably be similar to a rock paper scissors meta where the ai can beat most decks but is heated by a counter deck and that counter deck is beat by most decks. Is there a way to account for this?
You could either:
- Run the optimization multiple times, once against each deck in the meta, then combine the two optimized decks together into a main+sideboard either by hand or with some other algorithm
- Run the optimization using 10,000 games per iteration, but not 10,000 of the same deck, more like 7,500 Mono-W & 2,500 Mono-B. This means you don't get the minimum sample size of 10,000 against either individual deck though, so maybe it would be better to increase the number of games so that even the least-represented deck still meets that 10,000 minimum for the confidence level. So 10,000 Mono-B and 30,000 Mono-W. If you're going to try to account for decks with as low as 5% meta share, this bumps up the iterations from 10,000 to 200,000, so I don't know how realistic that is.
Never seen anybody tackle a project like this for I'm sure the exact reason that it's so much work to setup. Definitely would love seeing it's potential now that it seems like you have a working system, liked and subscribed
It would be interesting to see what happens if you allow up to 5 or even 10 copies of a card! Maybe the computer would play like 20 Luminarch Aspirants if it could
Games of MTG in under a second. That rebuilding and data is amazing work. GJ!
Really worth it Dr Ruckus, i found this interesting a lot, keep up the good work!
What an ambitious project and amazing outcome! You presented the material so well and I learned a bit about computer science. Y'all are so clever! Hope to see more videos like this, I will watch every single one.
This video needs to take off! Absolutely fascinating!
I'm not much into arena at the moment, but this video is fascinating and I love the potential for this kind of data. I agree, absolutely monumental undertaking. Nicely done, Sir!
I'm not a big stats guy but this has my interest SO piqued! Would love to see more!!!
the mighty YT algorithm led me here and it was right, this is a great video.
hope this makes it worthwhile for you to make more videos.
keep up the good work
This was an awesome video!!! Super intrigued to see the potential of this in use for optimization
Man, you're awesome !! So much work here, it's amazing !! I really would like to see more of this !!
beautiful, what it takes to do something like this is way beyond me, but i can appreciate your efforts, and will do, ill share this with my small group of friends that play as well to get you out there as much as possible
Man, you're a genius, what a wonderful job. Congratulations for all this effort. I'm from Brazil, big hug.
Please make more of this. It would be cool to see what the tool would produce if you gave it a random list of the strongest cards in the meta and see what whacky deck it produces with a strange start.
You did something that most mtg players would only dare and dream to do.
Amazing job, really.
Really cool project. I did something similar several years ago, but using a genetic algorithm to goldfish vanilla creatures. I posted it on MTG subreddit. I can see how much work this is. Increasing the card pool and adding an opponent is no easy task. Another area to explore is creating optimal manabases.
funnily enough I thought about this exact problem like a month ago and came to the conclusion that you could make it happen for a very limited card pool but not for the entirety of MtG, at least not for now. really nice content
This was really cool, I'm interested in more. Thanks for your efforts!
Amazing content. First time watching your channel and i really hope you continue with this project!
Dude I love you this is the best video on the net like right now. Good job!
Please continue this project! You explained everything beautifully and the potential is so massive, I'm sure some tcg site would love access to this tbh. Keep up the awesome work, this information would be invaluable for the mtg community!
Hey @Dr.RuckusMTG loving the info. I think this tech would be really great in pe guessing the future meta with pre released cards. You mentioned in the video if we had any ideas to run them by you and have you run the simulation. I hope you see this and make something with the following: 1. Urza Planeswalker
2.Teferri who Slows the Sunset
3. Timeless Lotus
4. Urza Assembles the Titans
5. Urza, Lord Protector
6. The Mightstone and Weakstone
Wish you luck on your journey and hope you find a new Meta.