Jim Wright.

Series

Snake AI in Go: eleven ways to play

One game, eleven players, and what each of them is worth. From a snake moving at random, through the searches and the tours that never lose, to a neural network that was evolved rather than written.

  1. 01 Eleven ways to play snake in Go, from random to NEAT A series on writing snake players in GO, from random moves to an evolved neural network 5 min
  2. 02 Snake in Go: a random-move baseline The simplest player there is, and the baseline everything else is measured against 4 min
  3. 03 Snake in Go: a greedy player The greedy snake: no search, no lookahead, and three and a half times the score 4 min
  4. 04 Snake in Go: shortest path with breadth-first search Breadth first search, a bordered board, and why searching properly is barely worth six points 7 min
  5. 05 Snake in Go: A* search instead of BFS A* finds the routes breadth first search finds, having looked at a fraction of the board 6 min
  6. 06 Snake in Go: stretching the longest path Stretching a route to keep the body trailing behind, and why it scores worse than walking straight at the fruit 6 min
  7. 07 Snake in Go: a tail-reachability safety check A snake that can reach its own tail always has a way out, and that one rule is worth sixty points 8 min
  8. 08 Snake in Go: a fixed Hamiltonian tour Walk a route that covers every tile and you can never trap yourself. It is perfect, and it is agony to watch 6 min
  9. 09 Snake in Go: safe shortcuts along the tour The same tour, jumping ahead on it whenever that can be shown to be safe - and a third fewer moves 5 min
  10. 10 Snake in Go: building a Hamiltonian cycle with search Growing a route into a Hamiltonian cycle, and the two small decisions that took it from 65 to winning every game 7 min
  11. 11 Snake in Go: evolving a neural network with NEAT Nobody tells this one how to play. It is a neural network that was evolved rather than written 5 min
  12. 12 Snake with NEAT: designing the network's inputs Eighteen numbers, why each one is there, and the reading bug that was worth more than any of them 8 min
  13. 13 Snake with NEAT: designing the fitness function Three terms, in descending order of how much they are allowed to matter, and the trap in each of them 6 min
  14. 14 Snake with NEAT: training runs and checkpoints Population, generations, checkpoints, and why the fittest genome is not the one you keep 8 min
  15. 15 Snake with NEAT: a hunger input to break stalemates A good network does not die any more. It gets stuck - and the fix is one number that has nothing to do with the board 8 min
  16. 16 Snake with NEAT: benchmarking changes to an evolutionary algorithm Run-to-run noise, a board small enough to measure on, and three ways I fooled myself 7 min