My firm belief is that artificial intelligence can never replace or overshadow/takeover human intelligence. It is so because, the self-preserving ability of the human brain will be ever greater in the scheme of things. There may be a war between humans and machines but victory will never be granted to machines. Humans have biological advantage which machines do not.
Humans can never attain the speed and accuracy of an ordinary computing device, not to mention the supercomputer. On the other hand, humans have the advantage of instincts, which lead to self-preservation, and a conscience that sets limits on what we do so that we feel guilty when we are bad, and happy when we are good. Hence, resulting in a sense of justice.
If artificial intelligence can be programmed to be good always and serve us, they would not be artificial intelligence, at all. But if they are to be programmed so that they reflect constantly, like we as humans do, on their actions and feel guilty like we do, scientists would have to create the pain and dreadfulness of death and fear of it, whatsoever, so that they can empathize like we, the humans do.
However, even after taking all the precautions we would not be able to exercise control on these machines, by programming them to only act productively and constructively for the creation of a utopian world just in the same way as all of their makers, are not altruists and dream and aim for such a world.
That is to say, many of our kind, are also nasty with only self-serving agendas. At best I can say, that there will be two species interacting with each other, each having their own unique superiorities or special advantages over the other. But, only time will decide whether they would be able to coexist with each other, or humans will have to kill them, eventually.