quizbowl.gimranov.com

Team Qualifier in R

This is a simple utility to help decide what combinations of players might be most complementary. It requires the statistical package R, freely available from the R Project.

Download TeamQualifier-January2009.zip

If you have questions, bug reports, or ideas for improving this script, email Avram at quizbowl at gimranov dot com.

Usage

To use the program, make two tab-delimited files, one containing tossup results, one with the bonus results, in the following form

Tossups.qb:
0	0
10	0
-5	10
0	0
0	0

In this example, there were five players, each represented by a line in the file. For each tossup, there is a column, and the entry represents the appropriate player's response (10/15/-5/0). This is a two question round... (too short, probably!).

Bonuses.qb
10	15	5	30
0	15	0	10
10	0	5	0
10	0	5	20
0	15	0	0
0	15	5	30

The lines in this file correspond to the same players as in the first file, except that the first line represents the possible number of points that could be earned on that bonus part. In this case, there were five players and four bonus parts, probably a 10-15-5 bonus and a 30-20-10 bonus. Notice how the latter is represented by a single column in the file, with varying numbers of points earned.

After creating these two files, put them in the same directory as the file qualifier.R and enter the following command:

R --vanilla < qualifier.R

The resulting ranking of teams will be in the file Ranking.qb in the same directory.

Ranking.qb
X1	X2	X3	X4	tmscore	bonconv tuppts 
1	2	4	5	35	25      10
1	2	3	4	30	25      5
1	2	3	5	30	25      5
1	3	4	5	30	25      5
2	3	4	5	30	25      5

Each row represents a possible combination of four players and its projected score. The first four columns are the players on the team, and the tmscore and bonconv columns are the "score" of the team and its bonus conversion. It should open prettily in Excel.

In the end, you can probably make the two input files in Excel, save them as tab-delimited text, run the above command, and open the result file in Excel. Fun!

Troubleshooting

Advertising