XOR means eXclusive Or. It is a Boolean operation which takes binary inputs and combines them for a single digital output.
An XOR gate is explicitly a 2 input device, who’s output is only true if and only if the inputs are different.
Look at the Truth Table:
Time to build your own robot! Using a Raspberry Pi with parts and some time, you can use my book to learn how to make and program a robot with automatic behaviours.