With a growing presence in consumer products and services, artificial intelligence and blockchain have become synonyms for innovation. But the two words are rarely used together in the same sentence.  

Cortex blockchain, which was launched in June this year, aims to change that discourse. The platform calls itself the first blockchain to integrate decentralized applications that use artificial intelligence. 

“We can do everything that Bitcoin and Ethereum can do and, on top of that, we can also do machine learning,” Gary Lai, global operations manager at Cortex, told Decrypt

“AI on blockchain is no longer an abstract concept,” he said. Last week, Cortex released its first decentralized app (dapp), Digital Clash, that incorporates AI in the form of a trained model for game scenarios.

Authored by DevBug, an independent development team, Digital Clash is a deceptively simple game. Two teams, red and blue, vie to put a given sequence of numbers in a row onto a canvas. The teams employ various strategies to achieve their goal. For example, they can arrange their tokens in a desired format or purchase pixels from each other using Cortex’s native token. The pixel price is initially set to CTXC (Cortex’s native token) and its price increases based on the number of transactions. Thus, the more transactions that a pixel is involved in, the more expensive it becomes.  

 

Parameters and execution of the game change based on player moves. This is where the AI training model plays an important role. For example, the game’s difficulty is adjusted based on team dynamics. Pixels can also become cheaper if there is a massive imbalance between the number of players for both teams.  

Why AI and blockchain are a difficult match

Microsoft announced earlier this year that it was “leveraging” blockchain to make machine-learning models accessible. But such announcements do not automatically translate to machine-learning integration. 

“It is important not to conflate machine-learning training (writing the program) with machine-learning inference (executing the program),” explained Lai. The devil, according to him, lies in the details. “Other blockchains may be able to store machine-learning models, but they cannot execute AI models in the same way you execute a decentralized application.”

In simple words, this means that execution of the AI program occurs on a local device instead of on a distributed and decentralized system. Hardly a marriage between AI and blockchain.  

The problem is further complicated by the fact that existing popular blockchains like Ethereum cannot run machine-learning models. Lai says it is impossible to run Digital Clash on Ethereum.

Part of the problem is due to Ethereum’s well-documented scaling issues. Machine-learning apps consume more energy and bandwidth because they are computation intensive. Given Ethereum’s limited capacity to handle increases in transaction size and complexity, it would have to move such computations off-chain to execute them.      

The nuances of machine-learning programs are also a hindrance to proper execution of AI software. 

Experience Web 3.0.

Be the first to get Decrypt Members. A new type of account built on blockchain.

According to Lai, it is difficult to infer results using AI on Ethereum’s distributed systems. This is primarily because, unlike typical rules-based programming, machine learning is based on probability and statistics. “Each node in a blockchain’s network will probably get approximately the same but slightly different answer,” he says as explanation for why Ethereum’s consensus model is not the optimal solution for AI.

Cortex uses quantization techniques to ensure that machine-learning programs execute quickly and arrive at a deterministic answer across different devices, says Lai.

In the future, Cortex plans to use its AI-enabling blockchain for myriad applications. As examples, Lai points to the rapidly-increasing network of decentralized finance (DeFi) apps. He says artificial intelligence could be used to make apps that conduct trades or connect buyers with sellers on the stock market.

Even CryptoKitties, the runaway hit game on Ethereum’s blockchain two years ago, could do with a dash of artificial intelligence, said Lai. “They would have so many more degrees of freedom and would become so much more life-like,” he said, referring to the possibilities of AI-powered crypto-kitties mimicking their real-life counterparts.

Editor's note: This article was updated to clarify that Digital Clash was developed DevBug, not Cortex, and to add further details about how Cortex's machine-learning programs work.