MogIA, an artificial intelligence (AI) system developed by an Indian start-up, correctly predicted the outcome of this year’s elections. It based its analysis on 20 million data points from platforms such as Google, Twitter, and YouTube, reviewing public engagement across various posts in relation to individual candidates.

Earlier this year, an AI system was able to accurately predict the winners of the Kentucky Derby. In October, a study reported that AI can already predict the outcomes of cases at the European Court of Human Rights with a 79% accuracy.

Leading up to the historic election, Democratic candidate Hillary Clinton led the late polls with a small, but consistent lead. This made Republican nominee, Donald Trump’s victory a complete surprise for the nation, if not the world.

“While most algorithms suffer from programmers’/developers’ biases, MoglA aims at learning from her environment, developing her own rules at the policy layer and developing expert systems without discarding any data,” said Sanjiv Rai, founder of Genic.ai, which developed MogIA, told CNBC.

In total, the system has consistently predicted the outcomes of the past four presidential elections, demonstrating how advanced AI can prove to be a game changing tool.