Show HN: Watch a neural net learn to play Snake

ppo.gradexp.xyz

84 points by c1b a day ago


In browser PPO training demo, made possible by tinygrad: TinyJit -> WebGPU kernels.

Requires WebGPU.

mavdol04 - 7 minutes ago

That's cool, i did exactly the same few years ago

simedw - 4 hours ago

Cool project!

I noticed that if you go from training to watch and then back, the training temporarily drop significantly in score.

snats - an hour ago

did a pretty similar thing last month for the text rendering library last month.

trained and made a viz for the model and then made it displace text.

should probably do a proper write-up:https://x.com/i/status/2038367016969724259

ldoughty - 3 hours ago

Really cool! But right as it was nearing 4,000, it seems to have corrupted itself and no longer got any scores above 0. Not sure if that's a code bug or a neural net issue.

avg500 -4.6 last 500 episodes

peak 3959.3 best window

roll/s 20.68 20-step avg

progress 4388 562749 episodes

- 4 hours ago
[deleted]
beardsciences - 4 hours ago

My average eventually made it to about 3900, and then stagnated between 3600-3900. I'm curious if this is universal behavior or not. I'm up to about 5k steps.

neduma - 4 hours ago

More details and implementation notes please?

LowLevelKernel - 2 hours ago

Link to repo?

bozhark - an hour ago

Crashed

jmclnx - 3 hours ago

> WebGPU not available in this browser

Looks like this is for Linux and Windows, on NetBSD I get this issue :(

th1nhng0 - 3 hours ago

cool project

austinthetaco - 3 hours ago

my training on a 10x10 just randomly broke. i got to like 3600 then the graph went flat, the viewer on the left just showed it constantly restarting the game, and the scores in the negative. my average is now -10.