# PoAI - Proof of Artificial Intelligence

{% hint style="info" %}
**Date: March 13, 2023                                                                                     Author: NeutrinosChain**
{% endhint %}

In this consensus scheme, a node must train a Neutrinos neural network and use it to solve puzzles provided by the network in order to gain the right to propose the validity of transactions.

## What is AI

Artificial intelligence is a wide-ranging branch of computer science concerned with building smart machines capable of performing tasks that typically require human intelligence.

## Smart Machines

A smart machine is a device embedded with machine-to-machine (M2M) and/or cognitive computing technologies such as artificial intelligence (AI), machine learning or deep learning, all of which it uses to reason, problem-solve, make decisions and even, ultimately, take action. Neutrinos is a network of smart machine.

## What is PoAI

PoW (Proof of Work）protocol consumes a large number of electricity, PoS (Proof of Stake) and DPOS (Delegated Proof of Stake) are both essentially a centralized voting agreement. To overcome the shortcomings of the above protocols, we present a new energy-saving consensus protocol&#x20;

PoAI (Proof of Artificial Intelligence) to ensure the decentralization, fast and safety of a blockchain system. Artificial intelligence based on machine learning will become perfect as it is used and will surpass all the currently used consensuses.

## **Overview of Proof-of-Artificial Intelligence**

<figure><img src="https://508883279-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaktGHbstiqc36s2Tj6EH%2Fuploads%2FVaR0ZVyRgFhMhN8UH5qQ%2Fimage.png?alt=media&#x26;token=8fccea0a-e5d8-4562-9e19-85835621a53b" alt=""><figcaption></figcaption></figure>

A method for intelligently selecting an accounting node, relating to fields of blockchain, virtual currency and artificial intelligence, is provided, including steps of: Calculate the AVN value of each node by Convolutional Neural Network select the random nodes and the super nodes under a certain threshold value. Characteristic data of nodes are taken as the input information of PoAI, and then a node pool and the mining node are determined as outcomes.&#x20;

On a premise of guaranteeing fairness, decentralization and security of the blockchain, problems of energy waste and low accounting efficiency due to mining conflict are solved. Specifically, a random distribution of accounting rights or mining rights is also adopted for avoiding hacker attacks. The process of constructing a node pool does not require human participation and does not require hash operation to compete computing power, which saves electricity, and ensures fairness and decentralization.

## Pick Super nodes and Random nodes

### All nodes are divided into three categories by Algorithm 2.&#x20;

𝑁𝑖 ={Super ∪ Random ∪ Unknown} 𝑖=1,2,…,𝑁𝑢𝑚<br>

### Algorithm

1. Calculate ATN\_sorted&#x20;
2. Determine the maximum capacity of a node pool 𝑊ℎ𝑜𝑙𝑒\_𝑚𝑎𝑥&#x20;
3. Generate a random integer i (0.5 𝑊ℎ𝑜𝑙𝑒\_𝑚𝑎𝑥 \<i<𝑊ℎ𝑜𝑙𝑒\_𝑚𝑎𝑥) as node number in a node pool 𝑁𝑜𝑑𝑒\_𝑝𝑜𝑜𝑙\_𝑛𝑢𝑚&#x20;
4. Generate 𝑇ℎ𝑟𝑒𝑠 (<𝑁𝑜𝑑𝑒𝑠\_𝑝𝑜𝑜𝑙\_𝑛𝑢𝑚) to determine the number of super nodes 𝑆𝑢𝑝\_𝑛𝑢𝑚&#x20;
5. Select the first 𝑆𝑢𝑝\_𝑛𝑢𝑚 nodes as the Super nodes&#x20;
6. Pick 𝑅𝐴𝐷\_𝑛𝑢𝑚 random nodes

The *ATN* values can be obtained from the well-trained convolution neural network, and a ranking list *ATN\_sorted* in descending order is easy to be calculated by stable *Merging sort algorithm* with low time and space complexity. One node is awarded as a super node as long as its rank is higher than 𝑆𝑢𝑝\_𝑛𝑢𝑚 .We pick R𝐴𝐷\_𝑛𝑢𝑚 random nodes from the *ATN\_sorted* except for Super nodes stochastically.Both super nodes and random nodes form the node pool. The mining node can be picked from the node pool based on a rotation mechanism.&#x20;

A node pool consisting of super nodes and random nodes realizes fairness of the whole network since both powerful nodes and common nodes participate in transaction record. The mechanism of generating random nodes ensures that the distributed network is capable to resist external some attacks. As the number of nodes in the network increases, the node capacity of the node pool remains unchanged. It is a fact that only nodes in the node pool has the right to mine by turn. This consensus encourages nodes to enhance their personal strength 𝐶𝑅𝑇 and lower security risk 𝐷𝐴𝐴 as much as possible in blockchain.&#x20;

## ATN of different factors

<figure><img src="https://508883279-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaktGHbstiqc36s2Tj6EH%2Fuploads%2FNvFkClx19jHagH8BcyFL%2Fimage.png?alt=media&#x26;token=f7933d6d-c388-41bb-ba3a-caca627b845c" alt=""><figcaption></figcaption></figure>

<figure><img src="https://508883279-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaktGHbstiqc36s2Tj6EH%2Fuploads%2FPssu8PYbTqQkPAXO9jLW%2Fimage.png?alt=media&#x26;token=690c22f5-45db-495c-888e-e536b029203c" alt=""><figcaption></figcaption></figure>

<figure><img src="https://508883279-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaktGHbstiqc36s2Tj6EH%2Fuploads%2FcvLDSf03tXRvfAyjBJ6M%2Fimage.png?alt=media&#x26;token=85ea8e72-517d-415f-b9c2-87c348ec3f9d" alt=""><figcaption></figcaption></figure>
