aureon-os / scripts /diagnostics /check_batten_matrix.py
GaryLeckey's picture
Deploy Aureon OS (deploy/selfhost stack: nginx edge + fusion API x2 + console + HNC organ + redis + postgres; paper mode) (part 19)
da0ce7b verified
Raw History Blame Contribute Delete
1.61 kB
#!/usr/bin/env python
"""Check Batten Matrix coherence Γ— lambda Γ— probability readings."""
from aureon_probability_nexus import EnhancedProbabilityNexus
import asyncio
async def check_nexus():
nexus = EnhancedProbabilityNexus()
# Check current state
state = nexus.get_current_state()
print('\nπŸ“Š PROBABILITY NEXUS - COHERENCE Γ— LAMBDA Γ— PROBABILITY:\n')
print('=' * 70)
print(f'\n🎯 Win rate: {state.get("win_rate", 0):.2%}')
print(f'🎲 Confidence: {state.get("confidence", 0):.4f}')
print(f'🌊 Avg Coherence: {state.get("avg_coherence", 0):.4f}')
print(f'⚑ Lambda (stability): {state.get("lambda", 0):.4f}')
print(f'πŸ’Ž Clarity: {state.get("clarity", 0):.4f}')
print(f'πŸ“ˆ Chaos: {state.get("chaos", 0):.4f}')
print(f'\nπŸ“Š Total predictions: {state.get("total_predictions", 0)}')
print(f'βœ… Correct predictions: {state.get("correct_predictions", 0)}')
print(f'\nπŸ”’ BATTEN MATRIX FORMULA:')
print(f' Score = Coherence Γ— Lambda Γ— Confidence')
coherence = state.get("avg_coherence", 0)
lambda_val = state.get("lambda", 0)
conf = state.get("confidence", 0)
score = coherence * lambda_val * conf
print(f' Score = {coherence:.4f} Γ— {lambda_val:.4f} Γ— {conf:.4f} = {score:.6f}')
print(f'\n Threshold for execution: 0.618 (Golden Ratio)')
print(f' Current score: {"🟒 PASS" if score >= 0.618 else "πŸ”΄ FAIL"} ({score:.4f})')
print(f'\n{"=" * 70}\n')
return state
if __name__ == "__main__":
result = asyncio.run(check_nexus())