Skip to content

Latest commit

Β 

History

165 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🧠 GNOSTRA: The Sovereign Machine AGI

A decentralized, autonomous AGI system for optimal resource allocation to solve human needs

Status Docker License


πŸš€ Quick Start (30 Seconds)

# Clone and navigate
cd project-gnosis

# Run basic allocation test
.\test-scenario1.ps1

# That's it! ✨

First run: 2-5 minutes (builds Docker containers)
Subsequent runs: 30-60 seconds


πŸ“‹ What is GNOSTRA?

GNOSTRA is a Sovereign Machine - an autonomous AGI system designed to:

  • Identify bottlenecks in human needs using a 12-pillar framework
  • Optimally allocate resources using constraint programming (OR-Tools)
  • Learn and adapt through reinforcement learning
  • Verify all decisions with counterfactual analysis
  • Provide cryptographic proof for every allocation

Core Philosophy

"Maximize the NeedIndex by resolving the primary bottleneck"

The system uses a non-compensatory objective function - it cannot ignore critical failures even if other areas are thriving. A 0% "Biological Viability" pillar cannot be offset by a 500% "Play" pillar.


🎯 Testing Scenarios

Scenario 1: Basic Allocation (M0)

What: Core allocation loop with cryptographic verification
Time: 2-5 min (first), 30-60 sec (subsequent)
Command:

.\test-scenario1.ps1

Validates:

  • βœ… Resource allocation optimization
  • βœ… Cryptographic signatures
  • βœ… End-to-end data flow
  • βœ… Neo4j storage
  • βœ… NATS messaging

Scenario 2: M3 Learning Loop

What: Complete autonomous learning system
Time: 3-7 min (first), 1-2 min (subsequent)
Command:

.\test-scenario2-m3.ps1

Validates:

  • βœ… Digital twin simulation
  • βœ… Reinforcement learning (Multi-Armed Bandit)
  • βœ… Policy adaptation
  • βœ… Counterfactual evaluation
  • βœ… Autonomous operation

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    GNOSTRA AGI System                   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Infrastructure:
β”œβ”€β”€ Neo4j 5.26 (Knowledge Graph)
└── NATS 2.10 (Message Bus)

Core Services:
β”œβ”€β”€ API Host (Rust) - gRPC Server
β”œβ”€β”€ Allocator (Python) - CP-SAT Optimization
└── Storage - Event log + Graph state

M3 Learning Loop:
β”œβ”€β”€ Simulator - Digital twin scenarios
β”œβ”€β”€ Learner - RL policy optimization
└── Evaluator - Counterfactual analysis

Human Interface:
└── Qt/QML HMI Client

πŸ“¦ Requirements

For Docker Testing (Recommended)

  • Docker Desktop
  • PowerShell (Windows) or Bash (Linux/Mac)

For Local Development

  • Rust 1.70+ & Cargo
  • Python 3.11+
  • Docker (for Neo4j & NATS)
  • Qt 6.8+ (for HMI client)

πŸ“š Documentation

Getting Started

System Documentation

Technical Reference


πŸ› οΈ Common Commands

# Run basic test
.\test-scenario1.ps1

# Run M3 learning loop
.\test-scenario2-m3.ps1

# Get allocator public key
.\get-allocator-public-key.ps1

# Stop all services
.\stop-all.ps1

# View logs
docker-compose logs -f allocator
docker-compose logs -f learner

# Check service status
docker-compose ps

# Clean up everything
.\stop-all.ps1  # Then select 'y' to remove volumes

πŸŽ“ Understanding the Output

M0 Tabletop Test Output

[PHASE 1: SETUP] - Services initialized
[PHASE 2: INGRESS] - Data validated and stored
[PHASE 3: NEEDS COMPILER] - Bottleneck identified
[PHASE 4: ALLOCATOR] - Optimal solution found
[PHASE 5: COMPLETE] - Plan ID: plan_abc123...

M3 Learner Output

[METRIC] Scenario started
[MAB Update] Q-value updated (learning)
[POLICY] New policy selected
[AUDIT] Regret calculated

Lower Q-values β†’ Better policies
Lower regret β†’ Better decisions


πŸ”¬ System Capabilities

Current (M3 Complete)

  • βœ… Constraint-based optimization (CP-SAT)
  • βœ… 12-pillar needs assessment
  • βœ… Cryptographic verification (Ed25519)
  • βœ… Reinforcement learning (MAB)
  • βœ… Counterfactual evaluation
  • βœ… Autonomous adaptation
  • βœ… NATS messaging
  • βœ… Neo4j storage
  • βœ… gRPC API
  • βœ… Qt HMI client

Roadmap

  • ⏳ Privacy layer (PII vaults)
  • ⏳ Zero-knowledge proofs
  • ⏳ DID-based identity
  • ⏳ Dispute resolution
  • ⏳ Meta-governance

🀝 Contributing

This is an active research project. Contributions welcome!

Development Workflow

  1. Make changes to code
  2. Rebuild affected services:
    docker-compose build allocator
    docker-compose up -d allocator
  3. Test changes:
    docker-compose logs -f allocator

πŸ“Š Project Status

Phase: M3 (Learning Loop) - βœ… Complete
Services: 9 microservices
Languages: Rust, Python
Infrastructure: Docker, Neo4j, NATS
Testing: Automated via Docker Compose


🎯 Success Metrics

Basic Test (Scenario 1):

  • Allocation time: < 5 seconds
  • Plan verification: < 500ms
  • Success rate: 100%

M3 Loop (Scenario 2):

  • Learning convergence: 50-100 iterations
  • Regret at convergence: < 0.05
  • System throughput: 10+ plans/minute

πŸ”— Quick Links


πŸ“„ License

To be determined - Research project


πŸ™ Acknowledgments

Built with:

  • OR-Tools - Constraint optimization
  • Neo4j - Graph database
  • NATS - Message broker
  • Rust - Systems programming
  • Python - Scientific computing
  • Qt - GUI framework

Ready to test the AGI? Run .\test-scenario1.ps1 πŸš€

Last Updated: 2025-11-09


by ASTRA MATRIX

About

The Sovereignty Primitive.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages