A balancer simulator implemented in Python