A global survey of experts in machine learning suggests it will be 120 years before all human jobs are automated.
In 45 years' time, though, half of jobs currently filled by humans will have been taken over by an artificial intelligence system, results indicate.
The report, When will AI exceed human performance?, says AI will reshape transport, health, science and finance.
The study was compiled by the Future of Humanity Institute, at the University of Oxford.
It asked three keys questions about AI:
- How will high-level machine intelligence affect economic growth?
- What are the chances this will lead to extreme outcomes?
- What should be done to help ensure AI progress is beneficial?
The experts believe that in the next 40 years AI will outperform humans in the following tasks:
- translating languages (by 2024)
- writing school essays (by 2026)
- driving a lorry (by 2027)
- working in retail (by 2031)
- writing a best-selling book (by 2049)
- working as a surgeon (by 2053)
On the big question of whether AI would be good or bad for the human race, most felt the probability for a bad outcome was low (10%), compared with a median probability of 25% for a good outcome.
The probability for extremely bad (ie the extinction of the human race) was given at 5%.
Nearly half of those questioned said that research on minimising the risks of AI should be prioritised by society.
The so-called intelligence explosion - the idea that AI systems will quickly become vastly superior to humans in all tasks once high level machine intelligence is achieved - was seen as improbable but not impossible.
Noel Sharkey, a robotics and AI expert at Sheffield University, said: "Survey results about the future can be useful within a five to 10 year range. That is the foreseeable future. Once we get beyond that, it is pure speculation."
He said it was inevitable that machines would outperform humans on many tasks but questioned whether this would make the technology comparable to humans.
"I don't know if it will ever be able to get up in the morning and understand my partner's mood or if the dog needs to go out, or to make meaningful human decisions," he said.
"And why would we want that anyway? Even if it was possible, we might reject it within 40 years."