If American astronauts fly to Mars in the next few decades, they might be chaperoned by NASA's version of "thinking machines" -- electronic brains that will run the spaceship largely without human aid and make lightning-fast decisions to guard the crew against danger.