What you're talking about is robotic automatons.
The development of truly sentient artificial intelligence that could improve itself would quickly usher in a
technological singularity, and humanity as we know it would cease to exist, as everything we know would be revolutionized.