If This, Then That

Sensor rules: write one program that guides a museum robot through galleries it has never seen, turning and stopping by itself.