A Robot Controller Using Learning by Imitation