georgenakashyan / PrisonerDilemmaSimulation

GNU General Public License v3.0
2 stars 0 forks source link

Mean line doesn't span all games and seems to be inaccurate. #3

Closed georgenakashyan closed 1 year ago

georgenakashyan commented 1 year ago

It needs to be rewritten to include the average of all games per timestep. Right now it goes from 1-10 and doesn't look correct.

georgenakashyan commented 1 year ago

Mean line is currently a running total, I can fix this by changing what gets appended to it in the _plot_time_serie() method. If I make that method return time_series and then calculate the mean of all games' time_series variable at each time step I can create a perfect mean line.

georgenakashyan commented 1 year ago

Fixed issue. Created an array to hold all cooperator % at each timestep. I added each new percent at each timestep per game and then divided by the number of games to get the mean per step. Then graphed with a "--" line.