We can understand the working of bot with a simple analogy.
Consider a human body. Whenever someone pushes us, we tend to move our legs in the direction of push so as to balance our body. Or when we get off a bus we start running in the forward direction so that we do not fall. Similarly the robot tends to balance itself by adjusting the direction and speed of the motor.
What motors did you use for this project? Also what are the approx dimensions of the robot?
Nice work!
Thanks