When building bipedal robots (robots that walk on 2 legs), ensuring stability is a primary objective.
The following strategies are among the most important:
1- First of all, before even considering the rest, we need to make the physical shape and mass distribution as good as possible for a proper, stable stance. This simply means
-the center of mass is as low as possible, (for example placing heavier components at the bottom and or making upper components of lighter weight material
-the mass is distributed as evenly as possible
-the mass bears on as wide surface area as possible (this can be achieved by positioning and proportioning of sizes of legs and feet accordingly but this will obviously affect maneuverability
These principles are simply following basic physics rules, similar to making buildings stable. If this item is not properly done, the rest below can only go so far, or it will mean difficult and costly/time consuming solutions. This item is similar to an architect designing the overall shape of the building as regularly as possible in the first place, for a smooth and efficient flow of forces from top floors all the way to the foundation. If the architect’s design is irregular there is only so much the structural engineer can do to accommodate those irregularities or the solution will need stronger members, connections and load carrying system, which will be costlier and longer to build.
2- The robot must be able to predict the immediate future situations and adjust controls accordingly.
3-Robots joints (limbs) must be designed to provide a balanced and stable motion. The control algorithm must adjust joint torques instantly to respond to feedback from sensors.
4- Machine learning and adaptation techniques can also be applied. With proper algorithm, by learning from failures, the robot will be able to refine its responses.
5-Sensor inputs must provide adequate information to the robots control algorithm. Sensors inputs such as visual, inertial, force and torque are necessary components.
Also search the term Zero Moment Point (ZMP)