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?