Bandai Japan has created this tiny robot that actually has characteristics of a real crab. It belongs to the Hex Bug line of Bandai, a line of toys that behave like the real life creature.
When you turn on the crab robot, it will run sideways just like a real crab. If you make a noise in front of the approaching crab, it will change direction. (the video below was done on a slick table, so the robot doesn’t change direction very well). Also, if the robot senses its under a protected area, it will try to hide there. The attention to detail is amazing.