Description

This project started initially as a class project with Professor Juan Restrepo and has since been published in Physical Review E. This page provides a dodgeball simulation based upon the model described in the link above. The model can be described as follows. There are two teams (1 and 2) that both start with \(N\) players in their respective court. At any time, Team \(i\) has \(X_i\) players within their court. Each player throws a ball with rate \(\lambda\). Thus, the throwing team can be determined by a race condition. For example, Team 1 throws with probability $$P_1=\frac{X_1}{X_1+X_2}.$$ A player may choose to throw a ball at the opposing court or friendly jail. The parameter \(a_i\) gives the probability that a player on Team \(i\) will target the opposing court. When throwing at the opposing court, a player has a chance of knocking an opposing player into jail. When throwing to the friendly jail, the player has a chance of bringing a teammate back into the game.

The parameters \(k_e\) and \(k_j\) give the effectiveness of targeting the opposing court and jail respectively. Specifically the chance of successfully hitting an opponent when there are \(X_i\) players in the opposing court is $$p_e = k_e \frac{X_i}{N}.$$ Similarly, when a ball is thrown at \(Y_i = N-X_i\) players in jail, the probability of saving a player from jail is $$p_j = k_j \frac{Y_i}{N}.$$

In total, the relevant parameters for this model are:

  • \(N=\ \)Number of players per team,
  • \(\lambda=\ \)Throw rate of an individual player,
  • \(a_1=\ \)Probability a player on Team 1 (yellow) targets an opposing player,
  • \(a_2=\ \)Probability a player on Team 2 (blue) targets an opposing player,
  • \(k_e=\ \)Effectiveness of targeting an opposing player,
  • \(k_j=\ \)Effectiveness of targeting a teammate in jail.

Simulation:

This page uses the base Javascript HTML DOM to create its simulation.




Parameters:

Note changes to N only apply upon reset.


N = 25


λ = 1e-2

a1 = 0.5

a2 = 0.5

ke = 0.667

kj = 0.333

Additional Options:

Methods for accelerating the game. Throw forces the ball to be thrown without delay. Accelerate Game removes pauses between throws and makes the ball speed infinite.