AnyLearn
All lessons

loops

4 free lessons tagged loops across Programming, AI. Each one is a short sequence of focused steps with narration and a five-question quiz at the end — take them in any order, no signup required.

Programming
beginner

Decisions and Loops: Making a Program Choose and Repeat

Teach a program to react and repeat: booleans and comparisons, if/elif/else chains where order is logic, while and for loops, range() and its excluded stop, break and continue, and the skill that matters most, tracing a loop by hand. Ends with a working number-guessing game.

10 steps·~15 min
AI
advanced

Loop engineering: verification, orchestration, and anti-patterns

Make loops trustworthy. Adversarial verification panels, sub-agent orchestration, loop-until-dry for unbounded discovery, loop-until-budget for paid depth, multi-modal sweeps with diverse prompts, eval-driven cap selection, and the five anti-patterns — silent caps, infinite plans, drift, premature termination, thrashing — that ship to prod more than they should.

9 steps·~14 min
AI
intermediate

Loop engineering in production: state, errors, and budgets

Once an agent loop runs past a few iterations the failure surface shifts: state bloats, tool calls fail in three distinct ways, retries multiply if you stack them wrong, and unbounded budgets rack up four-figure bills overnight. The state, errors, and budgets you need to make the loop survive contact with reality.

8 steps·~12 min
AI
beginner

Loop engineering basics: the agent control loop

How LLM agents actually run: the iterative prompt-action-observation loop, the ReAct shape, the smallest tool-calling loop in twelve lines, why you always stack three termination layers, what the model sees on iteration N, and when a single prompt is the better answer.

8 steps·~12 min

Related topics