Hi,
I've been working in my spare time on a tactical AI for CivV (or any hex based strategy game I guess). Since no integration is possible before the DLL is released (at least that is my understanding), I've created for my testing purposes a small interface mimicking the tactical aspect of CivV (just units, no cities, only basic terrain, crappy graphics, etc.). The AI has gotten strong and usually beats me every time I play it (although many features are still missing, like embarkment, promotions...) so my focus is now gradually shifting towards preparing the integration with the DLL.
The thing is, I have never modded for Civ before (hmmm... actually I think I added a tank with two canons in CivII twenty years ago!) and have no idea what to expect. This is my fantasy strategy for how the integration would work:
1. At the start of AI player's turn, read the entire state of the board and transform it to the mod's own data structure
2. Identify units that can attack or be attacked
3. Run the mod's AI algos on the identified units
4. Translate unit actions (moves and attacks) generated by the mod into actual CivV actions
5. Let the default AI handle the rest of the units and whatever else it does
Could someone knowledgeable comment on the realism of this strategy? The goal is to let the AI play as it usually does, but just take over for combat, an area where it kinda sucks.
I'm guessing there is a lot to be learned by looking at the CivIV dll, but I'm afraid the 1UPT system might have forced a total AI overhaul (and I'm quite lazy). To make matters worse, my AI so far is written entirely in Java because I can prototype and test ideas a lot quicker that way. But I took care not to do anything too Javaesque so the conversion to C++ should be straightforward.
Hmmm... I could write a hundred pages about what I've done so far in the project (it uses a kind of alpha-beta!), what I want to do and questions about integration but I'm curious to see any replies on what I've said so far... or just if there is anyone out there interested in discussing this stuff at all.
Cheers
I've been working in my spare time on a tactical AI for CivV (or any hex based strategy game I guess). Since no integration is possible before the DLL is released (at least that is my understanding), I've created for my testing purposes a small interface mimicking the tactical aspect of CivV (just units, no cities, only basic terrain, crappy graphics, etc.). The AI has gotten strong and usually beats me every time I play it (although many features are still missing, like embarkment, promotions...) so my focus is now gradually shifting towards preparing the integration with the DLL.
The thing is, I have never modded for Civ before (hmmm... actually I think I added a tank with two canons in CivII twenty years ago!) and have no idea what to expect. This is my fantasy strategy for how the integration would work:
1. At the start of AI player's turn, read the entire state of the board and transform it to the mod's own data structure
2. Identify units that can attack or be attacked
3. Run the mod's AI algos on the identified units
4. Translate unit actions (moves and attacks) generated by the mod into actual CivV actions
5. Let the default AI handle the rest of the units and whatever else it does
Could someone knowledgeable comment on the realism of this strategy? The goal is to let the AI play as it usually does, but just take over for combat, an area where it kinda sucks.
I'm guessing there is a lot to be learned by looking at the CivIV dll, but I'm afraid the 1UPT system might have forced a total AI overhaul (and I'm quite lazy). To make matters worse, my AI so far is written entirely in Java because I can prototype and test ideas a lot quicker that way. But I took care not to do anything too Javaesque so the conversion to C++ should be straightforward.
Hmmm... I could write a hundred pages about what I've done so far in the project (it uses a kind of alpha-beta!), what I want to do and questions about integration but I'm curious to see any replies on what I've said so far... or just if there is anyone out there interested in discussing this stuff at all.
Cheers