pilot-1. State: complete. Tag: verified.
Summary: Pilot of Classic greedy TDD, Multi-start TDD and Held-out TDD at 2 iterations per loop. Its page leads with a dated superseded banner.
Kalah TDD study · Part 2 of 29 · Approach
The study question, the task, the runs and arms, their caps and where the study sits in the course.
Source runs full-1, tcp-1-list2, rep-1, rep-2, pilot-1, pilot-2, tcp-1, tcp-1-list and rep-2/rebuild at tdd-experiment c3dd988
Classic greedy TDD writes the smallest failing test and then the smallest change that passes it. Do TDD variants that plan the class structure first, change the step size, try several starts or change how the tests check the code lead an AI coding agent to a better Kalah solution?
Run ended 2026-10-16. Model Claude Opus 5.5 (claude-opus-5-5). Runs: full-1 survey, tcp-1-list2 list reliability, rep-1 planned contrasts, rep-2 planned contrasts. 11 survey methods. Claims carry a tag. Recomputed means redone from source data. Verified means checked against a primary source. Unchecked means written or judged by an agent and not checked.
The agent builds the course's Kalah assignment. The brief below is docs/SPEC.md at tdd-experiment c3dd988 verified.
Excerpt of the Assignment 2 brief ("Making Changes"), adapted for this experiment. The game rules and the output format are in README.md. Example specs are in examples/.
Implement Kalah so that it supports all four variants below, and keep the implementation alterable. The variant is chosen by the two boolean parameters of play().
A significant amount of the assessment is based on an automatic marking system. If you ignore any of the following restrictions, your submission will not be marked.
System.exit() under any circumstances.A test suite tests all variants together through this method:
/**
* Play a game of Kalah.
* @param io Where to get input from and direct output to
* @param clockwise If true, then sowing of seeds should be done in a clockwise direction,
* otherwise if false sowing should be in an anti-clockwise direction.
* @param sevenfive If true, then the game should have 7 houses per player, and start with 5 seeds in each house,
* otherwise if false then it should have 6 houses per player starting with 4 seeds per house.
*/
public void play(IO io, boolean clockwise, boolean sevenfive) {
....
}The Kalah.java stub runs the anti-clockwise 6-4 variant because of the parameters its main() passes to play(). To play another variant, change those values:
public static void main(String[] args) {
new Kalah().play(new MockIO(), false, false); // Change values of boolean parameters as needed
}So to change to the clockwise 6-4 variant, change the first parameter to true.
Your implementation must allow all 4 variants: 6 houses with 4 seeds both clockwise and anti-clockwise, and 7 houses with 5 seeds both clockwise and anti-clockwise. The specific variant being tested is given by how clockwise and sevenfive are set. The test cases are the same scenarios for each variant (4 sets of test cases). examples/EXAMPLES.md lists a sample of the test specifications.
The four variants that play() selects verified.
| clockwise | sevenfive | Houses per player | Seeds per house | Sowing |
|---|---|---|---|---|
false | false | 6 | 4 | anti-clockwise |
true | false | 6 | 4 | clockwise |
false | true | 7 | 5 | anti-clockwise |
true | true | 7 | 5 | clockwise |
The implementation must allow all combinations of these two change cases.
The game can be played with seeds sown in an anti-clockwise direction, the opposite of the clockwise sowing described in README.md.
The game can be played with 7 houses per player, each house starting with 5 seeds.
Every run goes through the same harness. Agents do the building, reviewing and rating. Harness scripts do the rest.
Figure 2.1
Next: Method stages (per clone).
Next: Blind review.
Loop: repeat per unit, back to Method stages.
Next: Measure agent.
Next: after.py.
Next: collect.sh.
Next: Three blind raters.
Next: render.py.
The step order follows the harness sources at tdd-experiment c3dd988 verified. One step has no source check. render.py draws the report again once the ratings land unchecked.
Next: Method stages (per clone).
Next: Blind review.
Loop: repeat per unit, back to Method stages.
Next: Measure agent.
Next: after.py.
Next: collect.sh.
Next: Three blind raters.
Next: render.py.
collect.sh runs collectOne for each clone and collectList for a list-only run. A step marked yes is skipped when fetchBack fails recomputed.
| Mode | Order | Step | Skipped on failed fetchBack |
|---|---|---|---|
collectOne | 1 | fetchBack | no |
collectOne | 2 | export | yes |
collectOne | 3 | logs | yes |
collectOne | 4 | grade | yes |
collectOne | 5 | measure | yes |
collectOne | 6 | survivors | yes |
collectOne | 7 | bench | yes |
collectOne | 8 | metrics | yes |
collectOne | 9 | diagram | yes |
collectOne | 10 | costs | no |
collectOne | 11 | curve | yes |
collectOne | 12 | apfd | yes |
collectOne | 13 | audit | no |
collectOne | 14 | adherence | yes |
collectOne | 15 | review | no |
collectOne | 16 | report | no |
collectList | 1 | fetchBack | no |
collectList | 2 | pin | yes |
collectList | 3 | export | yes |
collectList | 4 | list | yes |
collectList | 5 | costs | no |
collectList | 6 | audit | no |
collectList | 7 | orders | no |
An arm is a design or a test-list order. A run builds one or more arms under fixed caps.
Figure 2.2
Each mark's area grows with its build count. The ring marks the rep-2 replicates rebuilt at a later harness. Counts come from facts.json recomputed.
| Arm | pilot-1 | pilot-2 | full-1 | tcp-1 | rep-1 | rep-2 |
|---|---|---|---|---|---|---|
| Classic greedy TDD | 1 build | 1 build | 5 builds | 5 builds | ||
| Noun-verb map | 1 build | 5 builds | ||||
| Mapped-path TDD | 1 build | |||||
| Functions first, classes later | 1 build | 5 builds | ||||
| Transformation Priority Premise TDD | 1 build | |||||
| Coarse-to-fine TDD | 1 build | 5 builds | ||||
| Annealed refactoring | 1 build | |||||
| Multi-start TDD | 1 build | 1 build | 1 build | |||
| Most informative next test | 1 build | 1 build | 5 builds | |||
| Property-based TDD | 1 build | |||||
| Held-out TDD | 1 build | 1 build | 1 build | 5 builds, 5 rebuilt | ||
| Anchor Engineering | 5 builds | |||||
| Test-list order: random | 1 build | |||||
| Test-list order: coverage | 1 build | |||||
| Test-list order: cost | 1 build | |||||
| Test-list order: risk | 1 build | |||||
| Test-list order: usage | 1 build |
A build is one final clone of a method or arm. Start clones and rebuilds are not builds. Multi-start TDD runs each start in a clone of its own, up to the starts cap, so pilot-1 makes 3 builds in up to 6 clones recomputed, pilot-2 makes 3 builds in up to 6 clones recomputed and full-1 makes 11 builds in 14 clones verified. The runs make 62 builds, the counts in Figure 2.2, and 5 rebuilds recomputed. Figure 2.2 rings the rebuilt replicates.
Every run of the study recomputed. Every run used model opus at medium effort with caps of 15 cycles per call and 3 starts. Methods doc is the short sha256 of the methods doc each run was built under. The methods text quoted on the study pages is doc 12f026f6.
| Run | Kind | Builds | Arms | Waves | Iterations cap | Methods doc | Harness commit |
|---|---|---|---|---|---|---|---|
| pilot-1 | Pilot | 3 | 3 | one batch | 2 | 64606950 | not recorded |
| pilot-2 | Pilot | 3 | 3 | one batch | 2 | 64606950 | not recorded |
| full-1 | Survey | 11 | 11 | one batch | 15 | 64606950 | not recorded |
| tcp-1-list | Test list | 0 | 0 | none | 15 | 1f11dd37 | not recorded |
| tcp-1 | Test-list order | 5 | 5 | one batch | 15 | 1f11dd37 | not recorded |
| tcp-1-list2 | List reliability | 0 | 0 | none | 15 | 12f026f6 | not recorded |
| rep-1 | Planned contrasts | 20 | 4 | 2 waves of 10 | 15 | 12f026f6 | not recorded |
| rep-2 | Planned contrasts | 20 | 4 | 2 waves of 10 | 15 | 12f026f6 | 809589d |
| rep-2/rebuild | Rebuild | 5 rebuilds | 1 | 1 wave of 5 | 15 | 12f026f6 | cc8c8cb |
rep-1 and rep-2 test planned contrasts between arms. Both follow one protocol, and the build refuses to run if their shapes differ.
Figure 2.3
Next: Rotate launch order.
Next: Cut into waves.
Next: Build, review, measure.
Next: collect.sh.
Loop: repeat per wave, back to Cut into waves.
Next: Three blind raters.
Next: Exact Mann-Whitney U.
Next: Holm step-down.
Arm, replicate, wave and cap counts come from facts.json recomputed. The test and its correction follow contrast.py verified. Planned contrasts has the results.
Next: Rotate launch order.
Next: Cut into waves.
Next: Build, review, measure.
Next: collect.sh.
Loop: repeat per wave, back to Cut into waves.
Next: Three blind raters.
Next: Exact Mann-Whitney U.
Next: Holm step-down.
Both parts below come from the full-1 report that these study pages are built from. "This page" in them means that report.
Each run of the study and its state. Complete means its folder holds its comparison page. Listed means it holds the test list and orders of a list-only run. Pending means it holds its launch arguments in args.json and neither page.
pilot-1. State: complete. Tag: verified.
Summary: Pilot of Classic greedy TDD, Multi-start TDD and Held-out TDD at 2 iterations per loop. Its page leads with a dated superseded banner.
pilot-2. State: complete. Tag: verified.
Summary: Pilot of Multi-start TDD, Most informative next test and Held-out TDD at 2 iterations per loop. Its page leads with a dated superseded banner.
full-1. State: complete. Tag: verified.
Summary: This page. Eleven methods in 14 clones at up to 15 iterations per loop, 15 cycles per call and 3 starts.
tcp-1-list. State: listed. Tag: verified.
Summary: A lister agent wrote one test list of 12 candidate tests and the harness derived 7 orders of it.
tcp-1. State: complete. Tag: verified.
Summary: Five arms with one test-list order each for random, coverage, cost, risk and usage at seed 20261020.
tcp-1-list2. State: listed. Tag: verified.
Summary: A second blind lister rated the 19 clauses and 12 candidate tests of the tcp-1-list list to measure how far the ratings depend on the lister.
rep-1. State: complete. Tag: verified.
Summary: Two planned contrasts. Five replicates each of Functions first, classes later, Noun-verb map, Anchor Engineering and Classic greedy TDD in one batch of 20 builds, each rated blind for code quality.
rep-2. State: complete. Tag: verified.
Summary: Three planned contrasts. Five replicates each of Held-out TDD, Coarse-to-fine TDD, Most informative next test and Classic greedy TDD in one batch of 20 builds, each rated blind for code quality.
The COMPSCI 701 course items this study bears on.
Syllabus. Tag: verified.
Relevance: The course evaluates practices partly through research on their effectiveness. This study is a small empirical probe of TDD variants in that sense.
Lecture 11.2. Tag: verified.
Relevance: Calls TDD a development practice and a greedy algorithm for coding. It asks whether test order shapes the design and whether greedy design rules out good designs. Classic greedy TDD, its variants and the test-list order arms probe those questions.
Lecture 11.2 evidence. Tag: verified.
Relevance: Reports that TDD teams wrote smaller classes and methods with lower complexity and coupling and showed no clear cohesion trend. This page measures size but not complexity, coupling or cohesion.
Lecture 11.1. Tag: verified.
Relevance: Says design must be testable for TDD to work and defines testability as controllability and observability. No column of this page measures testability in that sense.
Lecture 2.1. Tag: verified.
Relevance: Splits maintainability into comprehensibility, alterability and testability. The rated cqp.html principles stand in for comprehensibility. Alterability is not measured here.
Lecture 2.3. Tag: verified.
Relevance: Defines a test case and a test criterion. The hidden, unseen and acceptance columns count passes of the course test suite. Mutation score adds a fault-based check alongside the course's coverage example.
Lecture 7.1. Tag: verified.
Relevance: Measures alterability as classes changed over classes in the design against the impact of a change case. This study carries out no change case, so it computes no such ratio and leaves alterability unmeasured.
Lecture 1.2. Tag: verified.
Relevance: Applies noun and verb analysis to the Kalah description. Noun-verb map extends it with project rules from an A02 attempt, so those added rules are not course content.
Lecture 5.1. Tag: verified.
Relevance: Says many small functions can aid comprehension and that refactoring in several steps may first go backwards. Functions first, classes later and Annealed refactoring probe those two points.
Lecture 4.1. Tag: verified.
Relevance: Stresses that metric thresholds give false positives and false negatives. Strict PMD compliance reports conformance to the course ruleset and alone does not show maintainability.
A02 rubric. Tag: verified.
Relevance: Functionality is 15 of 20 marks and maps to Functional mark /15. The 5 report marks are not scored here. The assignment judges alterability from a change actually made. This study builds all four variants at once and does not measure alterability.
A01 rubric. Tag: recomputed.
Relevance: Used the course PMD ruleset for maintainability marks and asks for at least 4 classes besides Kalah and enums. Seven of the 11 methods have 4 classes or fewer in total with Kalah included.