User:Faceless Wanderer/Simulations

From MTG Salvation Wiki

Jump to: navigation, search

Simulation is a computer based problem solving technique. Only a few simulations are public (like this one: [1] ) (out of date 2004). Mostly simulations are available only to those who can program them. Simulations are very versatile.

Contents

[edit] Simulation Theory

A simulation works by using a random distribution to predict an outcome. Monte Carlo sampling and stochastic modeling are two forms of simulations. Any individual simulation is vulnerable to variation, however, for a well formulated model the Strong Law of large numbers (capitalization is purposeful) states that as the number of trials increases the mean of those trials approaches the mean of the modeled process.

[edit] Manalyzer

One simple simulation is a manalyzer that allows you to enter a mana curve and then test the efficacy of that mana curve by drawing a large number of hands. To simplify the opponent is considered a Goldfish. Then the efficacy-test needs a basis for evaluating spells. It is assumed that spells with a higher casting cost have a greater card impact; One measure, the "Sligh Principle", assumes that in our spells costing 1 mana are 1/x creatures, cards costing 2 mana are 2/x creatures, and so on, as far as the programmer deems necessary. Also note that the special abilities of creatures are assumed to have an impact on the game similar to attacking with a creature of relevant power. The simulation, also needs priorities for each mana cost, or spell, with a more detailed simulation. The schedule of priorities tells the manalyzer which spell to play when it can afford to conflicting spells. A common default is to give priority to more expensive spells. With this basis, these priorities, and a deck of spells and lands, a manalyzer can be used. One variant of a manalyzer is a Colorlyzer used to test Color balance. Now the simulation plays out hands using the chosen mana curve in order to approximate the speed. After all hands, Manalyzer will output a results summary for the user, usually including an average goldfish turn.

[edit] Shotgun simulator

The user of a Manalyzer usually enters the manacurves to be analyzed and the Simulator then spits out the results. This is a slow way to find out what manacurves are good or not, so some programmers add a little extra to their simulator.

They let the simulator enter a completely random Manacurve, play it, and register it and see how fast it was. By skimming through the results the user can learn a lot of very fast Manacurves... Given enough time the simulation will reveal the speed of ALL manacurves that it is possible to create. Just imagine what that would bring to the magic community playing "Sligh" based decks !!!

The amount of possible manacurves is extreme, and the amount of times it takes to test them probably is also extreme. A single person with a "Shotgun" simulator would simply die before all the results would be discovered. Computers are powerful, But to analyze ALL manacurves possible it would need a supercomputer like "Deep Blue" (Has beaten the best chess player in the world) before all results would be ready. So currently a lot of "Shootgun Manalyzers" are just finding good manacurves at random... (It is also possible to link computers in a network analysing the problem)

So some people try to take an even more advanced approach.

[edit] Artificial evolution

Because artificial evolution works it is possible to build simulators that find VERY good results faster than any "Shotgun simulator" can find just a few of them. It is said that Evolution generally finds good results a 100 times faster than Shotguns. That makes it possible for simulation programmers to survive their results...

[edit] How simulated evolution works

The golden rule for evolution to take place is that three things are needed to happen. The first is Replication. The second is Changes in replication. The third is competition. This means that magic is already deeply rooted into evolution because decks may be copied and the decklists may be changed and they certainly enter competition. Simulated evolution happens very much the same way. But such a simulation will need some important things.

[edit] Death

Nature and evolution are not very forgiving partners, and death is something that is vital in simulations. If losing will mean death then competition will grow really fierce, and results will be faster.

[edit] Gene pool

There must be DNA so we can replicate things and mess with them. All the cards used in a simulation are considered to be the gene pool. It is the full "genetic" potential of any "life" the simulator may spawn. In this case the gene pool is consisting of 5 cards. A land, and 4 cards costing 1, 2, 3 and 4 mana and having a power equal to their casting cost. Any deck list created by evolution will be made out of cards from the gene pool, but some of them will exclude some cards when evolution takes them in certain directions.

[edit] Birth

We needed replications. For practical reasons we assume that our simulation plays an amount of games where two different designs fight against each other. The loser is eradicated. The winner is copied and the copy replaces the loser, that way we will have a constant population. Each time a winner is copied there must also be a change for mutations to happen.

[edit] Mutations

One or more cards in the manacurve/decklist (same thing in a simulation) must be replaced with totally random changes. The more mutations that can happen the more flexible evolution will be, but evolution is time-consuming so to many mutations will slow down the speed of the simulator. As a general rule "slower" wins the race whenever evolution is involved. It eats time but shits out perfection.

[edit] Competition

One of the most important decisions in making a simulator is how exactly competition happens. Evolution is extremely flexible and will do many unexpected things with the raw materials it has available. You can count on the fact that "Older organisms" in a simulator really loves life, so much in fact that you may witness one species spread itself from one single mutant, then hundreds of exact copies of it dies slowly until one is left, then that single deck manages to spread out again into more than 300 copies and remains stable for a 1000 generations. What happens is that many different species figth and have certain mathematical patterns that makes them stronger against one type of deck but weaker against another.

We are talking about a simulator meant to create manacurves by fighting a goldfish opponent, so competition in this example is simply to decide which deck kills faster. Each deck plays a game, then the winner gets a victory point. This is repeated a lot of times (remember, simple simulations may use as low as 300 games. A simulator playing real battles with attacks and blocks will need maybe more than 3000 games to get precise results). If both decks have an equal amount of points we must decide who wins and who loses. If we allow both to survive a draw game we open the door for symbiosis. Without having any brains these decks will be able to cooperate with each other ruining the simulated results. Do not underestimate the power of evolution, bacteria and virus can cooperate too if given the chance to do so. Allways find a way to make one of the decks lose... This point is so important to understand that an example is necessary to show what can happen if competition is not well under control.

[edit] Natural manacurves vs artificial manacurves

In a case of all games ending in a draw we just decided to chose a winner at random. This means that the manacurves will compete on speed alone, and soon we get a surprise. The manacurves starts to use more and more lands and it doesn't stop at 25 lands. Sometimes we will see manacurves with 33 lands!!! There is nothing wrong with this (though most programmers will think they've made a programming error). Natural manacurves uses a lot of lands and are the fastest manacurves you can get. But from a Magic player's view this is not very practical, since players prefer as low ammonts of lands as possible. This means that some programmers let their manacurves compete on lands as well. In case of all games ending with a draw, the deck with fewest lands becomes the winner (and if they are equal, then the winner is decided at random) Using this extra competition leads to what is referred to as artificial manacurves.

[edit] Impact

Simulations as simple as the manalyzer are powerful enough to turn bad players into very skilled players. Other simulations have lead to powerful new decktypes using combodecks that can kill at turn 1 with as high as 78% chance (according to rumors about "Meandeck Tendrils"). Decks like that are referred to as Combo decks.

[edit] Comments

Creating computersimulations is NOT an easy task, it is time-consuming and may often end in failures. To explain how simulations and magic interacts is even harder.

Any comments by non-programmers are needed by the programmers willing to contribute to the simulations page.

Personal tools
mtgsalvation.com
magicthegathering.com