What it does
An MLP passes a fixed-length vector through a few dense layers, with an activation such as ReLU or tanh after each hidden layer. Each hidden unit computes one weighted sum and switches on in part of the input space; the next layer combines those pieces. With one hidden layer it can already separate cases that no single straight line can, such as XOR. MLPs are small enough to draw in full, which makes them the best place to see how individual weights change behavior.
Formula
h = ReLU(W1 x + b1)y = W2 h + b2decision = argmaxk ykShapes and parameters
- Shapes
- A feature vector [N, I] in, hidden activations [N, H], scores or values [N, K] out.
- Parameters
- Sum over layers of inputs × outputs + outputs. The ticket router 4 → 8 → 3 has 4 × 8 + 8 + 8 × 3 + 3 = 67 parameters.
- Used for
- Tabular prediction (fuel economy, sensor forecasts), small classifiers, game NPC brains, reinforcement-learning policies, and the feed-forward half of every transformer block.
In WeightSpace
The game NPC brains are MLPs, and every weight in them can be edited: Signal Run guards (3 → 3 → 3), Fox navigation (4 → 5 → 2), the Hide-and-seek seeker (3 → 4 → 3) and the ticket router (4 → 8 → 3). Catalog MLPs such as fuel economy and sensor anomaly detection expose their output bias within ±8.
Models built as a Multilayer perceptron
- Push a puck onto a targetWeightSpace Puck Policy794 params
- Spot unusual sensor readingsWeightSpace NAB Predictor745 params
- Estimate a vintage car’s fuel economyAuto MPG MLP257 params
- Drive a car out of a valleyStable Baselines3 DQN67K params
- Swing a two-link robot upwardStable Baselines3 PPO4.8K params
- Balance a pole on a moving cartStable Baselines3 PPO4.6K params
- Balance a swinging pendulumDI-engine Pendulum DDPG4.5K params
- Forecast a time seriesGranite TinyTimeMixer R2805K params
- Land a rocket on the moonDI-engine LunarLander DQN46K params
- Signal Run guardWeightSpace guard policy24 params
- Fox navigationWeightSpace navigation policy37 params
- Hide and seek seekerWeightSpace seeker policy31 params
- Support ticket routerWeightSpace ticket router67 params
- Home occupancyWeightSpace occupancy model29 params
- Gas turbine monitorWeightSpace health monitor146 params
- Yard truck policyWeightSpace drive policy58 params