Aggression and Performance Issues


This weekend, I implemented an algorithm to incentivize tribal and unorganized band migration due to aggression, so that more aggressive tribes/bands feel a higher pressure to invade lands occupied by more passive ones. Though I quickly ran into performance problems. Taking into account the aggression preference of each involved party to calculate migration pressure made every cell update 10 times slower than it used to be. To tackle this problem I started working on some performance improvements by making some basic code changes and applying some algorithmic shortcuts.

So far, it looks like the performance improvements might work. The new migration pressure function is faster than even the original one that didn't take into account tribal aggression. The downsize is that the resulting migratory behavior looks more chaotic. Inner "burst" migrations are now happening much much frequently than outward expansion migrations. This is not necessarily unrealistic. But it really drags the simulation down and makes it way less interesting to look at. So I will need to spend a couple of weekends tweaking the migration pressure algorithm to curb the undesired migratory behavior and get it back to what it was.

Get Worlds - History Simulator