The pleasure of writing code

There are those moments when I make changes in the code and feel smug and satisfied, while in the next moment realising that no one will actually notice this very small change of behavior in the AI which I believe is a wonderful improvement.

Yesterday morning, while sitting and studying the code in the bus, I had a different kind of moment. For a while I’ve been wondering why the AI stops expanding after a couple of years in the game. It set up a few settlements at the start (intentional behavior) but then it just stopped settling new territories.

With the updates to settlements and the ability to set focus to them combined with the fact that owning land now gives a good income boost I want the AI to expand more and set up several provinces.

Today I made a change that you’ll notice. While implementing the code that gives a boost to the willingness of AI empires to create settlements in the first 50 turns of the game I also, unintentionally, made the AI unable to settle new regions after turn 50. This has now been fixed.

Be warned! If you believe Krant to be hard today, imagine them having twice the number of settlements…

It will be a pleasure to observe a few games and see what happens now.

Leave a Reply