Thalassicus / cep-bnw

Civ V Communitas Expansion Pack
32 stars 22 forks source link

AI spamming un-escorted settlers #251

Closed GrantSP closed 10 years ago

GrantSP commented 10 years ago

Don't know if this related to the recent work with the AI, but using a build with the code as it stands now, the AI, Babylon (who are runaway leaders in science, tech and wonders) and Byzantium who are languishing in last place are both spamming settlers and sending them off to settle useless sites or placing 3 or 4 cites together with the minimum distance between them, when 2 might have sufficed.

My lone exploration unit has recovered 4 settlers from barbarian camps while the AI is still sending un-escorted settlers to the same location, while the camp is still spawning units. I found 1 camp with 4 captured settlers!!

Byzantines have only 1 city with more settlers than military units.

Thalassicus commented 10 years ago

I tried improving the settler AI years ago and discovered these things are problems in the unmodded game code. I did what I could through data edits alone, and we'd need to modify the c++ core to improve the situation further.

There's a couple problems with Firaxis' settler AI, including but not limited to:

However, the specific issue you encountered should have been solved by a bugfix I wrote last summer. It helps the AI clear camps that are far away from humans. AIs can have disastrous expansion problems when that code is malfunctioning. This also would explain why AIs have unusually low gold in the early game - they're not getting any income from camps.

I'll figure out why it's not working.

Thalassicus commented 10 years ago

It appears someone disabled the bugfix code, possibly to test something, and forgot to turn it on again. I solved the again by re-enabling the LuaEvent on line 1319 of CEAI_Events.lua.

That's why you're seeing such catastrophic settlement problems in recent builds. The fix solved the issue in the past, and must have been recently turned off by mistake.

It explains why two AIs have only 1 city in my current game. They started in isolated regions where there would have been lots of camps, so all their settlers got captured.

Please test this fix when you have an opportunity to update your repository and play a new game. It doesn't work perfectly, but should greatly improve the situation.