How can I train a neural network to give probability of a random event? Let's say I have an adjustable loaded die, and I want to train a neural network to give me the probability of each face, depending on the settings of the loaded die.

I can't mesure its performance on individual die roll, since it does not give me a probability.

I could batch a lot of roll to calculate a probability and use this batch as an individual test case, but my problem does not allow this (let's say the settings are complex and randomized between each roll).

I have 2 ideas:


train it as a classification problem which output confidence, and hope that the confidence will reflect the actual probability. Sometimes the network would output the correct probability and fail the test, but on average it would tend to the correct probability. However it may require a lot of training and data.
batch random rolls together and compare the mean/median/standard deviation of the measured result vs the predictions. It could work but I don't know the good batch size.


Thank you.
The starting point is that for a fair dice thrown fairly the p(n) is 1/n where n is the number of sides.
You said both
and

there are too many variables (up 40 dimensions with value range 1-100) in input, I don't know how these properties relate and an empirical approach would require too much data.

It seems that this problem has 2 solutions:

Don't use a neural net and create a 'std' statistical model.
It may be possible since you said:


I know there is some underlying rule that simplify a lot the problem (ie. reduce the actual number of dimension of the input)


Use a neural network (with softmax at the end) - for a fair dice; with enough training data the classifier should arrive as 1/n as the approximating function for a fair dice. The other 40 dimensions/settings your mentioned are the inputs. I think a 'basic' neural network with dense layers only could work for your task.