Latest small robots have microcontroller as brain where program are stored. And devices are attached to it to perform some action. Program are so written that it regularly trace device's statistics by reading feedback from sensors attached to the devices. Then based on feedback data, it take decision and control of devices according to some algorithm written in program. And the result, it do our desire work.