the algorithm concept might start with 2 basic concepts: - if the center of mass projected onto the ground plane is within the convex polygon defined by all the touchpoints of the feet, the robot has no torque applied to it from gravity. otherwise, it has a torque about the edge of that polygon closest to its center of mass, pulling it downward. - there are multiple strategies for moving the robot's center of mass along a path, and these strategies are limited by the order in which the feet are lifted. given diverse situations, it's sensical to consider multiple options for which foot to lift first, and predict how the robot's stability will be affected along the path, depending on the foot lift and placement timing. (simple exploratoin of a decision tree, like solving tictactoe). looks like my confusion is mostly around outlining that simulation, so that's where weird expressions are likely to develop around here.