Most robots have a task pre-programmed in their program memory. However, sometimes it is difficult to think of a good algorithm. Wouldn't it be great to have a self-learning robot in those situations? In this article we show an example of a robot learning to crawl forward using Q-learning. In the beginning the robot makes some clumsy moves, but as the robot learns, it becomes more and more proficient in crawling forward.