**********************************************
Download the Latest Version : CIV1.61_ImpAI_v0.65.zip
Please note this is for testing purposes only, this AI mod is not yet "production quality", that is not to say that it wont play better than the stock 1.61 AI - it will, in general. But any given version might have horrible bugs and/or AI's which implode messily - in other words, use at your own risk! Of course testing to find such problems is greatly appreciated!
There are two ways to use this mod - either copy CvGameCoreDLL.dll to your CustomAssets folder (make a backup of the original, if you use another one) - this is so you can use the mod with existing save games, or switch from the mod.
Alternatively (And especially reccomended if you use other mods) is to create a new folder under mods (for example "IMPAI") and copy the CvGameCoreDLL.dll to that folder, then load like any other mod.
**********************************************
My Original First Post:
Hi guys. I'm often vocal about the inadequate AI - and in some cases, how it's plain moronic. Well I've finally decided to do (slightly) less ranting and slightly more AI modding.
The code for AI City Placement is bad. I could see that just reading it. There's crazy bits like coast being as bad as tundra, and the resource-value of the city tile is doubled, in spite of the fact the city tile has generic yield (ie the AI thinks it's better to found on grassland than desert). The AI also believes that founding on a resource is a terrible sin.
It has absolutely no understanding of Lighthouses. It doesn't really understand the value of food resources.
You can find a simple mod to address the most glaring coast related issues Here.
Now though I'm working on more thorough code improvement, adding additional improvements such as:
Look at these comparison screenshot from my work in Progress mod:
This screenshot show the default CIV 1.61 AI city founding behavior.
Despite being saturated with settlers it diligently neglects founding a city at the Corn/Fish/Goldmine site (it's all that nasty coast and desert overriding the extremely marginal resources!). It has also blocked off another fish tile offshore and has failed to make use of the deer in the hungry south.
Now for the mod. Remarkably the AI has managed to claim EVERY resource on the island. The only poorly placed city is Hamburg, unfortunately the existing code base doesn't even pretend to account for "dryness" of a city (it's unaware that it's not possible to work the gold and both gems). I intend to recode it to value city sites with a net food surplus and to teach it about lighthouses + freshwater lakes.
Here's a fun one.
Your eyes are not deceiving you. It's a blue circle offering USEFUL ADVICE, founding on the dry rice to claim fish. My jaw dropped when I saw this, I had altered the code so the AI would found on a resource if doing so would bring in seafood, but actually seeing it in action was great (blue circle code uses AI founding code).
Unfortunately you can see that the fish circled in red will be blocked off. Regretfully I don't think the AI can be taught about the "blocking" aspect of cities, you see the city placement algorithm is already pretty CPU intensive - to assess not only the value of a potential site but also the reduction in value of other potential sites would increase the complexity too much and result in longer AI turns.
Anyway, I'm posting this here mainly because the creation forum isn't visited much. I also want to gauge interest in using (and especially testing!) such AI mods - mods which don't change the gameplay mechanics in any way and just improve the AI's understanding of them.
AI city placement is my first task, next on the list will be the governor and AI build priorities (workboats, granary & lighthouse = good, type thing).
Download the Latest Version : CIV1.61_ImpAI_v0.65.zip
Please note this is for testing purposes only, this AI mod is not yet "production quality", that is not to say that it wont play better than the stock 1.61 AI - it will, in general. But any given version might have horrible bugs and/or AI's which implode messily - in other words, use at your own risk! Of course testing to find such problems is greatly appreciated!
There are two ways to use this mod - either copy CvGameCoreDLL.dll to your CustomAssets folder (make a backup of the original, if you use another one) - this is so you can use the mod with existing save games, or switch from the mod.
Alternatively (And especially reccomended if you use other mods) is to create a new folder under mods (for example "IMPAI") and copy the CvGameCoreDLL.dll to that folder, then load like any other mod.
**********************************************
My Original First Post:
Hi guys. I'm often vocal about the inadequate AI - and in some cases, how it's plain moronic. Well I've finally decided to do (slightly) less ranting and slightly more AI modding.
The code for AI City Placement is bad. I could see that just reading it. There's crazy bits like coast being as bad as tundra, and the resource-value of the city tile is doubled, in spite of the fact the city tile has generic yield (ie the AI thinks it's better to found on grassland than desert). The AI also believes that founding on a resource is a terrible sin.
It has absolutely no understanding of Lighthouses. It doesn't really understand the value of food resources.
You can find a simple mod to address the most glaring coast related issues Here.
Now though I'm working on more thorough code improvement, adding additional improvements such as:
- City tile awareness. The AI understands founding on a bad tile, makes it no longer bad.
- Lighthouse awareness. The AI understands that coast tiles are only bad if the city itself isn't coastal. It also understands that seafood is much nicer when worked by a coastal city.
- Resource Awareness. The AI understands that food resources are the bees-knees, and that it's quite okay to found cramped cities for the sake of resources. It understands that it's okay to found on one resource, if that brings in other resources. It understands better that resources claimed by another city are not so useful.
Look at these comparison screenshot from my work in Progress mod:
This screenshot show the default CIV 1.61 AI city founding behavior.
Despite being saturated with settlers it diligently neglects founding a city at the Corn/Fish/Goldmine site (it's all that nasty coast and desert overriding the extremely marginal resources!). It has also blocked off another fish tile offshore and has failed to make use of the deer in the hungry south.
Now for the mod. Remarkably the AI has managed to claim EVERY resource on the island. The only poorly placed city is Hamburg, unfortunately the existing code base doesn't even pretend to account for "dryness" of a city (it's unaware that it's not possible to work the gold and both gems). I intend to recode it to value city sites with a net food surplus and to teach it about lighthouses + freshwater lakes.
Here's a fun one.
Your eyes are not deceiving you. It's a blue circle offering USEFUL ADVICE, founding on the dry rice to claim fish. My jaw dropped when I saw this, I had altered the code so the AI would found on a resource if doing so would bring in seafood, but actually seeing it in action was great (blue circle code uses AI founding code).
Unfortunately you can see that the fish circled in red will be blocked off. Regretfully I don't think the AI can be taught about the "blocking" aspect of cities, you see the city placement algorithm is already pretty CPU intensive - to assess not only the value of a potential site but also the reduction in value of other potential sites would increase the complexity too much and result in longer AI turns.
Anyway, I'm posting this here mainly because the creation forum isn't visited much. I also want to gauge interest in using (and especially testing!) such AI mods - mods which don't change the gameplay mechanics in any way and just improve the AI's understanding of them.
AI city placement is my first task, next on the list will be the governor and AI build priorities (workboats, granary & lighthouse = good, type thing).
Comment