Home

One-A-Day 3: Galcon in Python

26 March 02021

Github Link

I decided to make a python version of the game Galcon, which is a casual RTS game about capturing planets, which automatically create units that can be sent to capture more planets. Graph theory is one of my favorite areas of math, and looking back on my time studying it most of the graphs in question were static. One of the things I want to explore more is what happens when graphs change over time. Say for example you have a solution (either exact or approximate) to the travelling salesman problem. If you add one point to that graph is there a way to use your previous computation to get a solution to the new graph, or do you have to throw it out and start all over again? And if you can reuse your computation, is there a risk of creating some sort of path dependence where the order of the points you add can lead to poor solutions.

Anyway, the code for this project wasn't too difficult, most of the code is just dealing with the game logic of resolving moves. Most of the trouble I had was with the algorithms to decide which moves each player makes, specifically the attack_weakest_neighbor function, and that was mostly down to the number of variables I had running around.

Things to do if I had more time:

Lessons learned:

Future ideas:

I'm going camping over the weekend, so one-a-days will be paused until Monday.