Modeling a card game win percent as a function of deck matchup and player skill In collectible card games like Hearthstone, players choose their deck before playing a game vs each other head to head. This is a two player game. I want to analyze this to predict the probability one player will beat the other.
Suppose I've already calculated Elo scores for each player, and that all that matters for this model is the Elo difference (e.g. player A is 200 Elo points higher than player B). Suppose further there are just a handful of decks A, B, C, D, E. Deck A might have a good matchup vs deck B, but bad vs deck C. Suppose you know the matchup win rates in aggregate, so you can say deck A wins 70% vs deck B but only 35% vs deck C.
How would you come up with a formula for expressing someone's chance to win any given game?
Further, could you generalize to say something like "this game is 50% matchup dependent, 30% player skill, and 20% luck during the game"?
 A: As a professional statistician, and a fellow aficionado of collectable card games, I think I'm well placed to answer this question.  There are a few difficulties with this type of analysis.  The first difficulty, which is partly ameliorated here due to your restricted scope, is that you need data on all the possible deck match-ups in order to estimate the strength of the decks when played against each other.  Even with only five possible decks under consideration  (which is an extremely restricted analysis) there are still ${5 \choose 2} = 10$ possible deck match-ups, so that means you need about ten times as much data as if you were analysing a game with no deck-building element.
The second difficulty you will have is that the Elo score of a player is probably not independent of their choice of which decks to use in ranked games (and they wouldn't have been confined to the decks you are considering); ceteris paribus, players with a higher ranking are probably better at constructing decks that are strong against a wide range of other decks.  Merely having access to aggregate win rates for the deck-pairings will not allow you to see the interaction of the Elo score, the deck choice, and the outcome.
If you want to analyse this type of data effectively, you may need to give some more thought to how you would model the outcome of a game as a function of both the Elo score of the players and the decks they use.  Unless you are able to run a large randomised controlled trial where you randomly allocate decks to players, your model will need to allow statistical dependence between the player rating and their deck choice.  You would model the win probability in each game as a function of the player ratings (or perhaps just their difference), plus the decks used, plus an interaction term.  You would ideally then use a large dataset on individual games to make inferences about the parameters in the model, conduct appropriate diagnostic tests on the model assumptions, and then make predictions if you are satisfied that your model is appropriate.
A: Modeling win chances with Elo rating
The Elo rating relates to a hypothetical odds of winning the game computed as
$$\text{odds} = 10^{(E_A-E_B)/400}$$
for instance if the difference in elo rating between player $A$ and player $B$ is 200, then the odds are $10^{0.5}\approx 3.1$.
The computation of elo rating for players is based on updating the Elo ratings of the players based on their hypothetical expected win chance and the actual outcome, if you win many more games than expected then your elo rating increases (and vice versa if you win less than expected your rating decreases).
So you could use this formula to model the win chances. But... this does not mean that the hypothetical formula for the odds is actually correct in practice. The Elo rating is an average over many players and over many games. It might be that the actual win chances do not have this power of ten dependence with elo rating differences.
If you have data about game results as function of Elo, then you can verify this relationship and potentially adjust it.
Differences in decks
On top of the Elo rating there is a difference in decks. The less balanced decks might give you either an easy win (if you are lucky that it works against the opponents chosen strategy) or a certain loss (if the opponent happens to have elements that take advantage of your lack of balance). The balanced decks might give you games that are more in the middle and are not very much decided if the players play equally well.
You could model the effect of decks as effectively changing the elo rating. E.g. a type A deck versus a type B deck will give the player with the A deck an effectively 50 higher ELO. (This is a hypothetical suggestion, whether this model is very good in practice is not so certain and you would have to verify it)
An alternative would be to just use descriptive statistics and gain information from those. There is an interesting analogy with Chess here. The role of openings in Chess could be seen as analogous to deck choice in card games.
In Chess there is a large amount of statistics describing openings and the frequencies that players win or loose with particular openings (as well as frequencies that openings are played and how it differs for players with different elo rating). If you have such statistics then you can find out what are successful decks and which are not.
The use of this statistics is not very much modelled. A lot of this is eyeballing. Watching how the opponent plays with different openings and based on that decide a strategy against the player. This changes from player to player and there is no universal model that will help against any player. Some players will be good with a particular deck while others might be not.
A: Player skill might approximately be a single linear quantity (of course, some players might play better with some deck-set-up they like best, some particular decks might only be suitable for more skilled players etc.). So, one could argue that you can use a logistic regression type of set-up that is something like this:
$$\text{logit} P(\text{player #1 wins}| \text{deck #1}, \text{deck #2} ) = \beta_0 + \text{skill}_1 - \text{skill}_2 + f(\text{deck #1}, \text{deck #2}).$$
I.e. there's some fixed effect of the first player (e.g. whoever plays a card first) winning all else being equal, there is an effect of the difference in skill and there is some complicated function that involves the decks. More generally, this could of course all be some complicated function of player characteristics and deck characteristics.
I wonder whether - given enough data on played games - this could be approached using a neural network. Decks could be input as a collection of items (= the cards) and be dealt with using a transformer type of architecture with an attention mechanism (the idea is that unless one uses positional encodings transformers are invariant to order - which does not really exist in a deck when we do not know which way it will be shuffled) followed by some fully connected layers, while players could be put into 1-dimensional embedding layers (which use the same embeddings whether the same player is player #1 or #2) with these embeddings going straight to the output layer and one would use a sigmoid activation function. Of course, this all pre-supposes a large database of played games where the player and deck information are available. Or you can go crazy and use reinforcement learning to train agents and create games (in fact, such agents would presumably have a good internal representations of the value of decks that would be helpful for the task you describe).
