If A.I Learns how to Mine/Manipulate Metals then they can most likely replace us 100% as the A.I will have total control of its being.. Untill then Machines will not replace Humans
Then there are Sustainable Energy Problems, unless they use us as the Battery or invent something (Like in the Matrix). If none of this happens then A.I has no chance of Survival
Just my POV