Ray Dalio, head of the world’s biggest hedge fund, Bridgewater, believes that almost half of the jobs in the next two decades will be replaced by artificial intelligence.

The investor said the computer’s capacity to process more information than the human brain is the reason artificial intelligence (AI) is being implemented in financial services.

«By in large, the world is going to largely consist of people who can take language and put it into code, which then allows the computer to operate like a brain or people who are going to be displaced by that.» Dalio was speaking on FOX Business with Maria Bartiromo of «Mornings with Maria.»

Learn to Code

«Those algorithms and that process allows people to get the best thinking not just the thinking that happens to be in people’s minds and it makes for an id meritocracy,» he said. «Something like 40 percent of all jobs are going to be replaced over the next twenty years by these algorithms in various forms.»

Dalio, founder of the world's largest hedge fund, said coding, as an educational area and subsequent career path, will help bridge the gap of widespread jobs loss.«Everybody has to learn to code. It’s like not knowing how to read and write in the new age,» he said.

The 68-year-old American also recently advised clients to get into gold. With President Donald Trump and North Korean leader Kim Jong-un playing «nuclear chicken,» and the threat of AI taking your job, it could be a good move.