This paper presents a general control architecture for bipedal walking which is based on a divide-and-conquer approach. Based on the architecture, the sagittal-plane motion-control algorithm is formulated using a control approach known as Virtual Model Control. A reinforcment learning algorithm is used to learn the key parameter of the swing leg control task so that speed control can be achieved. The control algorithm is applied to two simulated bipedal robots. The simulation analyses demonstrate that the local speed control mechanism based on the stance ankle is effective in reducing the learning time. The algorithm is also demonstrated to be general in that it is applicable across bipedal robots that have different length and mass parameters.