New Beta Version - January 20th (1/20)

Status
Not open for further replies.
I love it. Feels so good to see the UA yield boost go up and up. Balance wise? Perhaps 1 culture/2 science, who knows?

it's actually +50% tourism from events now (25% more events from the bonus GPP progress and +20% per event)
"converges by geometric series test." Brings warmth to my heart.
 
I don't mean to detract from your work on the new release, of course! Always good to see a new release :D I'm just trying to understand the implications upon my somewhat hacky implementations :p

No worries, all questions very valid.

Do you mean the AI factors specific yields? Or, in non-DLL-understanding terms, looks at when the buildings produces any yield (or yield modifier?) and uses that to determine that the building is superior. This is helpful for Loyalty, if so, which adds to YieldModifiers but obviously the Loyalty yield itself would be unrecognized, so should if I understand correctly make the XP buildings a bit more valueable (as they produce Loyalty mods.)
Yes. All yields (for all yield types, including custom ones like Loyalty or Crime) are currently factored into a buildings value. Basically, the more yields a building has, the more valuable it is. Since all yields in the base game are 'positive' (i.e. beneficial), if I need to exclude 'crime' from this I can. Not a big deal to do.

But what if a building has a negative YieldModifier but which actually has a positive effect, which is the case with Crime and the Espionage buildings? I'd wager the AI would ignore this or, at worst, consider this a bad thing, in which case perhaps we can discuss a new flavour that helps the AI understand Crime a bit better (i.e. if is Crime high, it should pursue buildings with Crime flavour, with priority determined by the leader's value for that flavour). If this is possible (I don't know at all how the AI looks at flavours, so I don't know if adding new ones is easy, so forgive me if I'm considering too much), I can open an issue later.

Negative yield modifiers are not currently integrated, but I'll get to that before the next full release. Ones that 'positively' function with negative values (like plotculturecostmodifier, etc.) will be treated as positive functions.

If I need to write a custom crime function into the chooseproduction logic, I can. I have custom logic for CBP happiness buildings, so that shouldn't be too hard. Start a Github issue for what you need and we'll sort it out.

Somewhat related, does the AI factor flavours with a negative value? I know Health & Plague uses these to steer the AI away from Disease ridden Buildings which, flavour-wise, impact negatively upon Growth. I would probably do a similar thing with my Health & Disease, provided it would have an affect on the AI's decision-making.

Negative flavor values reduce an object's starting weight (sometimes to zero), which means that a zero'd value is passed into the 'sanity check' function (returning a zero). So yeah, negative flavors can and will reduce (or eliminate) a building/unit's possibility of creation.

The beta's system is still in development. The scaffolding is there, I just have more to do with it to make it better.

Here's a better breakdown of what is going on, for those who like crunchy behind-the-scenes stuff:

Prior to this beta, flavors defined everything for all 'decision' functionality in the DLL except for religious belief choice, specific unit selection for specific in-existence AI operations, and ideology selection (the latter only looked at happiness from policies, though). Flavors are defined by a few things at base: leader flavors and XML flavors. These base values were then inflated/deflated by: grand strategy flavors, economic ai strategies, city strategies, and military ai strategies.

Ilteroi and I had been chipping away at this for a while now (adding exceptions here, and 'if x, then y' functions there), but it was very fragmented and disorganized, especially in the 'chooseproduction' logic. So I've rationalized it by doing the following:

Chooseproduction:

For units, looks at geography, grand strategy, religious beliefs, war/no war, war type (land/sea), unit type, existence of certain economic/military/city strategies, need (i.e. no place to settle = no settlers) and city bonuses (free experience, free promotions, production modifiers, etc.).

For buildings, looks at geography, grand strategy, religious beliefs, war/no war, local terrain types, trade route options, tourism value at city, city/economic/military strategies, victory conditions, building yields/bonuses, and grandstrategy-specific bonuses (i.e. free votes or spaceship production).

For processes, looks at the yield value of the process and compares it to the city's deficient yields. Also, becomes available to puppets if you are in negative GPT and/or there's nothing else to build in the city.

For projects, looks at the grandstrategy value (i.e. apollo project), war value (nukes), and, for WC projects, the reward tiers (and personal value of said tiers to the player).

For Policies:


AI now looks at policies they've taken up to this point, as well as grand strategies (tying them to flavor types, but not flavor values). So policies with FLAVOR_OFFENSE are more valued by conquest grand strategies than others.

For Grandstrategies:

Now looks at policies (using same logic as policies themselves), national/local yields of yields that are specific to a VC (science for spaceship, production for conquest, culture for culture VC, etc.), religion, and some wonders (i.e. UN).

Again, the AI wasn't able to consider any of this before now. Flavors could, theoretically, push an AI in one direction, but it was largely listless (more like a sailing ship with flavors as the wind). Now they have a better idea of what stuff does and/or what they have 'acquired' over the game, so they're slightly more human in that regard. In other words, the AI isn't listing along, making each decision as if it is independent of all others – prior decisions now have a direct impact on future decisions.

I should note that I'm open to suggestions. If there's a part of 'human behavior' that I've missed, let me know. :)
G
 
I wasn't agreeing with you that the +1/+1 isn't interesting, I think it's perfectly fine.

I wasn't suggesting that you were agreeing with me. I said that I don't find +1/+1 interesting at all, and suggested a solution. I also said why I didn't find it interesting.
 
JFD, instead of having a Crime resource you could change it to Law (or Order, or Law & Order: SVU). So things that currently increase Crime in cities can instead decrease Law. And buildings/Wonders/etc that currently decrease Crime could increase Law. Since you have a positive "Law" value instead of a negative "Crime" value, the yields on the buildings/Wonders/etc would be positive numbers and the AI would be able to handle it better.

Of course that would mean a major overhaul to your mod, so maybe just ignore me.

EDIT: I'm assuming that the issue is that the AI looks only at positive yields. So, while a negative to Crime is a good thing, the AI just sees the negative and says, "No thanks!"
 
Negative yield modifiers are not currently integrated, but I'll get to that before the next full release. Ones that 'positively' function with negative values (like plotculturecostmodifier, etc.) will be treated as positive functions.

If I need to write a custom crime function into the chooseproduction logic, I can. I have custom logic for CBP happiness buildings, so that shouldn't be too hard. Start a Github issue for what you need and we'll sort it out.

G

Thank you! I will formulate a request this later.

The full explanation is much appreciated!

JFD, instead of having a Crime resource you could change it to Law (or Order, or Law & Order: SVU). So things that currently increase Crime in cities can instead decrease Law. And buildings/Wonders/etc that currently decrease Crime could increase Law. Since you have a positive "Law" value instead of a negative "Crime" value, the yields on the buildings/Wonders/etc would be positive numbers and the AI would be able to handle it better.

Of course that would mean a major overhaul to your mod, so maybe just ignore me.

A core component to it is the Crime breakdown - i.e. what constitutes Crime in your city; Violence, Heresy, Corruption, etc., with each corresponding to a city's yield and, if high enough, impacting upon that yield. This I couldn't do with Law. Plus I couldn't use the system to increase the value of Espionage buildings, as I'd need to shift any Law yield on my Magistrate's Court, High Court, etc., which functionally await Sovereignty.
 
After the incredible neglect Firaxis has shown it, it's kind of stunning to see multiplayer get as much love from Gazebo as it does. I appreciate it.
 
Does this mean the AI will actually advance now? I played a game on Prince and I don't think many of them even made it to the medieval era....
 
If there's a part of 'human behavior' that I've missed, let me know.
The only thing I can think of is this sort of situation:
I've gone Statecraft and so forth, but Alex is drubbing me in the World Congress. I have two options: 1) Kill Alex. 2) Change grand strategy.
How will the AI take into account other players' performance?
 
The only thing I can think of is this sort of situation:
I've gone Statecraft and so forth, but Alex is drubbing me in the World Congress. I have two options: 1) Kill Alex. 2) Change grand strategy.
How will the AI take into account other players' performance?

I rewrote this as well. Now the AI is more likely to switch strategy if they are losing to other civs that they believe have the same GS.

G
 
Puppet AI overhauled a bit, should be a bit more rational, build more things, and will also switch to processes (usually wealth) if you are in negative GPT or have nothing else to build
I guess Venice got buffed then. [pimp]
 
Hey G,

I don't know what is wrong with Mega, but I cannot download any files... I only see the M completing the red circle, and then it stays there, nothing else shows in the page...
 
I did, used Chrome and could download. But why all of a sudden Mega would get crazy with IE?

That's a pretty common Mega thing, sometimes it doesn't work with some browsers sometimes it doesn't work at all, usually solves itself within a few hours.
 
No idea.

Those of you currently running games: how's the AI doing?

G

I did not try the new one yet, but I can tell you this: while I was waiting for the fix to the medieval Warp engine, I decided to give Acken Mod a try... boooring! Jesus, man, you got me spoiled with your AI, I cannot even imagine how vanilla is if Acken's mod, that is well regarded, was so, so boring (and the AI is weak, compared to CBP's).

Will try as soon as I get some time. Hopefully no more warping archers? :lol:
 
Status
Not open for further replies.
Back
Top Bottom