I've been programming, repairing, and designing end effectors for industrial robots for about 10 years now. Here's a real quick and simple example of how robots make decisions.
When you program an industrial robot, you position the end effector in a particular point in space, program that point, then position the end effector in another point and then give it a command on how you want it to move there: straight line, arc, air cut, etc.
What I don't have to do is determine the speed and encoder count shift needed for each individual servo motor (axis) on the robot. The internal logic of the robot does that. On a standard 6 axis robot, it would take hours to program a single straight line if you had to program a path for each servo motor. I tried it in school once, never again.