📖
AiPTP.COM($ATMT) Whitepaper V1.4 24.04/2024
WebTwitterTelegramDiscord
  • 📓Introduction
  • 🔲1.Project Background
    • 1.1 Emergence and significance of blockchain technology
    • 1.2 Potential and Current Status of Artificial Intelligence
    • 1.3 The collision of blockchain and artificial intelligence
    • 1.4 ATMT's Vision
  • 🖥️2.ATMT Ecosystem
    • 2.1 Artificial intelligence search engine
    • 2.2 VR artificial intelligence game development
    • 2.3 Artificial Intelligence Wallet
    • 2.4 Artificial Intelligence Exchange
    • 2.5 Artificial intelligence social system
    • 2.6 Intelligent algorithmic trading manipulation system
    • 2.7 Bitcoin L2
  • 📲3. ATMT Technology Introduction
    • 3.1 Design concept
    • 3.2 Technology Model
  • 💲4.ATMT Tokenomics
  • 📔Contracts
  • 💯5. ATMT Team
  • 🗺️6. Roadmap
  • 🏦7. Governance Structure
    • 7.1 Introduction to the Foundation
    • 7.2 ATMT DAO
  • 🏷️8. Disclaimers
Powered by GitBook
On this page
  1. 2.ATMT Ecosystem

2.7 Bitcoin L2

Previous2.6 Intelligent algorithmic trading manipulation systemNext3. ATMT Technology Introduction

Last updated 2 years ago

Bitcoin L2 consists of two components. AIS Chain, which is based on POS (Proof of Stake), and AIW, which is based on POW (Proof of Work).

1)AIS Chain: The AIS Chain is responsible for the computational process in the AI algorithm, which trains large and complex data into usable visualized data, with some code structure examples as follows.

def forward(self, name, apis, tokens, desc_good, desc_bad):

code_repr = forward_code(name, apis, tokens)

good_sim = F.cosine_similarity(code_repr, forward_desc(desc_good))

bad_sim = F.cosine_similarity(code_repr, forward_desc(desc_bad))

return (margin - good_sim + bad_sim).clamp(min=1e-6)

python src/3Model/codenn.py --dataset_path data/py/final --model_path data/py/model --batch_size 512 --epoch 800 --gpu

Among them, --dataset_path and --model_path are mandatory parameters, which indicate the directory where the input files are located during training and the directory where the model is saved after training, respectively. There are also some optional parameters, such as.

--batch_size, specify the batch size for training, default 32, here specify 512

--epoch, specify how many epochs to train, default is 200, here is 800

--gpu, specify the GPU to run on, followed by a comma separating the GPU IDs, such as --gpu 0,2, to specify the training on block 0 and block 2 GPUs

--load, if the training is stopped in the middle, you can use this parameter to load the saved model to continue the training.

--save_every_epoch, specifying how many epochs to save the model after.

2)AIW Chain: AIW Chain is responsible for the extrapolation process of AI algorithms, which extrapolates the computational results to a reasonable scope and within the scope of human comprehension, and the process of extrapolation also requires a lot of computing power for aggregate analysis.

Implementation principle of the extrapolation algorithm

Extrapolation algorithm code example

episode_rewards = []for episode in range(env.scenario.num_episodes): print(f'=== Episode {episode + 1} ===')

# initialize environment
observation = env.reset()
x = observation['x']
y = observation['y']
done = False

# run simulation
while not done:
    action = {
        'x': x,
        'y': y,
    }
    observation, reward, done, info = env.step(action)
    x = observation['x_adv']
    y_pred = observation['y_pred']
    winner = observation['winner']
    step_count = info['step_count']

    print(f'Round {step_count}: ({y[0]} | {y_pred[0]})')

print(f'Game end: {winner} wins after {reward} rounds')
episode_rewards.append(reward)
scenario statsmean = np.mean(episode_rewards)stddev = np.std(episode_rewards)median = np.median(episode_rewards)print(f'mean: {mean}, stddev: {stddev:.3f}, median: {median}')

3)Bitcoin and AIS, AIW cross-chain swap

The cross-chain swap between Bitcoin and AIS, AIW is done by staking after mint, while the swap between AIS and AIW is done by burning after mint.

🖥️
Page cover image