This repo is a small autoresearch-style environment for searching for a single compact formula that predicts both gravity-side and quantum-side behavior in a fixed weak-field simulator.
The current oracle world is:
- two masses
- each mass in a two-position spatial superposition
- weak-field gravity in SI units
- Gaussian wavepacket smearing of the gravitational interaction
- branch-dependent quantum phase accumulation from the interaction energy
- two-qubit recombination probabilities after local Hadamards
- finite coherence-length washout at readout
The point is not to claim a true theory of quantum gravity right away. The point is to build an honest search loop for a shared effective formula inside a controlled oracle world.
The project has now reached an important first milestone:
- the search no longer uses a power-law correction soup
- it searches directly over a dimensionless transition function
g(r/sigma) - and it recovers the oracle truth
erf((r/sigma)/2)as the best shared law
- simulation.py: fixed oracle for the weak-field physics model
- train.py: local experiment runner that scores candidate unified formulas
- program.md: instructions for the outer
autoresearch-style LLM loop - REQUIREMENTS.md: design requirements and research framing
- tests/test_simulation.py: oracle contract tests
- tests/test_train.py: experiment contract tests
There are two different layers here.
This runs entirely on your machine:
simulation.pygenerates the fixed oracle outputstrain.pysearches over candidate formulas and prints a scalar score- tests check that the contract still holds
No API key is required for this part.
This is the real autoresearch part:
- an LLM reads the repo instructions
- edits
train.py - runs the tests
- runs
train.py - compares the new score to the old score
- keeps or discards the change
- repeats
This part does require LLM access if you want it to run unattended.
That LLM access can come from:
- a live Codex session like this one
- another coding agent
- an API-backed agent runner
So the short rule is:
- local scoring and testing: no API key
- autonomous LLM researcher: yes, some LLM access is needed
Each mass has two possible positions:
|L>|R>
The branch basis is:
|LL>|LR>|RL>|RR>
For branch ab, the oracle starts from a branch-dependent interaction energy:
U_ab = -G m1 m2 erf(r_ab / (2 sigma)) / r_ab
This is the Newtonian interaction averaged over two equal-width Gaussian mass packets separated by r_ab.
The corresponding branch phase is:
phi_ab = -U_ab t / hbar
The oracle then derives:
- gravity outputs such as branch forces, mean potential, and force spread
- quantum outputs such as recombined probabilities, concurrence, and visibility
The current oracle is more scientific than the original toy. It now includes:
- physical SI constants
- Gaussian spatial smearing instead of hand-built
r_effcorrections - exact diagonal branch evolution in the four-branch basis
- a coherence-length overlap factor for readout visibility
- explicit held-out validation regimes for generalization
The current search in train.py is organized around the physically meaningful form:
V(r) = -G*mu*g(r/sigma)/r
The question is not "which sum of correction terms best fits the data?"
The question is:
- what is the simplest transition function
g(x) - that connects the short-distance smeared regime to the large-distance Newtonian regime
- while predicting both gravity and quantum observables
The current baseline search in train.py fits on the train regime and validates on three held-out regimes:
heldout_compactheldout_decoherentheldout_wide
With a 5-second smoke-test budget, the recovered shared law is:
V(r) = -G*mu*erf((r/sigma)/2)/r
with output like:
unified_score: 0.000010
val_bpb: 0.000010
gravity_error: 0.000000
quantum_error: 0.000000
The tiny remaining score is just the asymptotic limit penalty, not a miss on the oracle outputs.
The parameterized uniqueness sweep now also shows that the oracle strongly prefers the Gaussian-smearing answer:
erf(a x)recoversa = 0.5- rational, stretched-exponential, and spline families score much worse
That means the current oracle is strong enough to distinguish the exact smearing law among the candidate families we tested.
Here val_bpb is only a compatibility alias for the autoresearch-style log format. It does not mean bits per byte in this repo.
The oracle now includes the full Donoghue correction structure:
V(r) = -G m1 m2 / r * erf(r/(2*sigma)) *
[1 + 3G(m1+m2)/(r c^2) + (41/(10*pi))*G*hbar/(r^2 c^3)]
Phase 2 used an amplified config (G=1, hbar=0.5, c=2) where these corrections are O(0.01-0.1) and recoverable. The search freezes erf((r/sigma)/2) as the known smearing law and fits residual correction coefficients via least-squares over a 5-term dimensionally-consistent basis (2 real + 3 spurious).
Result:
pn_classical = 3.000000 (exact)
quantum_eft = 1.305071 (matches 41/(10*pi))
spurious terms = 0
unified_score = 0.000000
Run it:
python3 train.py --mode eft --time-budget-seconds 5 --output-dir /tmp/gut-eftPhase 2 was not blind because the correction basis was hand-picked with knowledge of the oracle. Phase 3 removes that knowledge.
Implemented result:
- Enumerate all dimensionless monomials
G^a * hbar^b * c^d * M^e * r^f * sigma^gup to second order in the coupling. - Build a blind library of 29 candidate terms.
- Search all subsets up to size 3, which yields 4089 subsets.
- Recover the winning subset
{G*M/(r*c^2), G*hbar/(r^2*c^3)}with coefficients3.0and1.305.
Run it:
python3 train.py --mode blind --time-budget-seconds 5 --output-dir /tmp/gut-blindAfter Phase 3 identifies the winning subset, rank the full blind subset space and measure the gap to the runner-up.
Current result on the amplified oracle:
- Rank 1:
{G*M/(r*c^2), G*hbar/(r^2*c^3)}with score0.000000 - Rank 2:
{G*M/(r*c^2), G*M*sigma^3/(r^4*c^2), G*hbar*sigma/(r^3*c^3)}with score0.000396 - Runner-up margin:
0.000396
This means the oracle does select the Donoghue pair uniquely after canonicalizing away dead zero-coefficient terms, but the margin is moderate rather than enormous.
python3 -m unittest discover -s tests -vpython3 simulation.py --samples 4 --seed 0python3 train.py --mode smearing --time-budget-seconds 5 --output-dir /tmp/gutpython3 train.py --mode eft --time-budget-seconds 5 --output-dir /tmp/gut-eftpython3 train.py --mode blind --time-budget-seconds 5 --output-dir /tmp/gut-blindpython3 train.py --mode degeneracy --time-budget-seconds 5 --output-dir /tmp/gut-degeneracyAll modes print metrics and write a diagnostic SVG to the output directory.
If you want the true autoresearch pattern, use the repo like this:
- Make sure the repo is clean and committed.
- Initialize
results.tsvif it does not exist yet. - Give the agent program.md as the outer-loop policy.
- Keep simulation.py fixed.
- Let the agent modify only train.py.
- Require the agent to run the test suite before trusting an experiment.
- Require the agent to keep or discard each experiment based on
unified_score.
The baseline setup now mirrors upstream more closely:
- each run of train.py uses a fixed time budget
- inside that budget it performs repeated search rounds
- then the outer LLM loop decides how to modify
train.pyfor the next run
The default time budget is 300 seconds. You can override it for smoke tests with TIME_BUDGET_SECONDS.
Create a local results.tsv with this header:
commit val_bpb memory_gb status description
Use the columns as:
commit: short git hashval_bpb: unified scorememory_gb:0.0for nowstatus:keep,discard, orcrashdescription: short summary of the change
This repo does not yet prove a true theory of quantum gravity.
What it does provide is:
- a fixed weak-field BMV-style oracle
- a shared-formula scoring problem
- a testable local evaluator
- an outer-loop policy that an LLM can use to perform repeated research iterations
That is the correct starting point for an autoresearch-style search here.