I have a Lego Mindstorms thingy.
It's a robot with light, and touch sensors all over it and you program it with your PC, via infrared.
I have made a HUGE one with legs about 2ft high, with the Mindstorms engine in it. It goes around the house.
If it bumps into something it turns around and walks the other way.
If it is in a dark place it switches its flashlight on, located in the body, ointing down.
If it's in a lighter place, it walks around as normal.