Policy network

Control · pattern · Game or sensor state → Action

A small MLP that reads a game or sensor state and outputs what to do next: action scores, Q-values or a motor command.

Also called Q-network, DQN, Actor, PPO policy, Dueling DQN, NPC brain

Figure 1. The Policy network as a schematic: the parts it is built from and how data flows between them. Select a part to read about it.

What it does

In reinforcement learning and game AI, a policy network maps the current state (positions, velocities, what the agent can see) to an action. Discrete-action agents output one number per action and pick the largest: logits in PPO, expected future reward (Q-values) in DQN. A dueling DQN splits the head into a state value and per-action advantages and recombines them. Continuous controllers such as DDPG actors output the command directly, squashed by tanh into the allowed range. The network runs every frame inside a simulation, so its weights translate directly into behavior you can watch.

Formula

a = argmaxk (W2 ReLU(W1 s + b1) + b2)kdueling: Q(s, a) = V(s) + A(s, a) − meana′ A(s, a′)continuous: u = umax · tanh(W2 h + b2)

Shapes and parameters

Shapes
State [N, S] (2 to 8 values in the catalog) → hidden [N, 64] or [N, 256] → actions [N, K].
Parameters
Like any MLP. Lunar Lander’s dueling network has 46,085; the CartPole policy 4,610; a Signal Run guard 24.
Used for
CartPole, Acrobot, Mountain Car, Pendulum and Lunar Lander controllers, the puck-pushing arm, and every game NPC in WeightSpace.

Figure 2. A real policy network in WeightSpace: Push a puck onto a target, drawn from the file the app runs. Open a module to see the parts inside.

In WeightSpace

For the catalog controllers you edit the action-head biases (a standing preference for one action, or an offset on the motor command) within ±8. For the game NPCs every weight is editable within the game’s limit, so you can rewire which input triggers which action.