RandomChoice[] and RandomInteger[] issues

Valeriu, thank you for checking it up on Windows. I experimented with the code a bit more and it seems that on Mac OS X adding this

ListPlot[Sort@Tally[population], Filling -> Axis, 
PlotRange -> {{0, 1}, {0, numberOfPlayers}}, PlotTheme -> "Detailed"]

is fine but adding this

Dynamic[ListPlot[Sort@Tally[population], Filling -> Axis, 
  PlotRange -> {{0, 1}, {0, numberOfPlayers}}, 
  PlotTheme -> "Detailed"]]

repeatedly breaks the code. Could you run the code on Windows with the above bit included?

Michal, Unfortunately I can’t run the code because the moderation team deleted the content of this discussion. I didn’t save the code on my computer.

Valeriu, I attach the notebook.
Thank you for help.

I have done some experiments up to t <= 35 000. Nice code. But there is somewhere an error in the code and it must be found.

I have done a modification

randomOpponents = 
  RandomInteger[{1, numberOfStrategies}, numberOfPlayers];

and the code works even it still generates errors. It seems that the algorithm must be revised.

This will work since number of players is always 10 times the number of pure strategies (but the simulation doesn’t make sense). So in a way, this code samples only part of population but several times (random).

It would be actually interesting to see a full post about explaining everything step by step. Not in the notebook but in the body of the post. Maybe more people will get interested.

Agree!

Michal, I have found some errors in the code. It has inconsistency. Nevertheless, I have highlighted my findings. They are in the attached nb file. It seems that the piece of code related to the generation of payoffs must be verified.

Thank you for the help. I will put the whole post later today.

I have now official confirmation from Wolfram support that there is some problem with the interplay of RandomInteger[] and dynamic features. The code seems to work fine on Development Cloud. Also, I checked the results with published papers and other approximations done through differential equations. All results are consistent so the problem is not with core Mathematica but additional things like Dynamic[]. Thank you for the help. If I have any information I will share it.

You are welcome!

Are you planning to write a separate post explaining your notebook and research?