Skip to content
Physical AI
All experiments

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.

Loading simulation…

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

h1=ELU(W1x+b1),  h2=ELU(W2h1+b2),  h3=ELU(W3h2+b3),  μ=W4h3+b4h_1 = \mathrm{ELU}(W_1 x + b_1),\; h_2 = \mathrm{ELU}(W_2 h_1 + b_2),\; h_3 = \mathrm{ELU}(W_3 h_2 + b_3),\; \mu = W_4 h_3 + b_4
N=(45⋅512+512)+(512⋅256+256)+(256⋅128+128)+(128⋅12+12)=189,324N = (45\cdot512+512) + (512\cdot256+256) + (256\cdot128+128) + (128\cdot12+12) = 189{,}324

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