Stability optimization in action imitation for humanoid robot | Synapse