Itangalo / Bot-Playtesting-Toolkit

A toolkit for simulating board games with Google spreadsheets. Intended use is board game development.
GNU General Public License v3.0
9 stars 1 forks source link

A statistics function for for "first occurance" #13

Closed Itangalo closed 2 years ago

Itangalo commented 2 years ago

For some game iteration statistics it is more interesting to see how often something occurs at all, instead of mean values and percentiles. (One example could be that players lose, or that three special cards all appear in a game.)

A second statistics display should probably be implemented, like firstOccurance(stats, property, value=1), returning the percentile where the property at first reaches 1 (or some other provided value).

Another approach is getRelativeFrequency(stats, property, value=0), returning how large proportion of the statistics has value 0.

On second thoughts, getNonZeroThresholds(stats) feels better. Iterating through all properties in stats and returning the percentile where the property goes above 0.

Itangalo commented 2 years ago

Implemented.