Milestone 1 of 8
Define the investigation and configuration
State the generated data, candidate grid, score, outputs, seed, and checks, then reject invalid settings before data generation.
Before calculating values, make the question and every setting explicit. A small configuration makes a later replay possible.
Goal
Define the investigation, its generated inputs, candidate grid, score, output files, seed, and checks. Reject invalid settings before generating any data.
Inputs
Use plans/baseline.json as the supplied starting configuration. It provides
the source slope and intercept, noise bound, seed, ordered candidate slopes,
ordered candidate intercepts, and the input construction from -2.0 through
2.0 with nine points.
The configuration must make these facts explicit:
- how the nine input values are constructed;
- how the source line is generated;
- the inclusive or exclusive noise boundary;
- the random seed;
- the ordered candidate arrays; and
- the output and report locations.
Do not add a meaning such as “training” or “test” to the generated values.
Deliverables
Implement src/config.py with a loader and validator. Return one clear,
normalized configuration record or a validation result that identifies the
field and reason for rejection. Save the accepted configuration later as
output/experiment_config.json.
Record the investigation question and the supplied prediction and score
contracts in the first section of report.md. Keep the candidate order and
the input construction visible rather than hiding them in code.
Checks
Check a valid baseline, a negative noise bound, a non-finite setting, an empty candidate array, a candidate array with the wrong dimension, and a malformed seed or input count. Reject the complete configuration before creating output data when any field is invalid.
Check that candidate values are finite, one-dimensional, and non-empty; that the noise bound is finite and non-negative; that the input count is exactly nine; and that the input interval is exactly the supplied interval. Confirm that validation does not sort or mutate candidate arrays.
Workspace
Keep configuration code in src/config.py and the supplied starting plan in
plans/baseline.json. Do not generate output files in this milestone. Keep
src/data.py, src/line.py, and src/search.py available for the later
milestones rather than placing their work in the configuration module.
Hints
HintReject before generating
HintOrder is evidence
Review
Read the accepted configuration as if you needed to reproduce the investigation without opening the implementation. Can you identify the source line, noise boundary, seed, candidate order, and score from the record alone?
How to check your work
Checks compare the configuration schema and validation failures with the supplied fixture. The supplied fixture keeps the contract explicit; it does not broaden the accepted settings.