COBEN Calculator – FAQ
Here I will try to answer common questions about the COBEN Calculator.
Why did you create it? 🌟
I was inspired by multiple things.
Back in 2023, I created such a calculator in Rust, for use in the command line. I told one of my friends about it, and they asked if something like that can be usable as a web application, citing his circumstances at the time. I told him I'd make a web frontend for this calculator, but never went through with this idea. I didn't know much about hosting a website back then.
Later, I learned about DocDesk's calculator, just to realize how rushed it looked, and had poor support for mass data entry. Knowing this issue, the only way I could fix it was to make my own app.
What did you use to make it? 🛠️
Around the time I felt inspired to create this app, I was also getting to know the work of Lea Verou. I can't stress how much I admire her work on open source projects, including those she authored.
Mavo is just one of her projects. It allowed me to save time coding interactivity, while I would appreciate having that time to write an implementation of the algorithm. For the algorithm itself, I used a few external libraries due to gaps in JavaScript's standard library.
Styles are provided by both Mavo and Boostrap.
I decided to use Rollup for the learning experience. If I ever introduced unused code, Rollup will tree-shake it out when creating the bundle.
This app seems so confusing. Can you show me how to use it? 🤷♂️
The UI is meant to be as intuitive as I can make, but I made a video demo anyway. If you are confused, just give it a watch!
Note: This demo is based on an older version of the app (specifically, commit 3d2ff90), as you can see by the wider layout and the buttons not looking as nice as they do now. However, the general usage of the app is still the same as back then.
What even is COBEN? 🧐
COBEN is short for Chance Of Being Eliminated Next. It is a percentage denoting the probability of a contestant getting eliminated, based on the current scores of everyone still in and the rewards for the next event. If the percentage is 0, the contestant has immunity.
It is a mainstay in Algicosathlons, Algotriacontathlons, and similar competitions that run on points. I think this metric was also pioneered by Cary Huang, who created probably the first ever Algodecathlon and Algicosathlon.
What does systematic mode do? 📊
Every permutation of the list will be taken into account. To put that into perspective, multiply the number of contestants by every positive whole number below it. In mathematics, this is known as factorial ($x!$). You can see how quickly it multiplies, as in the below table.
| $x$ | $x! = \prod_{i=1}^x i$ |
|---|---|
| 0 | 1 |
| 1 | 1 |
| 2 | 2 |
| 3 | 6 |
| 4 | 24 |
| 5 | 120 |
| 6 | 720 |
| 7 | 5040 |
You may have noticed that $0! = 1$.
I don't recommend using systematic mode for more than 10 contestants. $10! = 3\,628\,800$, or over 3.6 million permutations!
As the number of contestants increases, if you are not using systematic mode, the calculation will be less accurate; however, that is fully intentional. If you are using systematic mode, it will be very slow.
Assume a simulation takes around 120 milliseconds. (This may vary depending on the number of simulations.) Calculating for 20 contestants using systematic mode would mean almost 2.5 quintillion simulations. The calculation would take over 9 billion years to finish.
$$20! = 2\,432\,902\,008\,176\,640\,000 \\ t = 120 \mathrm{\ ms} = 0.12 \mathrm{\ s} \\ 20! \times t \approx 2.9195 \times 10^{17} \mathrm{\ s} = 9.2513 \times 10^{9} \mathrm{\ years}$$9.25 billion is twice as high as the population of Asia: almost 4.7 billion people as of 2021.