TensorTonic: hands-on ML practice for LLMs and robotics
An ML coding gym with 1,300+ implement-from-scratch problems. This module shows what it offers and which parts to use for robotics, in what order.
1. Summary
TL;DR
TensorTonic is like LeetCode for machine learning. You implement algorithms from scratch in Python, NumPy, PyTorch, CUDA or Triton, run them against tests in the browser, and get interactive visuals of the maths. It has no robotics section, but its 3D geometry, computer vision, reinforcement learning, ML maths and inference/GPU content covers most of the learning half of modern robotics. The free tier is enough to start.
- Scale: 1,300+ problems, 50,000+ learners, 1M+ submissions (site figures).
- Formats:
- coding problems with tests
- study plans (structured problem sets)
- an ML maths course: 67 lessons in 7 modules
- paper re-implementations: Transformers, ResNet, U-Net, ViT, DDPM, LLaMA, DeepSeek-V3 and more
- guided projects
- "LLM internals" explainers: KV cache, RoPE, LoRA, PPO, GRPO, DPO, Flash Attention
- Study plans worth knowing:
- Build Micrograd (25 problems)
- Build AlphaGo: policy networks, MCTS (Monte Carlo tree search), self-play (18)
- Build an LLM (62)
- Cracking RL (30)
- Cracking CV (35)
- CUDA Kernels (35)
- Inference Engineering (30)
- Linear Algebra, Probability, Calculus and Optimization sets (25–30 each)
- Pricing:
- Free: 500+ problems, 35 CUDA exercises, 13 paper implementations
- Pro: $12/mo or $100/yr. Adds study roadmaps, quizzes and interview mocks.
- Plus: $20/mo or $168/yr. Adds LLM architectures and system design.
- Projects: Agentic Systems, LLM Engineering and Interpretability are live. Reinforcement Learning, Computer Vision, Multimodal and Time Series/Signals are marked "coming soon".
2. Why this matters for robotics
Track: LLM + Robotics. TensorTonic is a general ML platform. Its transformer, LLM-internals, inference and CUDA tracks serve the LLM side. Its geometry, vision and RL problems serve robotics (the path below). It won't teach you motors, kinematics or control.
Modern robotics stacks have two halves:
| Classical half | Learning half |
|---|---|
| Rigid-body geometry, kinematics, dynamics, control (PID, MPC), state estimation (Kalman filters), SLAM, motion planning | Perception (detection, segmentation), reinforcement learning, imitation learning, transformer-based robot policies (VLAs), on-device inference |
TensorTonic covers the shared maths and most of the learning half. Implementing things from scratch is the right habit for robotics. When a robot behaves strangely, you need to know what's inside the box.
3. Deep dive: a robotics practice track
A suggested order through TensorTonic content, picked for robotics. Problem names link to the site.
Stage A · Maths you'll use every day (2–3 weeks)
- ML Math: dot product & norms, matrix multiplication, orthogonality, least squares, SVD, eigenvalues
- Probability: Bayes, covariance matrices, Markov chains, Monte Carlo
- Calculus: Jacobians & Hessians. The Jacobian is the core object in robot kinematics.
- Problems: matrix transpose, finite-difference gradient checking
Stage B · 3D geometry & perception (2–3 weeks)
- Apply 4×4 homogeneous transform. See the worked example below.
- Classic image ops: Gaussian blur, Sobel edges, bilinear resize, image rotation
- Detection: IoU, non-max suppression, anchor generation, Hungarian matching (also used for multi-object tracking)
- Segmentation metrics: mIoU, Dice loss
- Study plan: Cracking CV (35 problems)
Stage C · Reinforcement learning (3–4 weeks)
- See the RL ladder below. Then do the Build AlphaGo study plan. MCTS and policy/value networks transfer directly to robot planning research.
Stage D · Transformers → robot foundation models (3–4 weeks)
- Papers: Transformers, ViT, U-Net, DDPM. ViT is the vision backbone in most VLAs. DDPM is the basis of diffusion policies, a leading approach for robot manipulation.
- Problems: patchify, ViT attention block, CLIP retrieval (vision-language grounding)
Stage E · Running models on the robot (ongoing)
- Inference Engineering (30), CUDA Kernels (35), and LLM internals on quantization and KV cache. Robots run on fixed power budgets (e.g. Jetson-class boards), so latency matters as much as accuracy. Module 04 shows a full distil-and-deploy example. See the cost/latency discussion in Module 01.
4. Deep dive: homogeneous transforms (worked example)
This is TensorTonic's most directly robotic problem, and the idea underpins everything from arm kinematics to camera calibration.
The problem: a robot has many coordinate frames: world, base, each joint, gripper, camera. A point seen by the camera must be expressed in the gripper's frame before the arm can reach it. Each frame-to-frame relation is a rotation R (3×3) plus a translation t (3×1).
The trick: append a 1 to every point, p = (x, y, z, 1). Then rotation and translation fit in a single 4×4 matrix:
T = | R t | p' = T · p
| 0 1 |
Why bother? Because chains of frames become plain matrix products. T_world←camera = T_world←base · T_base←gripper · T_gripper←camera. That chain is forward kinematics. Inverting is cheap too: T⁻¹ = [Rᵀ, −Rᵀt; 0, 1].
Interactive: a two-link arm as chained transforms (2D)
Each link is a rotation by its joint angle, then a translation along the link. The gripper's position is the product of both transforms applied to the origin.
NumPy solution sketch (try the problem first)
import numpy as np
def apply_transform(T, pts):
T, pts = np.asarray(T, float), np.asarray(pts, float)
one = pts.ndim == 1
P = np.atleast_2d(pts)
Ph = np.hstack([P, np.ones((len(P), 1))])
out = (T @ Ph.T).T[:, :3]
return out[0] if one else out
5. Deep dive: which ML maths matters for robots
TensorTonic's 67 maths lessons are written for ML. Here's how each robotics subsystem uses them:
| Maths topic (TensorTonic lesson) | Where a roboticist uses it |
|---|---|
| Matrix multiplication, orthogonality | Rotation matrices (orthogonal, det = 1), frame chains |
| Jacobian & Hessian | Velocity kinematics (joint speeds → gripper speed), singularities, inverse kinematics |
| Least squares, SVD | Calibration, point-cloud alignment (ICP / Kabsch uses SVD), pseudo-inverse IK |
| Eigenvalues, positive-definite matrices | Stability of controllers, covariance ellipses for uncertainty |
| Covariance, Bayes' theorem | Kalman filters and sensor fusion: combining IMU + wheel odometry + GPS |
| Markov chains, Monte Carlo | Particle filters (localization), MDPs in RL, sampling-based planners |
| Newton's method, Lagrange multipliers / KKT | Trajectory optimization and model-predictive control (MPC) with constraints |
| Type I vs II errors, hypothesis testing | Detector thresholds and safety stops (links to Module 01) |
| KL divergence, entropy | PPO's KL penalty, entropy bonus for exploration, active perception |
6. Deep dive: the RL ladder
TensorTonic has a clean progression of RL problems. Climb it in this order. Each rung builds the next:
- Foundations: discounted returns → Bellman expectation → Bellman optimality
- Planning with a known model: value iteration, policy iteration
- Learning from experience: Monte Carlo evaluation → TD(0) → SARSA / Q-learning
- Exploration: ε-greedy, UCB1, Thompson sampling
- Deep value methods: replay buffer, DQN with target net, Double DQN
- Policy gradients: REINFORCE → with baseline → A2C → GAE → PPO clipped objective
Why PPO is the target: PPO with GAE is the workhorse for training locomotion (quadrupeds, humanoids) in simulation before transferring to real hardware ("sim-to-real"). Robot arms use continuous actions, so DQN-style methods matter less there than policy gradients and actor-critic methods.
7. What it doesn't cover
Plan to fill these from other sources (future modules):
- Rotations beyond matrices: quaternions, axis-angle, SO(3)/SE(3) Lie groups
- Forward/inverse kinematics and dynamics of real manipulators (DH parameters, URDF)
- Control: PID, LQR, MPC
- State estimation: Kalman / extended Kalman / particle filters, SLAM
- Motion planning: A*, RRT, trajectory optimization
- Imitation learning and VLAs (behaviour cloning, diffusion policy, ACT, π0-style models)
- Tooling: ROS 2, simulators (MuJoCo, Isaac Sim), real hardware
8. Playbook
- Start free. Upgrade to Pro ($100/yr) only if you want the structured roadmaps and quizzes.
- Do ~3 problems a day: 1 maths, 1 geometry/CV, 1 RL. Consistency beats binges.
- Read the Theory tab before coding. Peek at the solution only after a real attempt.
- Connect GitHub (offered on the problems page) so solutions back up to a private repo. That becomes your own robotics-maths library.
- After each stage, port one solution to a mini robot sim (e.g. a 2-link arm in matplotlib or MuJoCo) to make it concrete.
9. Self-check
Why append a 1 to 3D points instead of storing R and t separately?
It turns "rotate then translate" into one matrix multiply. A chain of frames becomes a product of 4×4 matrices, which is forward kinematics.
How do you invert a homogeneous transform cheaply?
T⁻¹ = [Rᵀ, −Rᵀt; 0, 1]. Rotations are orthogonal, so the inverse is the transpose. No general matrix inversion needed.
Which TensorTonic CV problem doubles as a multi-object tracking building block?
Hungarian matching. Trackers use it to assign new detections to existing tracks, usually with IoU or distance as the cost.
Why climb to PPO + GAE rather than stopping at DQN for robotics?
Robot actions (joint torques and velocities) are continuous. DQN needs a discrete action set. PPO handles continuous actions and is stable enough for large-scale simulation training.
Which diffusion paper on TensorTonic is a stepping stone to diffusion policies?
DDPM. Diffusion policies apply the same denoising process to robot action sequences instead of images.
10. Glossary & further reading
| Term | Meaning |
|---|---|
| Homogeneous transform | 4×4 matrix combining rotation and translation between two coordinate frames |
| Forward kinematics | Computing gripper pose from joint angles by chaining transforms |
| Jacobian | Matrix mapping joint velocities to gripper velocity |
| MDP | Markov decision process: states, actions, transition probabilities, rewards |
| Bellman equation | Recursive definition of value: reward now + discounted value later |
| PPO | Proximal Policy Optimization: policy gradient with a clipped update for stability |
| GAE | Generalized Advantage Estimation: lower-variance advantage estimates for policy gradients |
| Sim-to-real | Training in simulation, then transferring the policy to a physical robot |
| VLA | Vision-Language-Action model: a transformer mapping camera images and instructions to robot actions |
| Diffusion policy | Robot policy that generates action sequences by iterative denoising |
- TensorTonic study plans · ML Math · Research papers · All problems
- Related: Module 05, which maps TensorTonic topics to the prerequisites for frontier architecture talks
- Related: Module 01: decision thresholds & calibration · Module 03: don't automate your own learning (why to attempt before peeking)