Show HN: Watch a neural net learn to play Snake

(ppo.gradexp.xyz)

52 points | by c1b 1 day ago

9 comments

  • simedw 2 hours ago
    Cool project!

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

    • bguberfain 18 minutes ago
      It seems to be something related the moving average calculation. So it is just a glitch on the chart.
  • ldoughty 1 hour 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

    • r3trohack3r 19 minutes ago
      I think I noticed it reach “end game.” The snake reaches a point where, if it gets any longer, it is out of squares and hits its own tail. So it finds the route through the squares that it can infinitely loop, never eats the ball, and score starts dropping and goes negative.
  • LowLevelKernel 7 minutes ago
    Link to repo?
  • beardsciences 1 hour 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 2 hours ago
    More details and implementation notes please?
  • jmclnx 50 minutes ago
    > WebGPU not available in this browser

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

    • redshiftza 22 minutes ago
      If you are using brave (which i assume also applies to chrome) , there is a menu at brave://flags , you can enable unsafe web GPU from there
  • th1nhng0 1 hour ago
    cool project
  • austinthetaco 1 hour 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.