Enjoying the Wiki? This Wiki is created and funded solely by one person. If you find it helpful, feel free to support me via my Kofi!
Click anywhere or press Escape to close.
Ballpit

This page is under construction. We are currently looking for images to add to it. Please DM ev on Discord if you have any images that may be worthwhile. Thank you!
Ballpit is a probability-based minigame. 100 balls of assorted colours are randomly arranged, and players may bet credits on the colour of the first few balls using the command !ballpit amount choices. For example, !ballpit 100 brown bets 100 credits on the first ball being brown, and !ballpit 250 purple blue green bets 250 credits on the first two balls being purple, blue, and green, in that order.

Depending on the how rare a combination is, players may earn more credits from their bet, with rarer combinations returning more credits. For example, winning the bet !ballpit 100 brown awards 100 credits, while winning the bet !ballpit 100 black awards 9900 credits. The returns are mostly fair; players are not expected to make profit or losses in the long run.

Users may play Ballpit using the command ballpit amount choices. The amount parameter refers to how many credits are bet, and the choices parameter refers to the colour of the balls betted on. Users may bet on up to 10 balls, with each colour separated by a space. For example, !ballpit 100 brown bets 100 credits on the first ball being brown, and !ballpit 250 purple blue green bets 250 credits on the first two balls being purple, blue, and green, in that order. Sending the command will start a Ballpit, which starts a 30 second period for others to bet too.

During the 30 second period, users may freely switch their bet by resending the !ballpit command. However, users are not able to cancel their bet, and the next best option that minimises losses is to send !ballpit 1 brown. At the end of the 30 seconds, the balls are randomised and sent. If a user's bet is correct, they are awarded credits based on how probable the combination is. The less probable, the higher the awarded credits. If not, all credits bet are lost. If the user has loses credits through other methods during a Ballpit, resulting in them having less credits than their bet, the bet is cancelled. For example, a user who bets 100 credits and goes down to 50 before the Ballpit ends will always end with 50 credits, whether or not they won or lost the Ballpit. This is to prevent having negative credits.

If Ballpit breaks and a the result is not sent after 30 seconds, users may use the command !restartballpit to reset it.

There are 50 brown balls, 14 purple balls, 10 blue balls, 9 green balls, 7 yellow balls, 4 orange balls, 3 red balls, 2 white balls, and 1 black ball. For betting on a single ball, the multiplier is 1× for brown, 6× for purple, 9× for blue, 10× for green, 13× for yellow, 24× for orange, 32× for red, 49× for white, and 99× for black. These are more or less the average number of Ballpits needed for the first ball to be the respective colour. Similarly, for bets of more than 1 ball, the multiplier increases based on how rare the combination is.

You may use the EsteBot command /ballpit payout to calculate the returns on a given combination and the chance of betting correctly on that combination. You may use the EsteBot command /ballpit random to randomly generate a combination.

While certain combinations are impossible, such as having two or more black balls, you are still able to bet on them. This is an intended feature.

The number of credits earned if a bet is correct is always a whole number multiplier of the bet, given by the formula:

$$\text{returns}=\text{bet}\cdot m$$

where the multiplier, \(m\), is given by:

$$m=\biggl\lfloor\cfrac{1}{p}\biggr\rfloor-1$$

where \(p\) is the probability of the combination, given by:

$$p=\prod_{i=1}^{c}\cfrac{n_{i}}{101-i}$$

where \(c\) is the number of colours bet and \(n_{i}\) is the number of balls of the \(i\)th colour bet.

In the long run, players are expected to lose credits to Ballpit as the expected value is slightly below 0. This is because the multiplier is always rounded down, so certain combinations will return less credits than is required to break even. The formula for expected value is given by:

$$E(X)=mp-(1-p)=p\biggl\lfloor\cfrac{1}{p}\biggr\rfloor-1$$

where \(m\) is the multiplier and \(p\) is the probability of the combination. Note that \(p\biggl\lfloor\cfrac{1}{p}\biggr\rfloor\neq1\) for most bets, which is why the expected value of some combinations being less than 0. For example, purple has an expected value of below 0:

$$E(\text{purple})=\cfrac{14}{100}\biggl\lfloor\cfrac{100}{14}\biggr\rfloor-1=-0.02$$

Generally, if the probability of a bet, \(p\), can be expressed in the form \(\cfrac{1}{k}\) where \(k\) is an integer, it will have an expected value of 0. Otherwise, it will have an expected value slightly less than 0.

List of Commands
Command Description
!ballpit number colours Bets a specified number of credits on a specified combination of colours.
number is a mandatory parameter that refers to the number of credits bet.
colours is a mandatory parameter that refers to the combination bet on. Up to 10 colours can be bet, separated by a space. Omission causes any placed bets to be revoked, this is a bug.
List of Formulae
1.1   Returns on a bet:

$$\text{returns}=\text{bet}\cdot m$$

where \(m\) is the multiplier.

1.2   Multiplier:

$$m=\biggl\lfloor\cfrac{1}{p}\biggr\rfloor-1$$

where \(p\) is the probability of the combination.

1.3   Probability of a combination:

$$p=\prod_{i=1}^{c}\cfrac{n_{i}}{101-i}$$

where \(c\) is the number of colours bet and \(n_{i}\) is the number of balls of the \(i\)th colour bet.

2   Expected returns:

$$E(X)=mp-(1-p)=p\biggl\lfloor\cfrac{1}{p}\biggr\rfloor-1$$

where \(m\) is the multiplier and \(p\) is the probability of the combination.

3   Condition for \(E(X)=0\):

$$p\biggl\lfloor\cfrac{1}{p}\biggr\rfloor=1\quad\text{or}\quad p=\cfrac{1}{k},k\in\mathbb{Z}^{+}$$

Updated for BowlBot Version 17.2.0