ANIRUDDHA MUKHOPADHYAY← All projects
PROJECT 04 / REINFORCEMENT LEARNING

Pip.

Perceive. Decide. Try. Learn.

A small neural network agent that learns to reach a goal and avoid an obstacle in a grid world, using trial and reward.

An experiment in understanding AI at the mechanism level.

WHY WE BUILT IT

Look inside the learning process.

To see how an AI agent perceives, decides and learns at the mechanism level, without a black box. The neural network is written from scratch in plain JavaScript, without an ML library.

ANIMATED MECHANISM

One loop, step by step.

The stages light up in sequence alongside a small grid world. This is an illustrative workflow, not a live training run or a demonstration of measured performance.

Grid world

PipGoal +1Obstacle −1

Illustrative movement only; the path does not show learned behaviour.

01

Perceive

8 inputs

02

Think

12 hidden neurons

03

Decide

4 action probabilities

04

Act

Take an action in the grid world

05

Reward

+1 for the goal; −1 for the obstacle

06

Adjust

Nudge 160 weights

↻ Repeat: perceive the grid world again.
TECH STACK

A network written from scratch.

ReactPlain JavaScriptSVG

React for the interface, a neural network written in plain JavaScript without an ML library, and SVG for visualisation.