Nov. 1, 2013

**Mana Curve Optimization**

Python

game-related, optimization problem, Monte Carlo simulation

Given a strategy function, uses multiprocessing to play tens of thousands of randomly shuffled games of Magic: The Gathering to determine the optimal count of each card (not just land). Assumes the opponent does nothing. (Opponent actions such as counters can be included within the strategy function.) Can score a deck configuration by maximum average spells per turn up to a finite number of turns, or by fewest turns to kill if the strategy function includes damage.

Originally developed to optimize and compare decks for the computer game "Magic: The Gathering" published in 1997 by MicroProse, frequently referred to as "Shandalar".