Now TDD can serve two purposes here:
- Tests allow the agent to verify that it's implementation matches the theory. By writing the test first, we give the agent a reward, which it can reach when its implementation is correct. This capitalizes on the agents reward-seeking behavior to drive higher-qaulity code over AI slop.
- TDD allows us to explore the model with the agent, by having the agent write the test and then checking that the test verifies the theory as we expect, modifying the test if not, and thus gaining fresh insights into our theory-building, perhaps even updating our theory, and sharing that with the model.