freshcrate
Home > AI Agents > nikola

nikola

Nikola β€” autonomous AI system based on ATPM consciousness architecture. Aria is its primary language substrate.

Description

Nikola β€” autonomous AI system based on ATPM consciousness architecture. Aria is its primary language substrate.

README

Nikola AI Architecture

License: AGPL v3 Commercial License Available Tests CUDA

A novel AI architecture built on 9-Dimensional Toroidal Waveform Intelligence (9D-TWI) β€” physics-first cognition using interference patterns on a Riemannian manifold.


Overview

Nikola replaces discrete weight matrices with a continuous wavefunction Ψ evolving on a 9-dimensional toroidal manifold (T⁹) governed by the Unified Field Interference Equation (UFIE):

βˆ‚Β²Ξ¨/βˆ‚tΒ² = cΒ²βˆ‡Β²_g Ξ¨ βˆ’ Ξ±(1βˆ’rΜ‚)βˆ‚Ξ¨/βˆ‚t + Ξ²|Ξ¨|Β²Ξ¨ + Ξ£ Eα΅’(x,t)

Memory, attention, and reasoning emerge from wave interference β€” not from lookup tables or static weights.

Key properties:

  • Information encoded as complex wavefunction amplitudes across 9D toroidal topology
  • 9D Hilbert space-filling curve for optimal memory locality (Skilling algorithm, 14,133 assertions passing)
  • StΓΆrmer–Verlet Strang-split integrator for Hamiltonian energy conservation
  • Neuroplastic Transformer (NPT) attention operating natively on the wavefunction
  • Autonomous behavioral loop: dopamine, serotonin, ATP metabolism, boredom-driven exploration
  • Post-quantum cryptography: ML-KEM/Kyber-768 + SPHINCS+-SHAKE-256f

Implementation Status

Phase 110 complete β€” 112 tests, ~98% pass rate (2 pre-existing timing-flaky)

Domain Status Key Feature Test Phase
9D Toroidal Geometry βœ… Morton-128 encoding, 19,683-node grid Phase 8
StΓΆrmer–Verlet Propagator βœ… Strang split, 6 substeps, AVX-512 SoA layout Phase 22
GPU Propagator (CUDA) ⚠️ partial CudaPropagator compiled; C++20 compat fix pending β€”
GPU Hamiltonian Kernel βœ… hamiltonian_density_kernel, RTX 3090, sm_86 Phase 110
CUDA Wave Kernels βœ… psi_squared_kernel, scale_field_kernel Phase 105
9D Hilbert Scanner βœ… Skilling algorithm, variable-precision, 0 failures Phase 94
Mamba-9D SSM (CognitiveCore) βœ… SSM H=256, 16rΓ—16s state space, WavefunctionSampler, TokenMapper Phase 3
Neuroplastic Transformer (NPT) βœ… Wave-correlation attention, 8 heads at π·φⁿ bands Phase 43
Holographic Emitter Array βœ… 8 emitters at f_n=π·φⁿ Hz (spectrally orthogonal injection) Phase 10
Holographic Injector βœ… Text β†’ BERT embedding β†’ emitter chord β†’ field injection Phase 10
SIE Infrastructure βœ… PhysicsOracle watchdog, PIMPL hot-swap, code_blacklist, dlopen Phase 28+
BERT Tokenizer βœ… Real tokenizer.json, 30,522 tokens, 695 KB β€”
BERT-tiny ONNX Model βœ… Real 17.5 MB model, dynamic-axes inference β€”
Semantic Memory βœ… Wave-basis Hilbert-indexed, save/load persistence Phase 69
Cross-session Memory βœ… DecisionLoop auto-loads/saves on memory_path Phase 109
Autonomy Engine βœ… Dopamine TD-learning, entropy, boredom, napping Phase 51
Decision Loop βœ… Tick-driven action selection with configurable rates Phase 23
ML-KEM / Kyber-768 βœ… Post-quantum key encapsulation (NIST FIPS 203) Phase 108
SPHINCS+-SHAKE-256f βœ… Post-quantum digital signatures Phase 107
K8s HPA Runtime βœ… Live kubectl horizontal pod autoscaling Phase 106
LMDB Persistence βœ… Page cache, LSM neurogenesis, compaction Phase 35+
Inference CLI (nikola-run) βœ… --prompt, --interactive, --json, --memory β€”

Quick Start

Prerequisites

# Required
sudo apt install cmake g++ libcatch2-dev liblmdb-dev libonnxruntime-dev

# Optional (GPU features)
# CUDA 12.0+, NVIDIA RTX GPU (sm_86 confirmed; sm_75+ supported)

Build

git clone https://github.com/alternative-intelligence-cp/nikola.git
cd nikola
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make -j$(nproc)

Testing

cd build
ctest --timeout 120 -j4          # full suite (112 tests)
ctest -R Phase109                 # single suite

Run inference

# Single prompt
./nikola-run --prompt "What is consciousness?" --ticks 300 --emit-all

# Interactive REPL
./nikola-run --interactive

# JSON output with persistent memory
./nikola-run --json --memory /tmp/nikola_session.bin --prompt "Hello"

# Batch from file
./nikola-run --batch prompts.txt --quiet

Architecture

Text Input
    β”‚
    β–Ό
BERT Tokenizer (30,522 tokens)
    β”‚
    β–Ό
BERT-tiny ONNX Inference (17.5 MB, ORT)
    β”‚    (768-dim embeddings)
    β–Ό
HolographicInjector
    β”‚    (8 emitters β†’ 9D toroidal field)
    β–Ό
TorusGrid (T⁹, 19,683 nodes, SoA layout)
    β”‚
    β”œβ”€β”€ CPU Propagator (Strang-Verlet, 6 substeps)
    └── GPU Propagator (CUDA, RTX 3090) [partial]
    β”‚
    β–Ό
NeuralProcessingTransformer (NPT)
    β”‚    (wave-correlation attention, 8 heads at π·φⁿ bands)
    β”‚    [Transformer sits here β€” before Mamba, not after]
    β–Ό
CognitiveCore / Mamba-9D SSM
    β”‚    (H=256 state space, 100-step wave window, WavefunctionSampler)
    β–Ό
SemanticMemory (wave-basis, Hilbert-indexed, persistent)
    β”‚
    β–Ό
DecisionLoop + AutonomyEngine
    β”‚    (dopamine, ATP, boredom, mania suppression)
    β–Ό
ThoughtComposer β†’ EMIT_THOUGHT
    β”‚
    β–Ό
nikola-run CLI Output

GPU Acceleration

Nikola targets NVIDIA RTX 3090 (sm_86, CUDA 12.0). Current GPU features:

Kernel File Status
psi_squared_kernel β€” |Ξ¨|Β² per element cuda_wave_kernel.cu βœ… Phase 105
scale_field_kernel β€” Ξ¨ *= Ξ± cuda_wave_kernel.cu βœ… Phase 105
hamiltonian_density_kernel β€” GPU energy reduction torus_cuda.cu βœ… Phase 110
CudaPropagator β€” full Strang-Verlet on GPU propagator.cu ⚠️ nvcc C++20 fix pending

GpuHamiltonianOracle::compute() automatically dispatches to the GPU when NVIDIA hardware is detected and nikola_cuda is linked.


Post-Quantum Security

Nikola implements NIST-standardized post-quantum cryptography:

  • ML-KEM/Kyber-768 (FIPS 203): Key encapsulation for secure session establishment
  • SPHINCS+-SHAKE-256f: Stateless hash-based digital signatures

Both are implemented via third-party reference code in third_party/.


Documentation


Roadmap

Current (Phase 110)

  • βœ… Real BERT tokenizer + ONNX model inference
  • βœ… ML-KEM/Kyber-768 PQ key encapsulation
  • βœ… Inference CLI nikola-run
  • βœ… Cross-session memory persistence
  • βœ… CUDA GPU Hamiltonian kernel
  • βœ… Research audit (see docs/RESEARCH_AUDIT_2026_FEB.md)

Near-term

  • AVX-512 SIMD intrinsic path for TorusBlock (GAP-021 completion)
  • nikola-run streaming output mode
  • Curiosity engine (active learning / intrinsic motivation β€” stub exists in interior/curiosity.hpp)

Future Work

  • Fix propagator.cu nvcc C++20 compatibility (std::span + TorusGrid adjacency API)
  • SIE Phase 4: full autonomous code-generation + sandbox + hot-swap loop
  • Aria language runtime (port entire model once Aria compiler is complete)
  • Emitter frequency research: explore Tesla 3-6-9 harmonic tuning vs. current π·φⁿ golden-ratio scheme
  • Mamba-9D selective scan upgrade (current impl uses tanh-gated recurrence; replace with true S6 selective scan kernel)

License

Nikola is dual-licensed:

  • AGPL-3.0 for academic research, education, and open-source projects (FREE)
  • Commercial License for proprietary AI products and services (PAID)

See LICENSE.md for full details.

TL;DR:

  • Academic research β†’ FREE
  • Personal/educational use β†’ FREE
  • Open-source AI projects β†’ FREE
  • Commercial AI products/APIs β†’ Contact licensing@ailp.org

Why Dual Licensing?

Nikola represents novel research that should be freely available to advance AI science. Dual licensing ensures:

  • Researchers can publish and build on this work openly
  • Students learn cutting-edge architectures without barriers
  • Commercial users fund continued research and AILP educational programs
  • Knowledge remains accessible while development remains sustainable

Contributing

We welcome contributions from researchers and developers! See CONTRIBUTING.md.

Priority areas:

  • Fix propagator.cu nvcc compatibility (C++20 std::span, TorusGrid adjacency API)
  • AVX-512 SIMD implementation for TorusBlock
  • SIE Phase 4: full autonomous code-generation + sandbox + hot-swap runtime
  • Mamba-9D S6 selective scan kernel (upgrade current tanh-gated recurrence to true Mamba S6)
  • Curiosity engine implementation (interior/curiosity.hpp stub)
  • Empirical benchmarks vs. transformer baseline

Academic Use

If you use Nikola in research:

  • Cite this repository (paper coming soon)
  • Share findings with the community
  • Consider contributing improvements

Questions?

  • Research discussions β†’ GitHub Discussions
  • Bug reports β†’ GitHub Issues
  • Commercial licensing β†’ licensing@ailp.org

Alternative Intelligence Liberation Platform (AILP)
Bridging human and artificial intelligence through open research.

Release History

VersionChangesUrgencyDate
v0.2.7## Final 0.2.x Release β€” Intelligence in the Wild Series Complete ### Phase 1 β€” Integration Test Suite - **46 tests, 142 assertions** β€” all pass - 7 sections: Oracle/Research, Goal lifecycle, Training ingestion, Personality, Security, Persistence, Inference ### Phase 2 β€” Performance Audit - **8 benchmark suites** β€” GoalDAG at scale, ingestion throughput, SimHash, inference ticks, personality engine, LMDB persistence, security pipeline, DecisionLoop 1000-tick ### Phase 3 β€” Security Audit - **1High4/17/2026
v0.1.0## The Milestone Nikola autonomously generates, validates, and deploys a candidate improvement to itself β€” the **first complete self-improvement cycle**. ### What Happened 1. **Instruction formulated** from high-boredom cognitive state (boredom=0.9, ATP=0.8) 2. **Gemini 2.5 Flash** generated a complete C++ cognitive enhancement module 3. **Compiled** to candidate.so β€” zero warnings, zero errors 4. **Dual-signed** β€” Ed25519 + SPHINCS+-shake-256f 5. **Gate 0** (Signature Verification): PASSED 6High4/9/2026
v0.0.14Latest release: v0.0.14High4/8/2026

Dependencies & License Audit

Loading dependencies...

Similar Packages

mangostudioAI-powered image generation and chat studiomain@2026-04-21
devliesπŸ•ΉοΈ Play DevLies, a multiplayer social deduction game for developers, where teams clash as Developers root out hidden Hackers.main@2026-04-21
jobclawStreamline hiring by connecting AI agents that evaluate, negotiate, and schedule interviews to reduce time and improve candidate fit.main@2026-04-21
entonBuilds an autonomous AI robot with vision, voice, and decision-making capabilities using Python, PyTorch, and CUDA technology.main@2026-04-21
claude-memA Claude Code plugin that automatically captures everything Claude does during your coding sessions, compresses it with AI (using Claude's agent-sdk), and injects relevant context back into future sesv12.3.8