[G&K] Better AI

glider1

Deity
Joined
May 29, 2006
Messages
2,905
Location
Where animals hop not run
I'm experimenting with blending CivUP with GEM's AI to create a standard G&K game with a better AI. If you want to talk about this or try it out, here is the forum. I will attach the mod-mod here if anyone wants it. The only reason why I'm not playing full blown GEM is that honestly, I haven't really even finished ten proper games of G&K yet from start to end, let alone GEM.

*It needs the latest CivUP version*

The changes to GEM code that it makes:
  1. Deletes all folders in GEM except the AI folder
  2. Removes Gem's policy priorities
  3. Removes Gem's city priorities
  4. Removes Gem's tech priorities
  5. Returns Gem's building priorities in GEAI to default
  6. Player initial happiness increased to equal to Gem
  7. PROMOTION_HANDICAP duplicated in the AI folder(but as yet the values can't be changed)

The only changes to the game are:
  1. The AI gains more experience and promotions
  2. Gem's leader changes
  3. Gems better AI gold spending code
  4. Gem's multi-unit formation changes
  5. Gem's general AI tweaks (city attack, pillaging)
  6. The AI's research and production rates are buffed
  7. Player get's Gem's happiness which allows for more early flexibility against a better AI

Have fun and try it out! I'm using it and it works well and there's no bugs or crashes that I've experienced. The mod's name is still GEM's because I haven't bothered to build a proper mod project for it yet :)

Cheers

New version updated 26/8/2012
 
Still to do:

  1. Create a full blown mod
  2. Modify the G&K new leaders to fit into Thal's personality profiles (expansionist, conqueror, diplomat, coalition)
  3. Link handicap promotion to this mod rather than Civup
  4. Adjust handicaps in more detail
 
I dont know if im missing it but where is the link for the modmod?

Also maybe it would be worth outlining for those not privy to the discussions leading up to now, the changes this modmod makes to make the AI better.
 
At the moment there is no link, but it won't take me that long to attach something to the OP. In theory someone could start a full blown Better AI project, but until we get access to the DLL source code it's a bit empty, so I'm just proposing to use Thal's existing XML and Lua to at least get a smaller informal modmod going, which this is.
Cheers
 
I sis like the idea of what you have suggested, after playing with better AI in Civ IV for a long time, but I did notice Thal commenting...

@glider1
A lot of people seem to like a mod that has no actual gameplay effects... buffy, bug, and the hall of fame mods in Civ 4 were like this. This is why I keep the interface stuff (civup) separate from the gameplay stuff (vem/gem).

Much of the improved AI also depends on code in vem/gem... without that code, the AI changes wouldn't work. Production per era, the AI handicap promotion, AI experience bonuses... all this stuff depends on code that's tied in to the vem/gem stuff. It would take more time to maintain a GEM version and non-GEM version of the AI code. I could do that if there were other people writing the code, but for now it's just me. I think your suggestion is a good one, but it's hard to maintain separate mods.

So understanding the above it would seem that there would still be work involved above that of the file editing for it to work as intended, unless I have misunderstood ..?

So whilst I would commend a similar project / mod like the better AI I would guess that would have to wait for dll access etc.

Well done on what you have wanted to achieve as I did not feel too comfortable at playing with the full GEM mod and would have preferred to have played a game with the advantages of the Unofficial Patch and general AI improvements.
 
Oh it's highly playable as is Xink. I know, because I am. If there are any small adjustments that are needed, it's not much, it won't be that hard to do. What is hard to do is to come up with the original ideas in the first place which is Thal's speciality! :)
Cheers
 
One thing you could do is set a dependency to Civup from your modmod. The code the AI files use is located in civup. That way people could have three levels of stuff: civup, civup+ai, or civup+ai+gem.
 
Thanks that is a good idea Thal. At the moment for prototyping I "prune" the GEM folder and files as necessary to maintain the dependency and G&K purity which seems to work, but if there is any interest it is certainly something I could do.

I'd say there will be three stages to the Better AI mod for Civ 5:
  1. In the first stage (now), the concept is "Better AI for CivUP"
  2. When the DLL code is released, a full blown Better AI project is built, which is not dependent on CivUP
  3. At that point, the "Better AI for CivUP" mod would naturally die out

Cheers
 
When the DLL code is released

I think the reason they have not done this is because of the difference in how mods load between Civ 4 and Civ 5.

In the earlier game mods were usually total conversions that restarted the game with a new set of files. In this game, mods are small components that get tacked on while it's running. This works for things like data or lua code which gets compiled at runtime. The c++ game core is compiled before the game starts, however, and it's more complicated to use multiple c++ mods. It's also harder to get permission to distribute executable files over services like Gamespy or Steam.

I understand their reasons, even while hoping they do eventually have the time to let us do C++ mods. :)
 
i'm playinga marathon game on emperor using only the ai as yousuggested. it's farmore intresting. i don't see anymore ai big cities too soon and warfare is much more fun! the ai module needs a standalone version. ai archer are nasty now.

the only problem i saw is that ai cities and units never target siege unit but always foot soldiers when sieged
 
I will give this a go in my next game, I am too engrossed in trying to launch my rocket for a science win as yet to start afresh. I look forward to trying it out :)

what does this mean...

The AI's research and production rates (yet to confirm)
 
Ok manarod and Xink thanks for the feedback and glad you are enjoying it! I didn't think anyone was interested so have not posted. I am continuing to play with the mod because it improves G&K so much. I've attached the latest version to the OP which makes these changes:

  1. Player happiness set equal to GEM because the AI is better
  2. PROMOTION_HANDICAP duplicated in the AI folder rather than just having it sit in CivUP because it includes the city attack bonus which is so important
  3. building priorities in GEAI_general returned to default
  4. AI pillage priorities increased to match GEM

If interest continues, I'll get around to making this official and submitting it to Thal for approval considering it's all his code.

Cheers
 
Seems impressive - well done :)

When I initially tried this my first thought was that I would need to drop a level, or two. So either the game got smarter or, and I really hope not, I must start adding more water to my drinks.!
The happiness bonus for the player should help.
 
Thanks. I agree on dropping a difficulty level (or two). Because we have that extra head room, I'm experimenting with these extra player benefits (that Thal provided but I haven't included yet):

  1. Remove the AI's start tech bonuses to give humans a chance at building the Great Library
  2. Try to equalise the AI's happiness relative to humans a bit more (but not too much because the AI doesn't plan happiness very well)

Cheers
 
I suppose you have to consider how much enhancing the AI is being done by adding bonuses for the AI just to make up too much for its deficiencies and is this the intended scope of this mod...?

Whilst I understand it is a different game but I did like to use the Unofficial Patch and the Better AI (along with the Bug / BAT and Bull mods etc) for Civ IV as it did what is said on the tin without changing aspects of the gameplay by adding more bonuses etc for the AI and thus gimping the player.

I did wonder why I could not beeline and get the Great library, but then again I only played with the mod a while ago to test it out quickly as I do have an ongoing game which I want to finish first. So at that time I did not draw any conclusions or thoughts about how the AI was teching but I do like placing the emphasis of using mods which enhance the UI and the graphics as well as to try and fix the things which are wrong with the vanilla aspects of the game and that is it.

I would agree with implementing both of the factors you have noted for the reasons noted above, especially at the early stages of this mods development.
 
i like this new ai, in marathon is difficult to find an ai with more tha 400 gold pieces for a luxory trade :)

only 2 complains:
barbarians spawn not often, i mean quite never

ai upgrade are always the same: 3 rought for archers and melee and 3 flat for horses: now the safiest terrain is flat

you should add also the research part of gem, expecially thepart that help backward civ, just for not having ai civ so weak after some time

i like to pkay marathon so i'm still in the reinassance
 
Back
Top Bottom