Genetic algorithms
Optimisation through genetic algorithms, with a CUDA path. The only project on this site where the GPU is programmed by hand rather than borrowed from a library.
A population of solutions, a function that ranks them, and enough generations for chance to stop being one. The method is old and well documented; the interest of the project lies elsewhere.
The problem is not a single one. The engine, population, selection, crossover, mutation, is separate from the environments, and eight games plug into it, from snake to tic-tac-toe, from Flappy Bird to the maze, up to Othello and chess. They fall into two families that do not ask the network the same question: those where it picks an action from what it perceives, and those where it scores a position and lets the game choose the best move. The second case is that of chess, and it is also where the network gets big enough for the processor to start struggling.
Hence the CUDA path, the only place across all these projects where the code running on the card is written by hand rather than called through a library. A genetic algorithm evaluates the same function on thousands of independent individuals, which is the textbook case for parallel computing. The program does not switch to it systematically: it first checks whether the card is there, then whether the work is worth the trip, that is, whether it is in scoring mode or the genome exceeds a few thousand weights. Below that, the transfer costs more than the computation.
This page gives no speed-up factor. It has not been measured under a publishable protocol, and a claimed gain without its protocol is worth nothing, especially this one, which depends entirely on the network size and the card available.
Private project, no public link
