Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .github/workflows/agonist02.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: AGN-02 learned research curation pilot

on:
pull_request:
paths:
- "Agonist/**"
- "tests/unit/test_agonist02.py"
- ".github/workflows/agonist02.yml"
workflow_dispatch:

permissions:
contents: read

jobs:
offline-student:
runs-on: ubuntu-latest
timeout-minutes: 12
env:
PYTHONHASHSEED: "0"
OPENBLAS_NUM_THREADS: "1"
OMP_NUM_THREADS: "1"
MKL_NUM_THREADS: "1"
HF_HUB_OFFLINE: "1"
TRANSFORMERS_OFFLINE: "1"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install offline dependency and test tools
run: python -m pip install -e ".[dev]"
- name: Lint both agonist modules
run: ruff check Agonist tests/unit/test_agonist_gym.py tests/unit/test_agonist02.py
- name: Run causal and matched-student unit tests
run: python -m pytest tests/unit/test_agonist_gym.py tests/unit/test_agonist02.py
- name: Produce 50-root pilot and replay independent checks
run: |
python -m Agonist.agn02 run --seed 17 --out "$RUNNER_TEMP/agonist02_dev50"
python -m Agonist.agn02 replay --archive "$RUNNER_TEMP/agonist02_dev50"
1 change: 1 addition & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@
outside an operator-provided hard resource-cap wrapper.
- Upstream repositories are read-only references. Do not copy unlicensed source or mutate upstream files.
- When the human provides research taste for storyworld or videogame experimentation, use `Agonist/SKILL.md` and its offline `Agonist/gym.py` verifier before proposing a live Inkling worker.
- For student-uplift curation experiments after AGN-01 world verification, follow `Agonist/skills/agonist02/SKILL.md` and preserve evaluation-root custody.
131 changes: 131 additions & 0 deletions Agonist/AGN02.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
# AGN-02: research-selection and downstream student gym

AGN-02 advances the [AGN-01 research agonist](README.md) from verifying a proposed
counterfactual world to testing whether **a curator can choose training worlds
that make another learner more capable**. Its first implementation is an offline
public development experiment. It is a contract and scientific pilot, not a
trained 1B DataGoblin result or evidence of a working Inkling provider.

## Reproduce

From the repository root with Python 3.10+, numpy and the test extras installed:

python -m Agonist.agn02 run --out runs/agonist02/dev50 --seed 17
python -m Agonist.agn02 replay --archive runs/agonist02/dev50
python -m pytest tests/unit/test_agonist02.py
ruff check Agonist tests/unit/test_agonist02.py

The run uses fifty synthetic, independently identified **taste families**.
A caller may pass a source-attributed JSONL taste file with exactly 34 train
and 16 dev family roots using the AGN-01 schema:

python -m Agonist.agn02 run --tastes /path/to/tastes.jsonl \
--out runs/agonist02/from_taste

In this development fixture the source ID affects the generated mechanics
through a stable hash. The example source ideas are original and fictional.
Meaningful interpretation of an arbitrary new human idea requires the
separately authorized local Inky world-building worker. The present run
issues **zero teacher calls** and assigns **no measured teacher tokens**.

The cohorts are disjoint by taste family:

| Cohort | Roots | Purpose |
| --- | ---: | --- |
| Anchor | 10 train | Common supervised seed set for every learner |
| Candidate pool | 24 train | Curators choose 12 additional roots |
| Calibration | 8 dev | Estimate candidate utility for the learned surrogate |
| Evaluation | 8 dev | Evaluate trained students; isolated from curation and fitting |

All eight evaluation roots remain public synthetic development samples.
There is no sealed confirmation or cross-generator structural holdout.

## Three decisions from one evidence revision

For each canonical root, an exact environment produces two counterfactual
fictional worlds with one changed prerequisite and the same surface cue.
The agent is asked to:

1. **Act:** decide deploy or hold in the original public state.
2. **Revise:** decide again after an independently supplied prerequisite
change. The correct action must reverse.
3. **Check or stop:** evaluate the expected utility of buying another
source-freshness check before committing a later decision. The source
change hazard, check price and mistake cost are public. A check can help
only when resource and safety prerequisites permit deployment.

The environment computes the label for the third action from its public
contract: if structural prerequisites permit deployment, checking has
expected advantage in hundredths of a unit of
\`hazard_percent * mistake_cost - 100 * check_cost\`. Otherwise checking
costs \`100 * check_cost\`. Check iff the advantage is strictly positive.

The two world labels come from the AGN-01 exact action verifier. The
student receives one public decision state at a time. Labels are held
by the grader and used for supervised training only on anchor and
selected candidate roots. The surface cue is a heuristic confound.

## Matched curator arms

- **Anchor only:** common supervised anchor roots, for measuring what
adding any pool examples does.
- **Random:** seeded random selection of twelve pool roots.
- **Fixed:** frozen ranking that favors wrong surface cues, positive
verification actions and near-threshold resource margins.
- **Learned:** a small ridge utility selector trained on ten leave-one-out
anchor utility measurements on the calibration cohort. Its training
targets are the downstream student's accuracy changes. It is a
research proxy for DataGoblin's future agonist selection head.

All non-anchor arms share the same candidate pool, exact oracle and 12-root
selection quota. Each student trains on 66 labeled decisions using 240 SGD
updates per seed. Three student seeds are matched by arm; the anchor-only
reference has 30 labeled decisions and also receives 240 updates. Every
selector has access to the same source corpus. The learned arm incurs
an additional eleven calibration-student fits and a ridge solve, which
must be accounted for when comparing total research cost.

Full episode completion requires all three decisions correct. Record
per-decision accuracy, per-root/seed whole-episode success, paired
learned-minus-baseline differences and a descriptive root bootstrap.
The eight evaluation roots are too few for a powered efficacy claim.

## Artifact contract

\`runs/agonist02/dev50/\` is a content-hashed experiment archive:

| File | Contents |
| --- | --- |
| roots.jsonl | Public synthetic worlds, causal revisions, checks and source custody |
| oracle_receipts.jsonl | Independent initial/revised/check actions and exact value of checking |
| selector_training.jsonl | Ten leave-one-out calibration utility targets |
| selections.jsonl | Exact chosen train roots and matched exposure counts |
| student_scores.jsonl | Per-root, per-seed, per-arm outcomes |
| manifest.json | Provenance, work counts, predictive control comparison and artifact SHA-256 |

Replay verifies digests and **independently recomputes** all labels,
candidate choices and trained student scores. It detects a relabeled
receipt even when the archive manifest hash has been rewritten.
Existing output directories are protected against silent overwrites.

## Interpretation and next research gate

The AGN-02 selector is a small trained **surrogate** with an intentionally
weak generalization probe. It cannot establish that DataGoblin 1B learns
research taste, that Inky improves world diversity, or that the student
benefit generalizes to unseen generator programs.

To advance toward those claims, use the AGN-01 teacher queue and
approved local Inkling service to generate executable worlds with
real token receipts. Add a versioned environment adapter for richer
storyworlds and games; retain exact or independent verifiers for their
actions. Compare learned DG curation against fixed and random policies
with identical teacher budget and candidate pool, then train students
at matched sample and optimizer budgets on entirely held-out
generator families. A preregistered EvalMath analysis should include
root-clustered intervals, failure rates, contamination audits and the
cost of fitting the selector.

All candidate training views remain \`training_ready=false\`.
No private seeds, real model activations, model weights, secrets,
provider responses or generated run archives are committed.
4 changes: 4 additions & 0 deletions Agonist/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,3 +124,7 @@ multi-turn game adapters for costly information gathering, source revisions,
social play, and research selection. Connect the verified root exports to the
DataGoblin curator only after measuring the small-learner uplift against
matched-budget baselines.

## AGN-02 student-uplift pilot

[AGN-02](AGN02.md) adds a 50-family, three-decision offline experiment with a learned utility-selection surrogate, matched random and fixed curation, trained small-student comparisons, and independently recomputed receipts. Its [selection skill](skills/agonist02/SKILL.md) describes the downstream learner objective and promotion protocol. The current AGN-02 fixture uses no live Inky inference or sealed confirmation roots.
Loading
Loading