I'm building a quadrupedal robot that will learn how to walk. From the responses I got from asking if its possible to run a NN on a micro controller I realised I needed to think of a clever system that wouldn't take 1000 years to be effective and would still be able to demonstrate onboard learning. I've designed a system but I'm not sure how effective it will be.

Firstly I hardcode 5-20 positions for the legs.

I set up a (simple) neural network where each node is a different set of positions for the legs, which I will write.

The robot moves from one node to another and the weight of the joint is determined by how far forward the robot moves.

Eventually there will be strong connections between the best nodes/positions and the robot will have found a pattern of moves that are most successful in walking.

How effective would this be in learning to walk?

Note: instead of positions I could write short gaits and the process would work out which sets work best when combined.

  • 1
    $\begingroup$ 1000 years to learn to walk is not that bad. Definitely more efficient than evolution! $\endgroup$
    – Shahbaz
    Jan 16, 2013 at 13:10
  • $\begingroup$ @shahbaz lol & true. would not a genetic algorithm be more appropriate for this? (and how it worked in evolution by the way). $\endgroup$
    – Spiked3
    Jan 16, 2013 at 16:43
  • 1
    $\begingroup$ Hod Lipson tried using GAs to develop quadraped gaits. His TED Talk on the experience is worth watching. $\endgroup$ Jan 16, 2013 at 16:51
  • $\begingroup$ @Spiked3, well in evolution it was quite random, so you can't really compare. I was just joking. Obviously, if nature had a specific goal (as in a genetic algorithm), things could have been much faster. $\endgroup$
    – Shahbaz
    Jan 16, 2013 at 18:12

2 Answers 2


This reminds me of QWOP (seriously). You need to plan a sequence of button presses to move forward. For every situation the runner finds himself in, we need to know what button to press, how long to hold it, etc. When you play that, you probably look a lot like this video I stumbled across (pun alert): NN training bi-pedal walkers

What you need to recognize is what configuration is my robot in and you need to plan what leg should move to where? So you need a topology like this

Leg encoder values → NN → Leg desired encoder values

The difference is you need actual input in the form of sensor values, and output in the form of actions.

Note, if you had other sensors (IMU would be helpful) it would be included in the inputs, and if you had force-controlled joints, those would be your outputs.


Really this is a question to be answered by experiments. Will it work? It seems like it could. Two things that will be important to look at are:

  1. Training time - You are still using a neural network and they take time to train. Whether this formulation would reduce the number of rounds required for training is really to be seen. It will of course change with the number of connections in the net as your agent will need to test each multiple times.
  2. Training method - Based on your description it seems you are planning to use a Recurrent Neural Network (RNN) which, if memory serves, makes training more computationally intense.

There is a bit of literature on this topic already. For example a quick google reveals a paper titled A neural network model for quadruped gait generation and transitions. It may be worth looking to see what has already been tried. But then sometimes it is just fun to run the experiments.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.