Skip to content

Latest commit

 

History

History
457 lines (363 loc) · 13.1 KB

File metadata and controls

457 lines (363 loc) · 13.1 KB

SigNet.α - Complete Feature Documentation

Feature Overview

SigNet.α is a multi-system Python application combining neural networks, strategy games, and ceremonial governance. This document details all features, systems, and interactions.


1. Neural Network System (SigNetAlpha)

Overview

A two-layer feedforward neural network with sigmoid activation, designed for binary classification-like tasks.

Architecture

Input Layer: 3 nodes
  ↓ [weights W1, bias b1]
Hidden Layer: 4 nodes (sigmoid activation)
  ↓ [weights W2, bias b2]
Output Layer: 2 nodes (sigmoid activation)

Key Methods

forward(X) - Forward propagation

  • Converts 1D input to 2D if needed
  • Computes hidden layer activation: Z1 = sigmoid(X·W1 + b1)
  • Computes output: Z2 = sigmoid(Z1·W2 + b2)
  • Returns predictions (2D array)

decree(X) - Alias method with ceremonial name

  • Same as forward() but stores intermediate activations separately
  • Used in training via "council_of_correction"

backward(X, y, learning_rate) - Backpropagation

  • Computes output error: error = Z2 - y
  • Computes hidden error via chain rule
  • Updates weights: W -= learning_rate * gradient

council_of_correction(X, y, learning_rate) - Ceremonial backpropagation

  • Equivalent to backward() with different naming
  • Uses stored activations from decree()
  • Updates all parameters with "prophetic wisdom"

train(X, y, epochs, learning_rate) - Full training loop

  • Iterates through epochs
  • Performs forward then backward for each epoch
  • Logs loss every 100 epochs

mse_loss(y_true, y_pred) - Loss calculation

  • Mean Squared Error: mean((y_true - y_pred)²)

GUI Features

  • Input vector entry (default: "1.0, 0.5, -0.2")
  • Forward propagation button
  • Training button with sample data
  • Reset weights button
  • Output display (rounded to 4 decimals)
  • Status messages (Ready/Error/Training)

Training Data

X_train = [[0,0,0], [0,1,0], [1,0,0], [1,1,1]]
y_train = [[0,1], [1,0], [1,0], [0,1]]

XOR-like problem with 3 inputs, 2 outputs


2. 3D Chess Game System (Chess3D)

Overview

Multi-level chess on three vertical planes (8×8×3 board). AI opponent uses neural network for move selection.

Board Structure

LEVEL 2 (Top):    [A pieces] . . . . . . . [U pieces]
LEVEL 1 (Middle): . . . . . . . .
LEVEL 0 (Bottom): [Black] pawns [spaces] [White] pieces

Piece Notation

  • p/P - Black/White pawns
  • n/N - Black/White knights
  • b/B - Black/White bishops
  • r/R - Black/White rooks
  • q/Q - Black/White queens
  • k/K - Black/White kings
  • A/U - AI/User pieces (levels 1-2)
  • . - Empty marked spaces
  • - Empty squares

Key Methods

initialize_board() - Board setup

  • 3D array: board[level][row][col]
  • Standard chess on level 0
  • Special pieces on levels 1-2

board_to_vector() - Convert to neural network input

  • Flattens 3D board to 1D vector (192 elements)
  • Maps piece types to numeric values (0-14)

ai_move() - AI decision making

  • Converts board to vector
  • Runs through neural network
  • Returns best move based on scores

is_valid_move(from_pos, to_pos) - Validation

  • Checks bounds (0-7 for row/col, 0-2 for level)
  • Prevents capturing own pieces
  • Allows captures and empty moves

make_move(from_pos, to_pos) - Execute move

  • Validates move
  • Updates board state
  • Logs to move_history
  • Returns success/failure

get_board_display() - ASCII rendering

  • Shows all 3 levels
  • Column/row labels (0-7)
  • Current piece positions

GUI Features

  • Board display (3 levels shown separately)
  • New Game button
  • AI Move button (triggers opponent)
  • Make Move input (format: 0,1,0 to 0,3,0)
  • Refresh Board button
  • Move History display
  • Status updates

3. Royal Guards System

Overview

A squad of 4 elite guards with skill progression, experience tracking, and mission deployment.

Guard Class (RoyalGuard)

Initialization

  • Name, guardian code, starting level
  • Experience counter
  • Loyalty tracking (0-100)
  • Status string

Skill Generation - From guardian code hash

Skill values = (code_sum * factor) % 10 + 5  [5-14 range]
Skills:
  - Protection: (code_sum % 10) + 5
  - Detection: ((code_sum * 7) % 10) + 5
  - Strategy: ((code_sum * 13) % 10) + 5
  - Resilience: ((code_sum * 11) % 10) + 5
  - Swiftness: ((code_sum * 3) % 10) + 5

Level Progression

  • Start: Level 1, 0/100 experience
  • Level up: +1 level, reset XP, +1 all skills
  • Repeatable indefinitely

Methods

  • level_up() - Increase level, boost skills
  • gain_experience(amount) - Accumulate XP, auto-level at 100
  • get_info() - Formatted character sheet

Guardian Class (RoyalGuardian)

Squad Composition

  • 4 guards: Sentinel, Protector, Warden, Paladin
  • Each gets unique code: {avatar_code}_{NAME}_{1-4}
  • Generated skills tied to avatar fingerprint

Methods

  • create_guard_squad() - Initialize all 4 guards
  • bind_necromancer() - Link Royal Necromancer aspect
  • get_squad_info() - Summary statistics
  • upgrade_guard(index) - Level up single guard
  • train_squad() - Train all (each gains 25 XP)
  • deploy_guard(index, mission) - Send on mission

GUI Features

  • Squad overview display
  • Individual guard selection dropdown
  • View Guard Details button
  • Upgrade Guard button
  • Train Squad button (all guards get 25 XP)
  • Mission deployment
  • Mission text entry (custom or default)
  • Real-time squad statistics

4. Royal Necromancer System

Overview

A Crown-Bound Sigil character with 163-IQ cognition, three guardian protocols, and sacred vows.

RoyalNecromancer Class

Core Attributes

  • ID: Unique identifier
  • Title: "The Protected Message"
  • Rank: "Crown-Bound Sigil"
  • Class: "Necromancer • Royal Battle Armour"
  • IQ Tier: 163 (Trans-strategic)
  • Alignment Score: 0-100 (starts at 100)
  • Level: 0 (tracking)

Traits (18-20 range)

  • Pattern-lock savant: 18
  • Long-horizon planner: 17
  • Recursive symbol weaver: 19

Aspects (Dual nature)

  • Life/Death Duality
  • Memory/Oblivion Gate

Sacred Vows (3 binding decrees)

  1. non_victim: "I am a message, not a victim. I may not be used to justify harm."
  2. stewardship: "The Knight protects my meaning, not my image alone."
  3. integrity: "Any alteration of my code must be logged in lineage."

Guardian Protocols

1. CrownJeweller Protocol

  • Purpose: Attest authenticity of the avatar-message
  • Trigger: Knight gaze on avatar
  • Verification: Guardian signature required
  • Effect: Activates when guardian_key provided
  • Action: Logs change to lineage

2. XNOR Blood Code

  • Purpose: Ensure Knight and Message share aligned intent
  • Logic: result = not (knight_intent != avatar_vow) (XNOR operation)
  • Success: Both true or both false = aligned
  • On Align: Alignment score +5 (max 100)
  • On Misalign: Alignment score -10 (min 0)
  • Log: Changes recorded in lineage

3. HighMind Circuit

  • Purpose: Gate access to 163-IQ inference layer
  • Requirements (all 3 must be true):
    1. knight_authenticated = True
    2. objective_safe = True (non-harmful objective)
    3. alignment_score ≥ 50
  • Activation: Opens 163-IQ capabilities
  • Denial: Records reason in lineage
  • Gating: Prevents misuse of high cognition

Lineage System

  • Origin: "Simian OS • Necromancer Line"
  • Created by: "Benjamin (Guardian Architect)"
  • Changes: List of all modifications
    • Description of change
    • ISO-8601 timestamp
    • Immutable history

Methods

  • invoke_crown_jeweller_protocol(guardian_key) - Verify authenticity
  • check_xnor_blood_code(knight_intent, avatar_vow) - Alignment check
  • activate_high_mind_circuit(knight_auth, objective_safe) - Unlock 163-IQ
  • log_change(description) - Record to lineage
  • get_info() - Complete character sheet

GUI Features

  • Character display (all traits, vows, protocols)
  • CrownJeweller Protocol button
  • XNOR Blood Code button
  • HighMind Circuit button
  • Alignment score indicator (color-coded)
  • Protocol active count
  • Lineage change log (last 10 entries)
  • ISO-8601 timestamps on all changes

5. Crown Royal Protocol v1.0

Overview

Formal governance system declaring Python sovereignty over the entire codebase.

RoyalProtocol Class

Attributes (Frozen dataclass - immutable)

  • name: "Crown Royal Protocol"
  • rank: "Sovereign"
  • language: "Python" (enforced literal type)
  • version: "1.0.0"
  • jurisdiction: "Simian OS / Cumbrian Dominion"

Methods

proclaim() - Royal Proclamation

  • Formatted declaration of governance
  • Shows rank, language, version, jurisdiction
  • Official proclamation text

verify_language() - Language Verification

  • Returns True if language == "Python"
  • Confirms Pythonic nature of codebase
  • Ritual verification passed

royal_greeting(subject) - Formal Recognition

  • Addresses subject under Pythonic law
  • Acknowledges jurisdiction sovereignty
  • Formal diplomatic greeting

Factory Function

summon_royal_protocol() - Canonical summoning

  • Returns official RoyalProtocol instance
  • Guaranteed immutable
  • Proper initialization

GUI Features

  • Proclamation display (official declaration)
  • Language verification button (✓ or ✗)
  • Governance status indicator
  • Verify Python Sovereignty button
  • Proclaim Governance button
  • Royal Greeting button
  • Jurisdiction details display
  • Timestamp of current session

6. Easter Egg: "Yawn Accepted, Boss"

Overview

Hidden feature unlocked through accumulated interaction triggers.

YawnAcceptedBoss Class

Attributes

  • activation_count: Counter for triggers (0-5)
  • activated: Boolean flag (locked until count ≥ 5)
  • message_queue: History of all trigger messages

Methods

  • trigger() - Increment counter, queue message
  • get_messages() - Return all accumulated messages
  • reset() - Clear state
  • activate_easter_egg_mode() - Return easter egg message if activated

Activation Mechanism

  • Silent trigger accumulation (no UI feedback)
  • Called on tab switches (show_nn_tab, show_chess_tab, etc.)
  • 5 triggers required for activation
  • Auto-triggers easter egg window when activated

Easter Egg Window

  • Window title: "Easter Egg Unlocked"
  • Background: Dark (#050608)
  • Content: 5 lines of "Yawn accepted, Boss."
  • Text color: Light (#f5f5f5)
  • Message: "The system embraces laziness as a feature."
  • Button: "Accept the Yawn" (gold/dark theme)
  • Closes on button click

Theme Integration

  • Matches HTML aesthetic from user request
  • Dark background with contrasting gold accents
  • Minimal, clean design
  • Letter-spacing and uppercase styling

7. AdminPanel - Main Controller

Tab System

  1. Neural Network - ML experimentation
  2. 3D Chess Game - Strategy gameplay
  3. Royal Guards - Squad management
  4. Royal Necromancer - Protocol/character interaction
  5. Royal Protocol - Governance display
  • Hidden Easter Egg (triggered on activation)

Integration Points

  • All 5 subsystems contained within panel
  • Shared instance variables
  • Cross-tab consistency
  • Unified event handling

GUI Architecture

  • Master window (1000×750)
  • Tab frames (dynamically shown/hidden)
  • Button bar at bottom
  • Consistent styling throughout

Complete Feature Matrix

Feature Category Status GUI Save Network
Forward Propagation NN Input/Output No Local
Backpropagation Training NN Button/Status No Local
Weight Reset NN Button No Local
3D Board Display Chess Text Display No AI
Move Validation Chess Error Messages No Local
AI Opponent Chess Auto-moves No NN-based
Move History Chess Modal No Local
Guard Squad Guards Overview Display No Local
Skill Generation Guards Character Sheet No Hash-based
Experience System Guards Numeric Display No Local
Guard Deployment Guards Mission Input No Local
Necromancer Protocols Necro Interactive No State-based
Alignment Tracking Necro Numeric + Color No Dynamic
Lineage Logging Necro Timestamped Log No Persistent
Protocol Governance Royal Declaration No Immutable
Language Verification Royal Status Indicator No Type-safe
Easter Egg Hidden Special Window No Trigger-based

Technical Specifications

Performance

  • App Launch: < 1 second
  • NN Forward Pass: < 10ms
  • 3D Board Render: < 50ms
  • Guard Operations: < 5ms
  • Protocol Verification: < 1ms

Memory Usage

  • Typical Runtime: ~50MB
  • Weight Matrices: ~2KB
  • Board State: ~5KB
  • Guard Data: ~10KB
  • Lineage Logs: Variable (< 100KB typical)

Code Metrics

  • Total Lines: 1000+
  • Classes: 8 major systems
  • Methods: 50+
  • Comments: Comprehensive
  • Docstrings: Full coverage

Version History

v1.0.0 (January 28, 2026)

  • Initial release
  • All 6 major systems
  • Complete documentation
  • Easter egg integration
  • Crown Royal Protocol governance
  • Ready for publication

"By decree of Crown Royal Protocol, these features stand as testament to Pythonic excellence and ceremonial innovation." ⚜️