Point of the Game
This simulation models a closed system where a fixed amount of energy is exchanged randomly between students.
No energy is created or destroyed. Instead, energy moves from one student to another during each round of the game.
This makes the activity a simple model of how microscopic randomness can lead to predictable large-scale statistical behavior.
At the beginning of the simulation, every student starts with exactly 1 unit of energy.
Students are arranged on two concentric rings and paired by alignment each round.
Each pair plays a simulated rock–paper–scissors interaction which determines whether energy moves between them.
How one round works
- Pairing: An inner-ring student is paired with the aligned outer-ring student.
- Random outcome: Each pair receives a random rock-paper-scissors result.
- Win: If one student wins and the loser has at least 1 energy, 1 unit transfers from loser to winner.
- Tie: If the result is a tie, no energy changes hands.
- No change: If a student loses but has 0 energy, nothing transfers.
- Rotation: After the round, the inner ring rotates so new pairs form for the next round.
Example: Mid-round screenshot
A mid-round view of the simulation. Some pairs result in energy transfer, some tie,
and some produce no change because the losing student has zero energy.
The exact assignment of energy to each individual student is called a microstate.
However, we can also summarize the system using a broader description such as
"8 students have 0 energy, 4 have 1 energy, 2 have 2 energy," and so on.
That summary description is called a macrostate.
The key idea of the simulation is that some macrostates can occur in far more ways than others.
Over time, the system naturally spends most of its time in macrostates that can be realized by many different microscopic arrangements.
These highly realizable states correspond to what we call equilibrium.
Calculations
Each round produces a macrostate describing how many students occupy each energy level.
Instead of tracking which specific student has which energy, we count how many students have 0 energy,
how many have 1 energy, how many have 2 energy, and so on.
The formulas below allow the simulation to measure how typical the current macrostate is and how the system evolves toward equilibrium over time.
\[
\sum_k n_k = N,\quad \sum_k k n_k = E
\]
These equations define a valid macrostate. The first says the total number of students must remain constant. The second says that when all student energies are added together, the total energy must remain fixed.
Microstates and Entropy
\[
W = \frac{N!}{\prod_k n_k!}
\]
This equation counts how many distinct microscopic arrangements produce the same macrostate.
A macrostate with a larger value of \(W\) can occur in more ways and is therefore statistically more likely.
\[
S \propto \ln W
\]
Entropy is proportional to the logarithm of the multiplicity. The logarithm is used because the number
of microstates becomes extremely large very quickly.
Relative Probability
\[
P_{rel} = \frac{W}{W_{max}}
\]
This compares the multiplicity of the current macrostate to the multiplicity of the most probable macrostate.
Values close to 1 indicate the system is near equilibrium.
Running Average
\[
\overline{\ln W}_n = \frac{1}{n}\sum_{i=1}^n \ln W_i
\]
Individual rounds fluctuate significantly, so the running average smooths out noise and reveals
the long-term trend toward equilibrium.
Histogram Averaging
\[
\overline{n_k} = \frac{1}{T}\sum_{t=1}^T n_k(t)
\]
The histogram can display either the current distribution or a time-averaged distribution.
Averaging produces a more stable comparison with theoretical predictions.
Interpreting Results
The most probable macrostate is the distribution that maximizes the multiplicity \(W\).
For systems with mean energy near 1, the expected equilibrium-like distribution follows:
\[
n_k \approx \frac{N}{2^{k+1}}
\]
| Energy Level \(k\) |
Typical Count (N=24) |
Interpretation |
| 0 | ≈12 | Roughly half the students have no energy. |
| 1 | ≈6 | A smaller group holds 1 unit. |
| 2 | ≈3 | Fewer students accumulate 2 units. |
| 3 | ≈1-2 | High-energy students are uncommon. |
| 4+ | Rare | Very high energy is possible but unlikely. |
Equilibrium does not mean equal sharing of energy.
Instead, it means the system fluctuates around macrostates that can occur in the greatest number of ways.
- If \(\ln W\) levels off, the system is near equilibrium.
- If \(P_{rel}\) fluctuates mostly near 1, the system frequently visits near-equilibrium macrostates.
- If the histogram matches the theoretical curve, the energy distribution is behaving as expected.