bwrs / break-calculator

1 stars 0 forks source link

Break Calculator

breakcalc2.py is where the actual calculations occur. We used to use a Monte Carlo algorithm, and this is kept in the folder montecarlo. We now simulate an "ideal" debating competition (effectively, we assume that teams are no longer discrete entities, but rather, we permit fractions of teams, and so care only about proportions) thus:

With a total of t teams, b breaking teams, and r rounds as the parameters:

This should be interpreted by users thus:

It is possible, especially in small competitions, for these odds to be somewhat incorrect. However, the output given by the program is usually roughly correct. (However, users should not decide to leave and not see who has broken based onthe output of the program.)

Tabulation

tabulator.py was the first attempt at converting breakcalc2.py's calculations into a portable form, namely a set of tables. It returns a .tex ((La)TeX) file, which can be converted into a PDF using the command pdftex. bc2-12-36-6-4.pdf, a sample output, is provided.

Plotting

pyplotter.py produces, using matplotlib, a much more portable readout, namely a chart. Two such charts are provided, namely optimalchartlog.png and optimalchartlogit.png. They can be read thus:

This allows data for many possible competitions to be placed readably on one sheet of A4 paper. Settings can be changed, such as the precision with which points are plotted on the graph, the range of values plotted, &c.