Developing algorithms for robots that work intelligently