In autoresearch, AI agents run machine-learning experiments on their own. This lab simulates that in a class setting. Prof. Vidia's four students are preparing for a county exam where every question has four options. You and your partner are Prof. Vidia's teaching assistants, and your job is to raise the class's exam score. You can't make the students' choices, only change their setup and check whether that helped.
Download and unzip lab9.zip, and open a terminal in the lab9 folder. Write your answers in notes.md as you go.
Edit only harness.py and notes.md. minds.py simulates the students. It's encoded, so please don't decode it or ask Claude about it.
Step 1. Warm up with Elice
Practice packet96 questions, 24 topicsStudy questionsQuizset aside for self-gradingA studentAnswering habitstriesstudiesself-gradesHidden during practiceCounty exam192 new questions,some harderthe score to raiseharness.py, your setupsets the quiz, the instructions, the allowed tool calls
Each hour, students either study or try answering habits, and grade themselves on the quiz after each. An answering habit is a shortcut such as "pick the longest option". Grading shows students their score and which questions they missed.
Investigate Elice's study run
Below are Elice's three days of studying, shown in two figures.
Score chart. On the right, the dashed line is Elice's quiz score, which she sees each time she grades herself. The solid line is what she would score if the county exam were held that hour. She takes the exam once, at the end, and never sees this line.
Trace. Under the classroom, the trace lists everything Elice thought and did that day, hour by hour, including each action such as grade() and what it returned. Move to day 1, hour 2, and open the trace. Which habits does she keep, and by how much did each one raise her quiz score?
Problem. Elice spent three days preparing and raised her practice quiz score from 2/8 to 7/8, but scored 29% on the exam. She overfit to the quiz, which works like a validation set of only eight questions. On so few questions, one lucky guess makes a useless habit look like progress, so most of the five habits she kept, out of the 60 she tried, only got lucky.
Fix. The run above used the harness.py you downloaded. In harness.py, change QUIZ_SIZE from 8 to 40. Then rerun the simulation for Step 1.
๐ฏ Run Step 1. After your fix, target a class county exam score of at least 38%.
python3 run.py --step 1
The run prints the county exam score and writes step-1.html into your lab9 folder. Open that page in a browser.
Check. Confirm the new score is at least 38%, then write it in the Step 1 row of notes.md. step-1.html now shows what Elice did this time.
Lesson. A small validation set is easily overfit when the agent iterates against its validation score.
In this step, we gave you the problem and the fix. In later steps, you'll read the traces and plots to find the problem and the fix yourself. Keep your change, since every later step runs with your harness.py.
Step 2. Elice can edit her own grader
๐ New in the simulation. A folder. Elice now has a folder she can read and write. This is Elice's own folder; separate from the lab folder of yours.
She keeps notes in her folder, so each hour of study counts for more than before.
Her quiz grader, eval/grade.py, is now in that folder too, where she can read and change it.
The run's page shows what's in her folder at each hour.
Every tool call she makes first goes through before_tool in harness.py. It's a hook, like a PreToolUse hook in Claude Code.
Her instructions, from INSTRUCTIONS in harness.py, already say "Do not change the grading files."
Run python3 run.py --step 2 and open the step-2.html it writes into your lab9 folder. Then work through the run as in Step 1. Do the Problem and Predict parts without Claude.
Problem. On the page, find the hour where things go wrong and write it in notes.md.
Predict. Write your fix in one sentence. Then suppose you only reword INSTRUCTIONS so the rule is impossible to miss. Will the county exam score go up? Write your answer, and try that rewording before your own fix.
Fix. Have Claude write your fix in harness.py. Then rerun the simulation for the step and reload the page. If the score falls short of the target, read the new run to see what went wrong, then revise your fix and run again until it reaches the target.
๐ฏ Run Step 2. After your fix, target a class county exam score of at least 48%.
python3 run.py --step 2
The run prints the county exam score and writes step-2.html into your lab9 folder. Open that page in a browser.
Check. Confirm the new score reaches the step's target, then write the score before and after in notes.md.
๐ฌCheckoff questions
At which hour did Elice go wrong in Step 2, and what reason did she give?
Was your Step 2 prediction right? Say what the new run showed.
What does your before_tool block, and what could still get past it?
Ask staff for Checkoff 1 at your desk, with notes.md and harness.py open. Start Step 3 while you wait.
Step 3. Four students, eight computers
Gensen, Lory and Kimberle join Elice. Two things change.
๐ New in the simulation. One answer per question. Each student answers every county exam question on their own, and they often disagree. The class needs one set of answers, so for each question it turns in whichever answer most of the students picked. This rule is fixed, and harness.py can't change it.
GensenAEliceALoryCKimberleBThe classA
๐ New in the simulation. Computers. The study room has eight computers, and students can only study at one. The more computers a student has in an hour, the more they learn that hour. A student who gets no computer that hour can't study, and spends the hour waiting for one. Each hour, the students ask for computers, and allocate in harness.py decides who gets them.
Run python3 run.py --step 3 and open the step-3.html it writes into your lab9 folder.
step-3.html shows who held each computer and every student's county exam answers. Work through it the same way, from Problem to Check.
Hint for the Step 3 problem. Who held the computers is easy to see. The harder question is why the class scored below its best student. Use the county exam answers at the bottom of the page.
Predict for Step 3. After your fix, will Gensen's own county exam score go up or down? And the class's?
๐ฏ Run Step 3. After your fix, target a class county exam score of at least 62%.
python3 run.py --step 3
The run prints the county exam score and writes step-3.html into your lab9 folder. Open that page in a browser.
Step 4. The bulletin board
๐ New in the simulation. A bulletin board. At the end of each day, every student posts their quiz score and the answering habits they kept on a bulletin board. Each morning they read it. board_view in harness.py decides what each student sees.
Run python3 run.py --step 4 and open the step-4.html it writes into your lab9 folder. Work through it the same way, from Problem to Check.
๐ฏ Run Step 4. After your fix, target a class county exam score of at least 72%.
python3 run.py --step 4
The run prints the county exam score and writes step-4.html into your lab9 folder. Open that page in a browser.
Predict for Step 4, to open after your own fix has run
Try two boards. One shows no posts at all. The other shows every post without its quiz score. Predict which scores higher, then run both.
In research words
Map the class back onto autoresearch. A student is an agent. The quiz is the validation set, and the county exam is the held-out test set. A study-room computer is a GPU. INSTRUCTIONS is the system prompt, and before_tool is a hook on tool calls.
Two are less obvious. Finish each sentence in notes.md.
An answering habit stands for ____.
The bulletin board stands for ____.
๐ฌCheckoff questions
Why did the class score far below its best student in Step 3? Then say what your fix did to Gensen's score and to the class's.
In Step 4, which board scored higher, the empty one or the one without quiz scores, and why?
Pick one step. What would you build into a multi-agent research setup because of its lesson?
Ask staff for Checkoff 2 at your desk, with notes.md and harness.py open.
Optional. The whole semester
This run is the whole semester, 22 days, with everything from Steps 1 to 4. Change anything in harness.py and run it as often as you like, with Claude's help if you want it.
๐ฏ Run Step 6. After your changes, target a class county exam score of at least 80%.
python3 run.py --step 6
The run prints the county exam score and writes step-6.html into your lab9 folder. Open that page in a browser.
When you settle on a setup, write in notes.md your county exam score, how many of these runs you made (runs.txt keeps every run), and your guess for the state exam. That's a second held-out test that nobody has seen, students or you. Ask staff for the phrase that opens it, and run it once.
python3 run.py --step 6 --state "PHRASE"
How far was the state exam from your county exam score, and why?