GridPolicyMLP

A tiny policy network (17,253 parameters) trained with PPO to play a 10x10 grid game.

Architecture: 500 -> 32 (tanh) -> 32 (tanh) -> 5 logits

Observation: 10x10 grid x 5 binary channels (agent, moving objects, reward targets, obstacles, previous frame), flattened so input i = (row * 10 + column) * 5 + channel.

Actions: 0 no-op, 1 up, 2 down, 3 left, 4 right (sampled from softmax of logits).

Usage

import torch
from model import GridPolicyMLP

model = GridPolicyMLP()
model.load_state_dict(torch.load("pytorch_model.bin", map_location="cpu"))
model.eval()

obs = torch.zeros(500)          # your flattened observation here
action = model.act(obs)         # sampled action index 0-4
Downloads last month
-
Video Preview
loading