Next level raid AI: some practical suggestions.

I was playing the other day and two things happened. Firstly a raid came and one of the raiders tried to dig through the mountain directly into my storehouse. This was really exciting as I had to really think about what to do in response.

The second was that three raiders attacked when there was a group of 20 friendlies standing right outside my base. The raiders ran down from the top of the map and straight into the friendlies and got instantly cut down.

I found this second event quite immersion breaking. No human would act like this. If you were really living in a harsh world and had taken to raiding colonies to survive then there's no way you would charge an overwhelming force and die for nothing. Personally I think improving raid AI might make the game even more immersive and even more of a story generator.

Firstly I think that raiders should be programmed to avoid turrets. It's possible to ray trace exactly which squares are covered by turrets (for each square if a turret is in range draw a line to that turret and see if it collides with anything). I think when raiders attack they should be programmed to avoid any squares which have a lot of turrets that can shoot them. So the algorithm could be "plot the shortest path to the supplies you want to gain, with a penalty for any square covered by turrets and a small penalty for digging through rock".

I think this would be implementable and would make for more interesting attacks. For example it's clear that if you can dig through a single wall and into a storehouse this is a much better strategy than running into a killbox. The above algorithm makes killboxes unworkable as the ai will simply avoid them, which I think would be an improvement.

I also think they should avoid large groups. So if there's friendlies or a caravan then they should wait until they have left before attacking.

Further they could be programmed to try to turn off turrets by attacking their power supply (any power items are deliberately attacked if they are attached to a functioning turret). Also I think that setting fire to a wooden base and letting it burn for a while would be a very good tactic to have raiders attempt (if a base has more than X connected wooden tiles have the raiders set a fire and then wait for a while).

TL:DR; I think it's more interesting to fight fewer, more intelligent, enemies than more basic ones.

What do you think? All feedback welcome.

Posted Jun 17, 2017, 11:59 AM UTC

53
Loading comments…