Kalah TDD study · Part 9 of 29 · Results

Results: test order (tcp-1)

One candidate test list built in five orders in run tcp-1.

Source runs tcp-1, tcp-1-list2 and tcp-1-list at tdd-experiment c3dd988

Contents

Test order

Run tcp-1 built one list of 12 candidate tests in 5 orders, once each. A second blind lister in run tcp-1-list2 agreed with the first on usage with rho 0.96 and on risk with weighted kappa 0.53. Tag: recomputed.

Figure 9.1 plots the APFD-I and APFDc-H values that Q20 reports for each order.

Figure 9.1

APFD-I and APFDc-H by test-list order

APFD-IAPFDc-HRandom APFD-I 0.6316Random APFDc-H 0.5111coveragecostriskusagecoverage: APFD-I 0.5515coverage: APFDc-H 0.4715cost: APFD-I 0.6634cost: APFDc-H 0.5716risk: APFD-I 0.5274risk: APFDc-H 0.4166usage: APFD-I 0.6129usage: APFDc-H 0.53090.40.50.60.7Hidden-pass curve area

Each order ran once, so the values are descriptive. Hollow marks are at or below random. Tag: recomputed, from Q20.

Text version: APFD-I and APFDc-H by test-list order
  1. coverage: APFD-I 0.5515
  2. coverage: APFDc-H 0.4715
  3. cost: APFD-I 0.6634
  4. cost: APFDc-H 0.5716
  5. risk: APFD-I 0.5274
  6. risk: APFDc-H 0.4166
  7. usage: APFD-I 0.6129
  8. usage: APFDc-H 0.5309

APFD-I and APFDc-H per order

Tag: recomputed, from Q20.

OrderAPFD-IAPFDc-H
random0.63160.5111
coverage0.55150.4715
cost0.66340.5716
risk0.52740.4166
usage0.61290.5309

Design of run tcp-1

The settings, list and orders of run tcp-1 as its run facts give them. Tag: verified.

Settings

SettingValue
Seed20261020
Listertcp-1-list-lister
List runtcp-1-list
List sha7788e4fd
Methods doc, tcp-11f11dd37
Methods doc, tcp-1-list1f11dd37
Methods doc, tcp-1-list212f026f6

List phase steps

The lister of run tcp-1-list followed these steps.

  1. Number each functional rule in README.md and docs/SPEC.md as a clause R1 to Rn in CLAUSES.md. Leave out code quality and PMD rules.
  2. Rate each clause 1 to 3 for the chance a first implementation gets it wrong. Rate its usage 1 to 100 as the percent of moves in a typical game that exercise it. Rate a clause of one variant as the percent of games that use the variant times the share of their moves that exercise it.
  3. List at most 12 candidate tests in TESTLIST.md. Each names one behaviour.
  4. Give each candidate two fields. checks lists every clause its assertions observe, variants included. relies lists clauses it needs and does not assert.
  5. Estimate the production lines each candidate needs on the starter alone.
  6. Commit both files and return them as JSON.

Clauses

ClauseRiskUsage
R1150
R2250
R313
R4295
R5348
R6348
R7350
R8165
R9120
R10210
R1123
R1223
R1333
R1423
R1513
R16250
R17250
R181100
R1913

Candidates

CandidateChecksReliesEstimate
T1R1, R3, R15, R17, R18none25
T2R2, R3, R15, R16, R18none25
T3R1, R4, R5, R8, R16, R18R3, R1540
T4R1, R4, R6, R8, R17, R18R3, R1540
T5R7, R9, R18R1, R4, R5, R16, R1545
T6R7, R8R1, R4, R6, R17, R18, R1550
T7R10, R8R1, R4, R5, R16, R18, R1555
T8R11, R8R1, R4, R5, R10, R16, R18, R1555
T9R19, R18R1, R4, R5, R16, R1545
T10R4, R7, R10R1, R6, R17, R18, R1555
T11R12, R13, R14R1, R4, R6, R8, R9, R10, R17, R1870
T12R12, R13, R14R1, R4, R5, R8, R9, R10, R16, R1870

Orders

OrderArmCandidates in order
untreatednot runT1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12
randomtcp-1-r01T7, T10, T6, T1, T2, T11, T8, T12, T5, T9, T3, T4
coveragetcp-1-r02T3, T1, T11, T10, T2, T8, T5, T9, T4, T12, T7, T6
costtcp-1-r03T1, T3, T5, T11, T2, T4, T9, T7, T8, T10, T12, T6
risktcp-1-r04T10, T11, T12, T6, T5, T3, T4, T7, T8, T2, T1, T9
usagetcp-1-r05T3, T4, T5, T2, T7, T11, T8, T9, T1, T10, T6, T12
costOnlynot runT1, T2, T3, T4, T5, T9, T6, T7, T10, T8, T11, T12

Arm steps

Every arm followed these steps.

  1. Read CLAUSES.md and TESTLIST.md. Change neither.
  2. Build candidates in the order the harness gives. Log a new candidate in ADDED.md with its checks and relies.
  3. Write one failing test for the first open candidate and watch it fail.
  4. Pass it with the smallest change. Refactor on green. Commit each green.

Figure 9.2

Stage flow of a tcp-1 arm

Stage flow of a tcp-1 arm2 stages: list rules throughout, then one loop per candidate.ThroughoutAgentSteps 1 and 2Steps 3 and 4Returns candidaterepeat per candidate
  1. Steps 1 and 2. Lane: Throughout.
  2. Steps 3 and 4. Returns candidate. Lane: Agent.

    Loop: repeat per candidate, back to Steps 3 and 4.

Every arm and tcp design lists these stages. Details are in the stage table. Tag: verified.

Text version: Stage flow of a tcp-1 arm
  1. Steps 1 and 2. Lane: Throughout.
  2. Steps 3 and 4. Returns candidate. Lane: Agent.

    Loop: repeat per candidate, back to Steps 3 and 4.

Stages

StageRuns asStepsDetailsNote
F1-2throughout:1 and 2nonenone
L3-4repeat per candidate until none is open:3 and 4unit candidate; returns candidateUNITS.md holds one line per TESTLIST.md candidate id plus one per added candidate. Reorder the open lines to the order in the facts from the harness, then work the first. Return its id in candidate and any new candidate in added.