|
|
|
|
|
by orneryostrich
2516 days ago
|
|
Keldon Jones’ Race for the Galaxy AI is brilliant. Every line is documented C. It trains and deploys a neural net. It has a fast and functional GUI. Most diehard RftG players have cut their teeth by losing to Keldon a few dozen times before really learning the game. Keldon was contracted a few years later to develop the RftG apps on iOS and Android, which are easily worth $4. Source: https://github.com/bnordli/rftg Precompiled binaries: http://keldon.net/rftg/ |
|
Every line? Oh dear [1]:
I assume the verbose flag is incremented because there's multiple levels of verbosity, whereas the advanced flag is a boolean, and i is incremented because expansion is not a command line flag (rather, an option). But I wouldn't know that from the comments! Especially useful to know if like, verbosity actually has multiple levels, like -v and -v -v or -v -v -v and so on ... instead of knowing that init_game is ... init'ing the game.Compare all those comments to this [2], which is actually a spectacularly useful comment.
Signal to noise ratio!
[1] https://github.com/bnordli/rftg/blob/master/src/learner.c
[2] https://github.com/bnordli/rftg/blob/master/src/replay.c#L94