Actor network forward pass (45 → 512 → 256 → 128 → 12)
What a forward pass through Asimov's documented actor shape computes, how activations flow through three ELU hidden layers to 12 outputs, and where the 189,324 parameters live.
What it demonstrates
What a forward pass through Asimov's documented actor shape computes, how activations flow through three ELU hidden layers to 12 outputs, and where the 189,324 parameters live.
How it works
A multilayer perceptron with layer sizes 45, 512, 256, 128, 12 is created in TypeScript with PyTorch's default nn.Linear initialisation (weights and biases uniform in ±1/√fan_in). The weights are random and never trained.
The input is either the illustrative live observation (optionally normalized by a running mean/std accumulated from the stream), a standard-normal vector, or zeros. Every frame the full forward pass runs: 189,324 multiply-adds and 896 ELU evaluations. The probe slider perturbs one input so you can see how far the output moves.
Adjustable parameters
- Input: live / N(0,1) / zeros
- Normalization on/off
- Probe element (0–44)
- Perturbation (−3 to 3)
- Weight seed
Known limitations
- The weights are random, so the outputs carry no meaning. A trained network has the same arithmetic but different numbers.
- Only the mean head is shown. A Gaussian policy also has a standard deviation parameter (initially 1.0 for Asimov).
- The output layer initialisation of the real policy is not documented.
Equations
Core update rule
for (let l = 0; l < L; l++) {
for (let o = 0; o < fanOut; o++) {
let z = b[l][o];
for (let i = 0; i < fanIn; i++) z += W[l][o * fanIn + i] * h[i];
next[o] = l === L - 1 ? z : elu(z); // linear output layer
}
h = next;
}Explained in Chapter 8: Locomotion Policy