You're confusing a highly optimized loss function with AGI. Robots will continue being better at doing rote things humans do, and we will continue building them predictable environments to do them in.
But AGI is another beast. We don't understand causality in ML. We are no where near getting there.
I could foresee building some incredible human-computer interfaces, but I don't think we will get to a self-motivated thinking machine any time soon. We don't understand how our own consciences work. If we did, we would be able to better model human psychology and behavior, but we can't yet.