Buffed AI for BNW

Were you playing on epic speed or is there a typo in the turn number?
I don't recall a single Civ V game of mine on normal speed still going on after turn 450 and only recall once (as Venice in my first game as them) taking past turn 400.

No typo. Standard settings and speed 9+9, emperor, shuffle map. I was totally swamped by Iroquois land grab and had to settle with five cities for an attempted science win. I had to keep the adaptive difficulty level down otherwise I would have been over-run. This is how it ended 450-470. It was not far from engaging a timed victory which I would have easily lost.

However, I made a big mistake. I pushed science way too hard early on as Babylon. This fed the others to become superpowers on deity and even deity 1-2 difficulty for a short while. At the end of the game the difficulty had retracted back to my original starting difficulty of emperor but by then the damage was done (because the AI had already grown and had become self sufficient).

EDIT: I had a chance at winning but my production was too low and I didn't bulb my eight great scientists early enough to begin construction of SS. I forgive myself because I had Iroquois breathing down my neck trying for domination and had to try and deflect Hiawatha's attention on weaker civs than I first. As per normal, the domination AI stalls because it is too complicated for it on standard size maps. On small maps the domination AI is better. I could have bulbed GS earlier and invoked higher difficulties because I think my region was secured and even if AI was on deity it would not have attacked me (thanks to the AIDeclareWarProb being on default).

EDIT AGAIN: I forgot to mention that I didn't remove the AI free techs in V19 which made getting wonders really hard. First wonder I got was hubble space station but it came too late for me and Siam built SS even without it.
 
Hi Glider, thank you once again for making the game playable again for me. I have a small concern/request concerning peace treaties, I believe they are simply put: broken (not because of your mod don't worry)

Issue #1: When at war with an A.I in which it is definitely winning the war, if the peace option becomes open and you ask the A.I what will make this deal work, it will ask for a lot (gold, cities, luxuries etc.) which is consistent with the course of the war, but then if you immediately offer a blank peace it accepts!!
I have had this happen to me every single game consistently because I am usually last in military but never lose a city because I always manage to hold off the attack until the peace option becomes open, typically with my city having 10% HP and surrounded by the A.I who asks for 2 cities and gold for peace but accepts a blank peace treaty :confused:
A solution to this would be to.. never mind actually I think this has to be a bug that you can spot in the code :)

Issue #2: The A.I seems to have a cool-down of certain turns before opening the peace negotiation option even if it is threatening its entire existence it will refuse to negotiate until that period elapses.
Well I understand this can be for balance purposes/avoid exploits as in to prevent a bullying player from declaring war every 10 turns and extracting a tribute for peace. But there is a simple solution for this which is allow negotiations right away if the A.I is significantly weaker but have the A.I accept no less than a blank peace for the first turns of the war until the said cool-down period elapses.
Again this happens to me every game pretty much, usually when I declare war on a weak A.I without a conquest goal in mind and would like to offer blank peace, but the A.I refuses to negotiate and keeps suiciding his army and resources on me until that period elapses and it comes begging me for peace offering his wife and kitchen sink while I would have offered a blank peace had he allowed me :mischief:

I have more issues and solutions but lets see what you think of these first.

EDIT: I started a beta 9 emperor game btw, if you have a question or requests let me know. I will also post some observations or updates if you want!

Hi Dhialuck
I found a solution to issue #1 you raised. It really does make the AI look much more stupid than it actually is and makes the game a lot easier. How could this bug have slipped through unfixed for so many years?


EDIT:
Problem is that the fix is in the user interface lua code. If I change that, it would mean that this mod would be incompatible with other mods that change the user interface.
 
Hi Dhialuck
I found a solution to issue #1 you raised. It really does make the AI look much more stupid than it actually is and makes the game a lot easier. How could this bug have slipped through unfixed for so many years?


EDIT:
Problem is that the fix is in the user interface lua code. If I change that, it would mean that this mod would be incompatible with other mods that change the user interface.

Glider, part of the answer is that the bug originally wan't there on Civ V Vanilla release. I'm thinking it was introduced on or after the vanilla patch that doubled the number of levels of peace.

The weirder thing though is that in BNW if the AI has a much bigger force than you the AI refusing to talk to you at all is for a longer time than if you are about equal. This suggests they were actually aware of the issue by then but instead of fixing it directly (in the Lua) just changed the back end to make the AI less willing to talk at all when this was likely to occur.
 
Beta 20: It looks to me it's doing something more than considering techs when promoting itself.
China on Immortal. One of the AIs built the Great Library as I was too busy fighting barbs. I'm following a natural tech path for this local environment. (I'm not on purpose either increasing or deceasing my tech count)

Turn 0: Get a notice it's on Immortal (the level I chose)

Turn 20: AI promotes itself to Deity. I just discovered a tech, fair enough.

Turn 30: AI demotes itself to Immortal.

Turn 41: AI promotes itself to Deity. This is the turn BEFORE my next tech is due. :confused:

Turn 60: In the middle of my turn after I bombard a barbarian with an Archer, the AI promotes itself to Deity 1. :eek: I didn't even hit threshold for a promotion.

Turn 70: AI promotes itself to Deity 2 when I finish researching a tech. (I didn't think I was that far ahead of the techs, but ok)

Turn 71: AI demotes itself back to Deity 1. (I guess several discovered a tech as well)

So, what could be causing the turn 41 & 60 promotions?
 
Sorry, I should have explained.

It doesn't tell you the instant it promotes itself, just notifies you its state every 10 turns. So what it told you at turn 40 is a result of something that happened between turns 30-40 (you would have discovered a tech or other AIs changed the average from discovering their own techs). In the first beta, I had it updating the instant the AI changed difficulty, but it adds to the notification spam and becomes an annoying distraction.

When you get a notification half way through a turn, that will be because the code has called for an update on the PEM. It isn't because of me and would have happened anyway. It could be something to do with a delay in the notification system with the firing of the notification event. I shouldn't really fire a notification even from within the PEM function itself that is what it will be.

Point is that the PEM itself is probably stable.

The code in this mod is very simple. It just changes the PEM in the exact same function that the engine uses when it wants to know what the PEM is (my code hides the real value and passes through the adjusted value). The data it uses is just the tech known nothing else.

EDIT: So if this PEM concept survives the test of time, I will have to fix up the notification system because it is a hack to put the notification trigger in the PEM function itself.
 
Glider, part of the answer is that the bug originally wan't there on Civ V Vanilla release. I'm thinking it was introduced on or after the vanilla patch that doubled the number of levels of peace.

The weirder thing though is that in BNW if the AI has a much bigger force than you the AI refusing to talk to you at all is for a longer time than if you are about equal. This suggests they were actually aware of the issue by then but instead of fixing it directly (in the Lua) just changed the back end to make the AI less willing to talk at all when this was likely to occur.

Thanks, I'm going to put in an effort to try and fix it because to be honest, it is an embarrassment for me as a long time player of this game and pretty disappointing to see such a stupidity like that get through the Firaxis quality control.

What is most shocking is that the initial AI logic for this has been coded into the user interface, it does not come from the engine itself. So even the AI is unaware that it has made an offer like that :eek: It has got to be the hack of all hacks!

EDIT:
It is one of the reasons that there will be no way on earth I am going to buy BE on release. Firaxis have to be sent a pricing signal that we the players do not appreciate them closing down support of BNW before the issues were fixed properly.

Note: I better cut them some slack because when I look through the code on this, it is really complicated to understand and easy for bugs to creep in.
 
Thanks, I'm going to put in an effort to try and fix it because to be honest, it is an embarrassment for me as a long time player of this game and pretty disappointing to see such a stupidity like that get through the Firaxis quality control.

What is most shocking is that the initial AI logic for this has been coded into the user interface, it does not come from the engine itself. So even the AI is unaware that it has made an offer like that :eek: It has got to be the hack of all hacks!

EDIT:
It is one of the reasons that there will be no way on earth I am going to buy BE on release. Firaxis have to be sent a pricing signal that we the players do not appreciate them closing down support of BNW before the issues were fixed properly.

Yes, what that developer did with the lua there is equivalent to a bad web developer to an e commerce site making the price to an item an html hidden field in the form and then having the back end just read the price from the form and charge the customer that (times the quantity value.)

For myself, I felt like I was an unpaid Beta Tester for Civ V Vanilla when I needed to pick something with the Best Buy Gift card I got that Christmas.

---
Continuation of data points I've gotten in Beta 20
Turn 80: AI promotes itself to Deity + 2
Turn 90: AI promotes itself to Deity + 3 (Does that beat your personal record?)
Turn 100: AI demotes itself to Deity + 2
 
Deity +3! Yes that takes the record easily. I got up to Deity-1 maybe 2.

If you are playing an islands map, there is a possibility that you won't have to deal with the AIs massive PEM bonus because the AI won't attack you. I found that if the AI has a tech lead of 5 or more techs in the endgame, it has got a good chance at winning. On terrestrial maps, the fear factor makes the player back right off in tech to keep the PEM down. In my game, Iroquois were on 26 cities and me on five and they had me almost totally surrounded in cities.

I may have to bring in a bit of AIDeclareWarProb who knows.

The problem you will have on deity-3 is that the AI will become structurally powerful that won't be easy to reverse. It is going to have a massive population for example.

One possibility is that you might blow up the AI like a balloon and then burst the AI bubble later when the PEM drops. It is a bit like feeding steriods to an olympic athlete and then taking the steriods away and tell them they have to run the race without them. That could send the AI into a societal rebellion and revolution it could be interesting :)

EDIT: Deity 3 level is equal to -5 (normal deity) -3 = -8 :eek: -8 is one level more than what you used to play on this mod when it was -7 permanently.
 
One possibility is that you might blow up the AI like a balloon and then burst the AI bubble later when the PEM drops. It is a bit like feeding steriods to an olympic athlete and then taking the steriods away and tell them they have to run the race without them. That could send the AI into a societal rebellion and revolution it could be interesting :)

EDIT: Deity 3 level is equal to -5 (normal deity) -3 = -8 :eek: -8 is one level more than what you used to play on this mod when it was -7 permanently.

We're still way before the point that the per era modifiers got out of control.
And now that my beeline to Education is well underway I expect my tech lead to drop quite a bit.
 
Right I get you. You have turtled in tech and now are going to beeline which will temporarily make you look like you are teching slower.

EDIT:
If I am not wrong, I think what you are planning to do is to get the requisite science buildings in place, but under-utilise them except at strategic moments when you quickly need to tech up fast. If that is the case, good plan.

To anyone else reading this, you don't have to play that way if you want to start at a lower difficulty. Joncnunn is pioneering the way starting on immortal :eek: helped by EDIT: large islands.
 
Right I get you. You have turtled in tech and now are going to beeline which will temporarily make you look like you are teching slower.

EDIT:
If I am not wrong, I think what you are planning to do is to get the requisite science buildings in place, but under-utilise them except at strategic moments when you quickly need to tech up fast. If that is the case, good plan.

To anyone else reading this, you don't have to play that way if you want to start at a lower difficulty. Joncnunn is pioneering the way starting on immortal :eek: helped by small islands.

This is actually a Large Island script. My early game techs stayed really even on the tech rows. (My national wonder mod in action combined with local horse & stone resources.) However this particular map features my 3rd & 4th best dependable city spots on islands well away from my main island. (They are defendable because no one can reach them pre Astronomy without coming near my main land mass. Oh, and without this combat mod I'd have stolen a city site intended for the Portugal AI even with it also being near the Brazil AI. With not wanting to double my normal early game army and place half of them out there I merely stole the goody hut.

On Turn 120, I got notice that the AI had dropped to Deity +1.
I've reached turn 131, but no notice poped up so I guess it's still on this level.
And actually I managed to build a Great Wonder by default at this "Deity +1 level". The AI had skipped the Mas of H entirely and so when it was still available on turn 125 I took a shot at it.
 
Interestingly, deity +1 = -6 which is what you decided the PEM should be in your previous goes with this mod when the PEM didn't float. So the game tends to settle into what the player is used to I guess.

Problem is, that as time goes on, the PEM is going to start creeping up again not because of what you are doing, but that the small civs will start to progressively fall behind in tech and make you look better relative to the average. That might be mitigated by the fact that on island maps, wide playing AIs may not reduce civs to single city states making the smaller civs still tech quite well. I know you mentioned that AIs tend to eliminate them entirely, but I have seen them spared by the conquestors as well.
 
I've got a fix for the peace deal bug (ISSUE #1), which I will test out before releasing (will take a while). However I haven't got a fix for ISSUE #2 because as yet haven't come across a save game for it that I can use to test a fix with.

EDIT:
Problem is that the fix changes the lua for the user interface which means that other mods would knock out the fix.

Note:
I also don't fully understand what the bug report is between:

Issue #2: The A.I seems to have a cool-down of certain turns before opening the peace negotiation option even if it is threatening its entire existence it will refuse to negotiate until that period elapses.
Well I understand this can be for balance purposes/avoid exploits as in to prevent a bullying player from declaring war every 10 turns and extracting a tribute for peace. But there is a simple solution for this which is allow negotiations right away if the A.I is significantly weaker but have the A.I accept no less than a blank peace for the first turns of the war until the said cool-down period elapses.
Again this happens to me every game pretty much, usually when I declare war on a weak A.I without a conquest goal in mind and would like to offer blank peace, but the A.I refuses to negotiate and keeps suiciding his army and resources on me until that period elapses and it comes begging me for peace offering his wife and kitchen sink while I would have offered a blank peace had he allowed me

and this one:
The weirder thing though is that in BNW if the AI has a much bigger force than you the AI refusing to talk to you at all is for a longer time than if you are about equal. This suggests they were actually aware of the issue by then but instead of fixing it directly (in the Lua) just changed the back end to make the AI less willing to talk at all when this was likely to occur.

No problems, there is plenty of time to sort this out.
Chow.
 
I know you mentioned that AIs tend to eliminate them entirely, but I have seen them spared by the conquestors as well.

I should probably clarify this, while I see the AI that took their capital and other core cities satisfied and leaving the other one exiled in one or two low value cities on some other landmass, it also caused another AI sensing their weakness to go finish them off. Usually one that hadn't liked the victim earlier in the game.

This part could also be blamed on the victim even though they are down to 1 city continuing to denounce those that they don't like.

Edit: Shortly before I hit Education (2 turns before) I got notification that the AI is now down to "mere" Deity. I think that's the bottom point and it will increase back in difficulty shortly now that I have cheaper techs.

Leading AI was 2 techs ahead of me the turn before I hit Education and is now 1 tech ahead.
AI Maya & Brazil are dragging down the AI average.
 
I didn't stay on "mere" Deity for long, it quickly went back up to Deity +1 and then to Deity +2 as I backfilled techs to get to Printing Press.

Which does remind me, if you're concerned about one really good AI (in my game Iroquois) or a really bad AI (Maya) or either a human or another AI crippling one of them via reducing them to an involuntary OCC distorting the average there's a couple of possible solutions:

1. Throw out AI high & low and just average the remainder. Finding the highest & lowest number is a straight forward O(N) operation.

2. Instead of calculating the arithmetic mean, calculate the median instead. For an unsorted data set this small, quickest solution here would actually be reducing to sorting (even though that's an O (N log N) operation. (Of note here is that the fastest algorithms for finding the median in a large set of numbers start out by assuming that a random element number in the series is the median and then partially sort around it and in the process the correct median is discovered [if the input size is odd, if it's even it's one of the two middle values that's instead discovered])

Edit: More swings from the AI, went up to Deity +2 then down to Deity then up to Deity +1.
Irqouis built Forbidden Palace.
Brazil actually founded the World Congress (turned out Brazil & Portugal had been fighting Assyria [the one I didn't meet pre council] for a long time. Weird not being able to propose anything on the first council.
 
Thanks. Was definitely thinking along the lines of changing the PEM algorithm. Problem is that the 'mean' method helps to raise the PEM towards the end of the game without any additional code it is a very simple method. Raising the PEM towards the latter parts of the game is important because I think the relative efficiency of the AI compared to humans actually drops the more cities they have.
 
Yeah, it doesn't really need the combo of high & low thrown out nor a median.
It's possible that it might need the high AI (only) thrown out though.
(Take the average of all AIs EXCEPT for the AI tech leader)

Some interesting consequences of the mod, while on Immortal+ in base game if you were going to try to hand build a wonder at all you wanted to reach that tech early via beeline, with this mod, you also want to follow that up by while its under construction stay with expensive techs and wait for it to complete before backfilling with cheap techs. (For regular buildings and national wonders it doesn't matter so much) Unforuntately this if the first game in a long time in which I did not start with the ability to propose resolutions and so far the AI hasn't proposed a world congress project so I can't say how this will work in this game for sure, but I do suspect that if you want the gold prize you may want to be researching expensive techs at that time as well)

AI had stayed at Deity +1 (+/- 1) for a while, but the combo of 2 back to back RAs completing + Oxford giving me Radio + backfilling cheap techs has now bumped the AI up to Deity +3.
 
Exactly what I was thinking, throw out the high AI because we need at least one AI that is able to runaway in tech (I'll try that next version).

Yeah I like the new timing patterns in this mod. It is like a whole new way of playing this game.

Could you keep an eye out on the number of naval units the AI builds on your large islands map on deity 3? What we don't want to see are carpets of doom!

The AI values naval power at 1/2 land power. In my game the Iroquois were going for domination and had me surrounded with 26 cities. The problem for Hiawatha was that I had no cities on the coastline facing his coastline. So he conquered other AIs first but also built a massive navy (starting to resemble a carpet of doom) that he didn't know how to deploy (no obvious target).

EDIT:
AI had stayed at Deity +1 (+/- 1) for a while, but the combo of 2 back to back RAs completing + Oxford giving me Radio + backfilling cheap techs has now bumped the AI up to Deity +3.

I think you should consider delaying your RA syncronisation skills to quickly get techs. In this mod I think your skills at synchronising RA's are less emphasised as a mid-game skill and is pushed out to be an end-game skill. To me that is an improvement in game play (a skill that is used as a marginal gain right at the end rather than something always aimed at mid-game which essentially wins the game once you achieve it, but far too early).

What I noticed in my game is that for a science VC, the last 50-100 turns in the endgame are really interesting. That is because you are trying to sync RAs and pop great scientists at just the right moments to prevent the difficulty going up too much but also to enable a victory.
 
Top Bottom