diff --git a/QAG_Truth.ipynb b/QAG_Truth.ipynb index b1286ba..c60c7ba 100644 --- a/QAG_Truth.ipynb +++ b/QAG_Truth.ipynb @@ -35,7 +35,7 @@ }, "outputs": [], "source": [ - "importimport numpy as np\n", + "import numpy as np\n", "import matplotlib.pyplot as plt\n", "\n", "# ==========================================\n", @@ -92,6 +92,7 @@ "\n", " print(f\"--- QAG PROPULSION ({psychon_ug}µg Psychon) ---\")\n", " print(f\"Retrocausal Displacement: {d_retrocausal[-1]:.4f} units\")\n", + " return d_retrocausal[-1]\n", "\n", "def run_stress_test(psychon_ug=5400.0):\n", " steps = 500\n", @@ -186,10 +187,28 @@ " print(f\"Recycling (R_qag): {r_qag*100:.2f}%\")\n", "\n", "# ==========================================\n", + "# 7. UNIT TESTS\n", + "# ==========================================\n", + "def test_thrust_consistency():\n", + " print(\"--- RUNNING QAG THRUST CONSISTENCY TEST ---\")\n", + " d1 = run_thrust_simulation(5400.0)\n", + " d2 = run_thrust_simulation(10800.0)\n", + " \n", + " # Verify that doubling psychon increases displacement (it scales linearly with qid_scale)\n", + " assert d2 > d1, \"Displacement should increase with psychon count\"\n", + " \n", + " # Fixed point check for 5400.0 psychon_ug\n", + " # Formula derived expected value: ~7713.34\n", + " assert abs(d1 - 7713.3436) < 0.01, f\"Expected ~7713.34, got {d1:.2f}\"\n", + " \n", + " print(\"TEST PASSED: Thrust displacement consistency verified.\")\n", + "\n", + "# ==========================================\n", "# EXECUTION BLOCK (Run them all!)\n", "# ==========================================\n", "if __name__ == \"__main__\":\n", " print(\"\\n--- INITIALIZING QAG MASTER SIMULCAST ---\\n\")\n", + " test_thrust_consistency()\n", " run_galactic_theater(1.0)\n", " run_thrust_simulation(5400.0)\n", " run_stress_test(5400.0)\n",