A beam turns when forces twist it. The twist (torque) of a weight is τ = m · g · d, where d is how far the weight sits from the pivot. The beam is level when the left and right twists are equal: Σ m·d (left) = Σ m·d (right). In this game d is counted in steps, so number × steps is multiplication: 2 kg at 3 steps and 3 kg at 2 steps both make 6.
Like a balance scale, this beam hangs from a pivot above it (height a = 0.5 m). Tilting by θ moves the weights sideways, which creates a restoring twist, so the beam settles at an angle instead of flopping over. The equation of motion is I θ'' = −g·cosθ·Σ(m x) − g·sinθ·(Mba + Σm(−y)) − cθ', with I the moment of inertia (beam + animals) and c a damping that makes it wobble a little and calm down.
At rest tanθ = −Σ(m x) / (Mba + Σm(−y)). The "Check the physics" box compares the simulated angle with this formula. A perfectly level result needs Σ(m x) = 0.
Simplifications: the beam is a stiff 8 kg plank, 1 step = 0.65 m, every animal is a point mass at its body centre (size grows with the cube root of its number), animals are glued to the plank, no air drag, hard stops at ±20 degrees (the beam bounces a little). A real playground seesaw pivots below its plank and needs a person's balance; this one hangs so the physics is stable and measurable. Models built in Blender 5.2, shown with Three.js.