All learning pathsJAX learning path
Learn by interacting
Train a policy from actual environment interaction, verify its objective against an independent small-state reference, and compare multiple seeded agents on fixed held-out evaluation streams.
Who this path is for
Learners interested in sequential decisions who can already implement and evaluate a neural network.
Preparation
Shared foundations and basic ML
Your first useful artifact
A tested environment transition table and reproducible batched trajectories.
How to study
Test one environment transition before batching it. Reconstruct a trajectory by hand, then compare the policy gradient with the small-state enumeration reference. Train multiple agents with different seeds and freeze the evaluation policy and random streams. Use the policy project to separate an implementation bug, Monte Carlo variation and an algorithm that learns poorly. For review, draw one terminal and one cutoff transition, showing the bootstrap observation. Then present per-agent held-out returns across independently trained seeds; episode count alone does not quantify training robustness. Finish rl-05 by checking the value fit and deriving the GAE recursion by hand. The value/advantage exercise is separate from the actor training loop; do not describe it as a complete actor-critic benchmark.
Course phases and lessons
- Setup & first steps
Run and inspect saved programs in a CPU environment, then learn how to prepare and verify explicit, source-reviewed TPU targets. TPU jobs are optional and separate from the course’s CPU practice.
- Arrays & pure functions
Treat every axis as part of a contract. Work through normalization, broadcasting and immutable updates, then diagnose mistakes that still return plausible numbers.
- JAX transformations
Begin with a scalar function, then differentiate it, batch it and compile it. Compare each transformed result with a simple reference so you can explain what changed.
- State, randomness & control flow
Make randomness, parameters and loop state explicit. Learn how to repeat an experiment without accidentally reusing randomness or mutating a caller’s state.
- Math & optimization
Connect geometry and probability to the updates in a training loop. Begin with linear algebra, gradient checks and gradient descent, then investigate conditioning, curvature, likelihoods, regularization and optimizer behavior.
- Vectors, norms, and projections
- Linear algebra and loss intuition
- Least squares, rank, and conditioning
- The chain rule, Jacobians, and directions
- Gradient checking and numerical accuracy
- Curvature, Hessians, and learning rates
- Write gradient descent yourself
- Probability, likelihood, and stable losses
- Regularization and honest validation
- Minibatches, expectation, and gradient noise
- Optimize with Optax
- Adam, clipping, and learning-rate schedules
- Neural network training
Build the same ideas into small neural networks. Understand hidden layers, parameter state, stable objectives and evaluation before moving to a small image classifier.
- Reinforcement learning
Build a functional environment, collect randomized trajectories, train policy-gradient and clipped-policy agents, fit a tabular value baseline, and evaluate independent seeds.
Train and audit a policy from interaction
A guided project is available for this route.
Complete the staged project contracts and the changed-condition synthesis assessment with independent calculations, observed outputs, and failure diagnosis.
- Verified transitions, terminal masks and reconstructed return targets
- A policy-gradient comparison against independent state enumeration
- Learning curves and fixed held-out evaluation for several trained seeds, with failed trajectories explained
- A fitted tabular value table with independently checked masked error, and hand-calculated GAE across true terminal, collector-cutoff and reset boundaries
Read the portfolio project guide