New AI playing to win system

@Afforess: I imagine how much hassle adding 5 more xml values actually is will be directly proportional to the number of additional leaders you have in your BBAI-based mods :p
Doable of course and not really tragic but not necessary either.

Yeah, and RoM can have up to 100 leaders. So I know what I am talking about here. A few extra XML values is a small price to pay.

For new leaders the values still need to be specified, for games with the random personality option (where the personality of one leader gets paired up with the traits and civ of a different leader), things get different because the values defined by hand would stay unchanged while the calculated ones would change a bit according to the new traits.

Unless I misunderstand Random Personalities, the values for the victory strategies would get swapped too, because they are part of the LeaderHeadInfos. I fail to see how that would present a problem.
 
If traits play a role for Victory Strat values, and I was hoping they sometimes do even when jdog sets them manually, then they might not make as much sense when paired with different traits.
 
Victoria having a certain likeness towards Domination, Stalin having a certain likeness towards Space etc. sounds like fun, providing, of course, that it will have a meaningful effect while not completely hamstringing their playstyles.

What happens when the values contradict each other, though, like a 10 unitprob 500 warrand 90/90/90/100/100 warattitude leader who is told to be geared for Conquest/Domination?

The system is subtle at the beginning, but has a much stronger effect the closer the AI gets to victory.

What I think will make for interesting gameplay is exactly when a leader who normally is not a warmonger gets a dice roll that starts them on Conquest1 for a particular game. For that game their unitprob and warrand will be a little different ... not a lot, just a little. In this game they'll get a little nudge down the conquest path, and if the circumstances in the game make it so their foray into militarism works well, then they'll do it more. If it doesn't work out and they don't become a top power, then they won't start higher levels of the Conquest strategy and might instead decide they still look good for their normal approach of Culture or Space or whatever.

With this new system we can set the odds that a leader will play as expected or try something different.

jodg while you do this please include a "Turtle" stratagy for AIs that are low on military and are attacked. Currently they just flounder around, and send off attack stacks to die in the agressor's territory while doing no damage. They really need to just mass troops, specifically collateral damage units, and defend inside their own territory; and they should drop all other tasks when this occurs. This is particularly important for AIs that are going for cultural victory and are then backstabbed.

This is already in 0.90 :) Will have to make sure rebels never do it RevDCM though, or at least not until they have a city or two.
 
If traits play a role for Victory Strat values, and I was hoping they sometimes do even when jdog sets them manually, then they might not make as much sense when paired with different traits.

Traits and all other AI variables travel together. Even with Random Personalities the AI's don't have random traits, they take on the traits and all other AI variables from a random other leader definition in XML (with very low odds of picking themselves).
 
Yeah, and RoM can have up to 100 leaders. So I know what I am talking about here. A few extra XML values is a small price to pay.

Great, I'm glad you're on board!

I think it should be fun ... maybe not by the time you get to the 100th leader (!), but I had fun setting up values for the leaders last night.

Don't get started just yet though, I'm going to recenter the distribution as right now the AIs start two level 1 strategies on average ... I'm going to tune it down to 1.5.
 
Awesome, can't wait to see the turtle strategy in effect in RevDCM. This will adress the second biggest problem with the AI (the biggest being the lack of city specialization, as this totally hampers the AI's economy when compared to a human, using national wonders correctly is a huge part of Civ4). Have you tested it out yet, how does this effect warmongering AIs?
 
Traits and all other AI variables travel together. Even with Random Personalities the AI's don't have random traits, they take on the traits and all other AI variables from a random other leader definition in XML (with very low odds of picking themselves).
I'm not saying random traits, I was actually under the impression that even under random personailities, traits still stick to the leader name and are not randomized at all. At least every screen is telling me Toku is still Agg/Prot and Frederick is still Phil/Org, is that simply a lie? Then that needs to be adressed somehow.
It didn't cross my mind yet that this info could simply be wrong, I always thought the rest of the AI variables get changed while the traits stick..
 
I'm not saying random traits, I was actually under the impression that even under random personailities, traits still stick to the leader name and are not randomized at all. At least every screen is telling me Toku is still Agg/Prot and Frederick is still Phil/Org, is that simply a lie? Then that needs to be adressed somehow.
It didn't cross my mind yet that this info could simply be wrong, I always thought the rest of the AI variables get changed while the traits stick..

Your confusing XML traits and the traits each leader has. XML traits always stay with a leader, even with random personalities, mostly because they don't affect how leaders act.

The actual XML values that control how the AI acts are in the LeaderHeadInfos, and those all will be swapped (excepting art and name) with Random Personalities.
 
Ok then I am not confusing anything. I was hoping the traits each leader has (Phil/Agg/Prot/Cre/Fin/etc) would now actually affect how a leader acts, by having an influence on how jdog distributes the VC strat values. If they don't then nvm.
 
Okey, I wonder. How will the system work when only one victory condition is selected, for example only 'Conquest'? Will the AI's go straight into level 4 mode for conquest or will they just do level 1 and 2 until midgame and then go for level 4? And if they do, will that be a problem?
 
How could you actually tailor the AI to diplo? Make it gift techs and try to run other people's favorite civics?

Diplo takes a lot of predictive ability + long term planning, which is not something our brute force calculation friends show as a strength :p.

Overall though this looks like a very interesting change that could drastically improve the AI.
 
I came searching for exactly this, sounds great! :) Any idea when it will be ready - or still a while off?

A development version will be up in a few minutes, the AI selection of what strategies to run is fully implemented but not all of the intended effects of the strategies have been implemented. More details when the devel version is posted.

I was hoping the traits each leader has (Phil/Agg/Prot/Cre/Fin/etc) would now actually affect how a leader acts, by having an influence on how jdog distributes the VC strat values. If they don't then nvm.

Absolutely traits played a big role in how I picked where leaders fell in the distribution.

Okey, I wonder. How will the system work when only one victory condition is selected, for example only 'Conquest'? Will the AI's go straight into level 4 mode for conquest or will they just do level 1 and 2 until midgame and then go for level 4? And if they do, will that be a problem?

Having only conquest enabled currently doesn't change how the AI selects whether or not to run conquest 1 and 2, or when to start 4. It does mean that the AI won't run another strategy of course. So, in terms of AIs going for conquest it wouldn't be too different from a game with all victories enabled (until the later parts where AIs who would play towards Culture or Space would instead play normal).

Running "Aggressive AI" makes all AIs more inclined to pursue Conquest and Domination, so if you do want to see the AI really go all militarily, that's the way to go.

How could you actually tailor the AI to diplo? Make it gift techs and try to run other people's favorite civics?

Diplo takes a lot of predictive ability + long term planning, which is not something our brute force calculation friends show as a strength :p.

Overall though this looks like a very interesting change that could drastically improve the AI.

Yeah, how to go for diplo is not easy to figure out. The most obvious thing is for these AIs to target the techs which let them build the wonders, because if they build the wonder they are on the ballot. Beyond that I'm not really sure yet ... starting war only against poor relations will definitely play a role. Maybe paying more attention to attitudes of third parties for open borders and other trades. Favorite civic matching is an interesting one, gamey perhaps but could be effective.

The AP resident has more interesting options, like setting a vote on a group war against a player who won't vote for them.

If anyone has ideas, I'm all ears.
 
Yeah, how to go for diplo is not easy to figure out. The most obvious thing is for these AIs to target the techs which let them build the wonders, because if they build the wonder they are on the ballot. Beyond that I'm not really sure yet ... starting war only against poor relations will definitely play a role. Maybe paying more attention to attitudes of third parties for open borders and other trades. Favorite civic matching is an interesting one, gamey perhaps but could be effective.

The AP resident has more interesting options, like setting a vote on a group war against a player who won't vote for them.

If anyone has ideas, I'm all ears.

Espionage-> forcibly switching religions & civics may help for Diplo victories.
 
Absolutely traits played a big role in how I picked where leaders fell in the distribution.
And that was what I was criticizing. These traits (CvPlayer::hasTrait(TraitTypes eTrait)) will stay with the leader name where everything else gets swapped with Random Personalities, so the personality of one leader, including initial victory strat odds, get paired up with a different leader's 2 traits that might not be cut out that well for the same victory strats.

Am I still not making myself clear? :crazyeye:
 
You've been clear, but I just don't think you understand the other side of the argument. This victory logic is part of the AI personality, and it, like other personality traits will swap if random personalities are switched. This is how it should be. You disagree, but from my perspective you are dead wrong here; the AI's preferential victories should be part of the roleplaying personality.
 
I can understand you, phungus, when you say it's all about roleplaying.
I still think it's weird that on the one hand, "traits played a big role" in how jdog picked strat values, yet on the other hand nothing changes if these traits are repaced by completely different ones; looks like a double standard.
 
Well, economical traits are quite useful for military victories. The only cause of traits not fitting the playstyle that can arise is AI's with militaristic traits deciding to play very peacefully.
 
Yeah, how to go for diplo is not easy to figure out. The most obvious thing is for these AIs to target the techs which let them build the wonders, because if they build the wonder they are on the ballot. Beyond that I'm not really sure yet ... starting war only against poor relations will definitely play a role. Maybe paying more attention to attitudes of third parties for open borders and other trades. Favorite civic matching is an interesting one, gamey perhaps but could be effective.

Speaking of gamey but effective, one of the easiest ways to win diplo is to get #1 in pop (not by much, even just barely like ~25% is fine) and then gift mass media to some chump to build the UN, such that the #2 in pop civ will vote for you. It's very possible to win with ~25% pop and only 2 other AIs voting for you this way.

Having the AI not declare war on people's friends would be an interesting approach. Having it gift to +4 fair trade, gift a resources (eventual +2 resource supply), and match favorite civics with AIs that are below +8 net but pleased are things that could help the AI pursuing diplo.

I actually recommend against training the AI in the AP metagame because the AP is broken. Making it build it in an obscure religion and then only spread to more than 1 city for civs that like them would cause the player to insta-lose on occasion. Humans do this and then stop it after a few games because it tends to get boring ;).

If you can get the AI to pick a probable opponent and probable civs that would vote for it with some degree of accuracy, you could make a contender for UN victories.
 
Top Bottom