Playing around with evolution training

Introduction In my previous post I made a neural network from scratch with the idea of using it for a tic-tac-toe agent. In this post I’ll go over the training process. My general intuition is to play each agent with all other agents twice, once for “o” and once for “x”. A reward function would decide what score an agent gets each game. The agents with top score progress to the next epoch, where they are cloned and mutated to fill the dropped out population. ...

September 11, 2025

Neural network from scratch

Introduction In my last post, I used a minimax algorithm to create a tic-tac-toe agent that sees a few steps ahead and can’t be beat. While this approach works for simple games like this one, it wouldn’t scale well for more complex games. For this reason, I wanted to implement an agent that can use a neural network to find patterns in the game through machine learning. If I can make this for tic-tac-toe, the general approach should be usable for other games. ...

September 10, 2025

Tic-tac-toe Minimax and Heuristics

Personal Note Game AI is something I find fascinating, my mind going into many directions just thinking about it: How is Stockfish able to accurately evaluate positions, pick moves and think so far ahead? How are my CPU opponents in Gran Turismo able to race so cleanly and adapt their lines to whatever situation appears on the track? How are the individual players in FIFA or Madden able to realistically coordinate on the field and adapt their tactics? Why do Arma’s CPU units feel so stupid? (Spoiler: It’s extremely difficult to write good computer controlled units for a game like this, especially without impacting performance.) And there are many more questions like these. I can’t possibly write them all down here. In this series of blog posts I’ll be sharing my experience as I journey into writing game agent logic and AI. You can follow along, hopefully learning from my insights and mistakes alike. I’m coming from a background in software engineering, so data structure and algorithm knowledge is a must for following this series. ...

September 5, 2025