ai3-lib
AI3 support library for PoT-O validator and miner components.
Current Version: v0.1.6-alpha | Planned: v0.2.0 with Tensor Types
- Crate: crates.io/crates/ai3-lib
- Docs: docs.rs/ai3-lib
- Repository: github.com/TribeWarez/ai3-lib
Usage
[]
= "0.2"
Depends on pot-o-core. When used inside the pot-o-validator workspace, the workspace member is used automatically.
Core Components
Tensor Engine
- Quantum-inspired tensor calculations
- Fixed-point arithmetic (1e6 scale)
- Entropy and mutual information computation
- Entanglement state tracking
ESP Compatibility Layer
- Support for ESP32/ESP8266 microcontrollers
- Embedded mining firmware compatibility
- Low-power operation modes
- WASM compilation support
Mining Operations
- Challenge-response protocol
- MML (Minimal Memory Loss) computation
- Neural path signature generation
- Proof assembly and formatting
AI3 Protocol Support
- Protocol message parsing and validation
- State machine implementation
- Message serialization/deserialization
Tensor Types (v0.2.0)
use ;
// Fixed-point entropy at 1e6 scale
let entropy = from_u64; // 0.5
// Device coherence factor
let coherence: CoherenceFactor = 1.0; // ASIC baseline
// Quantum state
let state = new;
Example: Entropy Calculation
use ;
let engine = new;
let entropy = engine.calculate_entropy?;
println!;
// Fixed-point scale: 1e6 = 1.0
let normalized = entropy.as_u64 as f64 / 1_000_000.0;
ESP32 Usage
use EspMiner;
let mut miner = new;
let challenge = miner.receive_challenge?;
let proof = miner.solve_challenge?;
miner.submit_proof?;
Error Handling
use ;
Testing
Run tests:
Documentation
Full API documentation at docs.rs/ai3-lib
Versioning
Releases follow semantic versioning. To publish:
- Bump
versioninCargo.toml. - Create a tag:
git tag v0.1.1 && git push origin v0.1.1. - CI will publish to crates.io and create a GitHub Release.