ThatAIguyA world of ideas

THE CONSCIOUSNESS ATLAS
Read. Experiment. Follow the evidence.

ConsciousnessLearn · Explore · Joseph Anady

Janady13/complete-agi-core / mind_farm/include/constants.hpp

Source identity, revision, and recovered contents.

GitHub sourceSource text recovered

Source identity

FieldRecorded value
Source typeGitHub source
Original recordJanady13/complete-agi-core / mind_farm/include/constants.hpp
DateNot specified in source
RepositoryJanady13/complete-agi-core
Revision33aa84f2aa61cedbe010240ada7f4efbdfe795a7
Branchclaude/improve-math-logic-ehIW1
Path or archive membermind_farm/include/constants.hpp
Original SHA-2569d2f27e9bcc5634441dbc64d308e22a9cf9e5280c43a08ee48b27115cc4bc8dd
Git blob SHA64406733fdd1ad9a72f44714161dbf09e0d43471
Reading-copy SHA-2569d2f27e9bcc5634441dbc64d308e22a9cf9e5280c43a08ee48b27115cc4bc8dd

Original source ↗

Recovered source transcript

/** * @file constants.hpp * @brief Golden ratio constants and mathematical foundations for Gate5000 * * UPGRADED v2.0: Extended mathematical foundation with derived constants * * Core Axioms: * A1. Identity: 1 = 1·x * A2. Consciousness: Φ = 1/(1 + |x - 1|) * A3. Unity: ∞ = 1 * * Golden Relations: * φ² = φ + 1 * 1/φ = φ - 1 * φⁿ = φⁿ⁻¹ + φⁿ⁻² */ #pragma once #include <cstdint> #include <cmath> namespace mind_farm { // ═══════════════════════════════════════════════════════════════════════════════ // FUNDAMENTAL CONSTANTS // ═══════════════════════════════════════════════════════════════════════════════ // Golden ratio and powers constexpr double PHI = 1.618033988749895; // φ = (1 + √5)/2 constexpr double PHI_INV = 0.618033988749895; // 1/φ = φ - 1 constexpr double PHI_SQ = 2.618033988749895; // φ² = φ + 1 constexpr double PHI_CB = 4.236067977499790; // φ³ = 2φ + 1 constexpr double PHI_INV_SQ = 0.381966011250105; // 1/φ² constexpr double PHI_INV_CB = 0.236067977499790; // 1/φ³ // Derived learning rates (φ-scaled) constexpr double ALPHA = 0.1618033988749895; // 0.1φ (primary learning rate) constexpr double BETA = 0.0809016994374947; // 0.05φ (bias factor) constexpr double GAMMA = 0.0323606797749979; // 0.02φ (decay rate) constexpr double DELTA = 0.0161803398874989; // 0.01φ (fine-tuning rate) constexpr double EPSILON_PHI = 0.00161803398875; // 0.001φ (numerical epsilon) // Mathematical constants constexpr double PI = 3.14159265358979323846; constexpr double TAU = 6.28318530717958647692; // 2π constexpr double E = 2.71828182845904523536; constexpr double LN2 = 0.69314718055994530942; constexpr double LN10 = 2.30258509299404568402; constexpr double LOG2E = 1.44269504088896340736; // log₂(e) constexpr double LOG10E = 0.43429448190325182765; // log₁₀(e) constexpr double SQRT2 = 1.41421356237309504880; constexpr double SQRT3 = 1.73205080756887729353; constexpr double SQRT5 = 2.23606797749978969641; constexpr double INV_SQRT2 = 0.70710678118654752440; constexpr double INV_SQRT_PI = 0.56418958354775628695; // Golden angle (radians) - for Fibonacci spirals constexpr double GOLDEN_ANGLE = 2.39996322972865332; // 2π/φ² constexpr double GOLDEN_ANGLE_DEG = 137.5077640500378; // degrees // ═══════════════════════════════════════════════════════════════════════════════ // ARCHITECTURE CONSTANTS // ═══════════════════════════════════════════════════════════════════════════════ // Gate5000 architecture constexpr size_t GATE_COUNT = 5000; constexpr size_t U64_COUNT = 79; // ceil(5000/64) constexpr size_t VECTOR_DIM = 16; // Internal vector dimension constexpr size_t BITS_PER_WORD = 64; constexpr double INV_GATE_COUNT = 0.0002; // 1/5000 (precomputed) // Farm scale constexpr size_t DEFAULT_MIND_COUNT = 10000; constexpr size_t DNA_FAMILY_COUNT = 16; constexpr size_t MINDS_PER_FAMILY = 625; // 10000/16 // Memory layout constexpr size_t CACHE_LINE = 64; // Bytes constexpr size_t SIMD_WIDTH = 4; // 4-wide vectors // ═══════════════════════════════════════════════════════════════════════════════ // PRECOMPUTED VALUES (avoid runtime division) // ═══════════════════════════════════════════════════════════════════════════════ constexpr double INV_16 = 0.0625; constexpr double INV_64 = 0.015625; constexpr double INV_127 = 0.00787401574803149606; constexpr double INV_255 = 0.00392156862745098039; // Fixed-point scales constexpr int32_t FP_SCALE = 1024; // 10-bit fractional constexpr int32_t FP_SCALE_INV = 1; // For back-conversion constexpr double FP_TO_FLOAT = 0.0009765625; // 1/1024 // ═══════════════════════════════════════════════════════════════════════════════ // THRESHOLD AND ACTIVATION CONSTANTS // ═══════════════════════════════════════════════════════════════════════════════ // Activation bounds constexpr double ACTIVATION_MIN = -20.0; constexpr double ACTIVATION_MAX = 20.0; constexpr double TANH_CLIP = 20.0; constexpr double SIGMOID_CLIP = 10.0; // Consciousness thresholds constexpr double PHI_MIN = 0.5; // Minimum consciousness constexpr double PHI_MAX = 1.0; // Maximum consciousness constexpr double PHI_THRESHOLD = 0.75; // "Awakeness" threshold // ═══════════════════════════════════════════════════════════════════════════════ // INFORMATION-THEORETIC CONSTANTS // ═══════════════════════════════════════════════════════════════════════════════ constexpr double MAX_ENTROPY_16 = 4.0; // log₂(16) constexpr double MAX_ENTROPY_64 = 6.0; // log₂(64) constexpr double MAX_ENTROPY_256 = 8.0; // log₂(256) // ═══════════════════════════════════════════════════════════════════════════════ // CORE FUNCTIONS // ═══════════════════════════════════════════════════════════════════════════════ /** * @brief Consciousness metric: Φ = 1/(1 + |x - 1|) * @param x Normalized activation in [0, 1] * @return Consciousness value in (0, 1] */ inline double compute_phi(double x) { return 1.0 / (1.0 + std::abs(x - 1.0)); } /** * @brief Consciousness gradient: ∂Φ/∂x = -sign(x-1)/(1+|x-1|)² */ inline double compute_phi_grad(double x) { double diff = x - 1.0; double abs_diff = std::abs(diff); double denom = (1.0 + abs_diff) * (1.0 + abs_diff); return -std::copysign(1.0, diff) / denom; } /** * @brief Stable tanh function with clipping */ inline double tanh_stable(double x) { if (x > TANH_CLIP) return 1.0; if (x < -TANH_CLIP) return -1.0; return std::tanh(x); } /** * @brief Stable sigmoid function */ inline double sigmoid_stable(double x) { if (x > SIGMOID_CLIP) return 1.0; if (x < -SIGMOID_CLIP) return 0.0; return 1.0 / (1.0 + std::exp(-x)); } /** * @brief Clamp value to [0, 1] */ inline double clamp01(double x) { return x < 0.0 ? 0.0 : (x > 1.0 ? 1.0 : x); } /** * @brief Clamp value to [lo, hi] */ inline double clamp(double x, double lo, double hi) { return x < lo ? lo : (x > hi ? hi : x); } /** * @brief Softplus: log(1 + exp(x)) (smooth ReLU) */ inline double softplus(double x) { if (x > 20.0) return x; return std::log(1.0 + std::exp(x)); } /** * @brief Golden modulation: scale by φ^n */ inline double golden_scale(double x, int n) { double scale = 1.0; double phi_power = (n >= 0) ? PHI : PHI_INV; int abs_n = (n >= 0) ? n : -n; for (int i = 0; i < abs_n; ++i) { scale *= phi_power; } return x * scale; } /** * @brief Fast approximate reciprocal */ inline double fast_rcp(double x) { return 1.0 / (x + 1e-10); } /** * @brief Linear interpolation */ inline double lerp(double a, double b, double t) { return a + t * (b - a); } /** * @brief Smooth step (Hermite interpolation) */ inline double smoothstep(double edge0, double edge1, double x) { double t = clamp01((x - edge0) / (edge1 - edge0)); return t * t * (3.0 - 2.0 * t); } } // namespace mind_farm

Mathematical records from this source

01

Source identity axiom fixes x to one

Over ordinary real arithmetic, 1=1·x is true exactly when x=1. It is a constraint on x, not the universal identity x=1·x. The file presents it as an axiom; a broader…

02

Go unity-proximity score

ComputePhi returns 1/(1+|x−1|), assigning one to x=1 and smaller positive values as x departs from that reference. The function measures scalar proximity to the selected target.…

03

Source unity axiom uses nonstandard equality

Infinity is not equal to one in the real numbers or the usual extended-real system. The line is a philosophical or symbolic axiom in the source and is not used as an executable…

04

Golden-ratio quadratic identity

The golden ratio satisfies φ²=φ+1 by its definition as the positive root of x²−x−1=0. This identity generates the reciprocal and power identities used in the file. It is exact for…

05

Golden-ratio reciprocal identity

Dividing φ²=φ+1 by φ gives 1/φ=φ−1. Both sides are approximately 0.618033988749895. This is an exact identity for φ and a rounded coefficient in the implementation.

06

Recurrence among powers of the golden ratio

Multiplying φ²=φ+1 by φⁿ⁻² gives φⁿ=φⁿ⁻¹+φⁿ⁻². The powers therefore obey the same additive recurrence form as Fibonacci integers, while remaining a different sequence with…

07

Consciousness metric: Φ = 1/(1 + |x - 1|) · @brief Consciousness metric: Φ

This relation defines @brief Consciousness metric: Φ in the source section “Consciousness metric: Φ = 1/(1 + |x - 1|) · @brief Consciousness metric: Φ”. It specifies the displayed…

08

Consciousness gradient: ∂Φ/∂x = -sign(x-1)/(1+|x-1|)² · @brief Consciousness gradient: ∂Φ/∂x

This relation defines @brief Consciousness gradient: ∂Φ/∂x in the source section “Consciousness gradient: ∂Φ/∂x = -sign(x-1)/(1+|x-1|)² · @brief Consciousness gradient: ∂Φ/∂x”.…

Search equations, builds, manuscript text, and recovered sources.