Hacker News

C Go Neural Net Bot

by @godshatter

I used to work on making a program to play the game go using genetic algorithms. Now, I'm building a set of neural networks (MLPs) in C. Deepmind employees aren't going to lose any sleep over this upcoming go bot threat, but I'm having fun and learning a lot. I already have code for playing go from the previous project, which helps a lot. I am using AI, but only for advice and mentoring. I have managed to convince chatgpt to teach me things by letting me try to intuit the answers with only the information I have, and having it drop hints here and there to help steer me in the right direction. I finally understand backward propagation now, in my own imperative way. This came out of a discussion of a book that was formative for me, Starburst by Frederick Pohl. The main contrivance of the story is that sometimes having less data can be more beneficial than too much data when trying to solve difficult problems. The code I'm writing is 100% all mine, I will occasionally give chatgpt code snippets to help me look for bugs, but that's it. It's mostly taking the role of a mentor and a sounding board for me. I'm building cohorts of small neural networks (1 or 0 hidden layers) at first, and will slowly be building out more cohorts of networks based on which members of previous cohorts did better than the others. I'm trying to figure out the best "shape" of a neural network based on experimentation. Or I will be, once I get some more code built. I'm impatient because now that I finally have back prop figured out, I just need to code it before I lose it and then I have to build some infrastructure around determining which output values to correct, as well as connecting to Gnu Go to get a real-world score of how they are doing. It's been a blast, and I'm looking forward to letting my neural network training heat my computer room while they learn. It's all CPU-based at this point, won't be going to GPUs and CUDA anytime soon. Just going for well laid out data structures cached well. If it goes anywhere, I'd rather buy a server with lots of cores to handle parallelization. Cheaper than buying a bunch of whatever the new hot GPUs are. I'm not in any hurry anyway. This is just good old fun.

Discover more builders

Builderlust is an endless, joyful scroll of real projects people are shipping right now. Get the app to keep finding your next spark of inspiration.

📱 Coming soon to iOS & AndroidOpen in the app