Alright, so I'm trying to figure out the expected value of dice throws in a game I'm making, because I would like for the options the player has to be statistically balanced.
A person, for their special attack, can roll four dice. However, if their opponent's special defense is in the same slot, they can remove the highest three of those dice, and I would like to know the expected value of this action: removing the three highest dice from four. (I need this for the rest of my balancing).
I saw this: The expected payoff of a dice game
But don't think they necessarily apply here, or I can't figure out how to make them apply to this problem.
I knocked up a simply python simulation that does this for me, and got a mean of 1.755 over a hundred million trials, but I like statistics, and would like to know why this is the result.
import random import statistics def Rand(start, end, num): res =  for j in range(num): res.append(random.randint(start, end)) return res all_list =  for i in range(100000000): take = Rand(1,6,4) take.sort() all_list.append(take) print(statistics.mean(all_list))