This is a zero-sum game: the total profit is always zero. The game is symmetric, therefore both players must have the same optimal strategy, and the value of the game must be zero. In other words, each player can play the game in a way that guarantees them at least zero expected profit, no matter what the other does. There are infinitely many pure strategies. The key observation is the following: If the biggest "good" difference is D, in the optimal solution you should never play a value bigger than 2D+1. This is because regardless of what your opponent plays, playing 1 is *always* at least as good as playing 2D+2 or more. This leaves us with a finite game: we are looking for the optimal probabilities p[1], ..., p[2D+1] with which we should play each of the first 2D+1 values. The second tool is now the principle of indifference. For the optimal strategy (Nash equilibrium) no player should have an incentive to change their strategy because all strategies give the same expected profit (or, in general, some give a worse one than the one you have now). If we play K, our expected profit is profit(K) = sum_{i=1}^{2D+1} p[i] * payoff[K,i]. This is because our opponent uses the same probability distribution as we do. (In the formula, payoff[K,i] is the amount of money we'll get if we play K and opponent plays i.) We now get a system of 2D+1 linear equations for the 2D+1 unknown values p[i]. One of these equations is simply the equation sum(p) = 1, the other 2D are equations of the form profit(1) = profit(K) for K=2..2D+1. Solving this system, we see that all p[i] are indeed positive and we have the optimal solution.