Better AI Latest Version

You should post the latest build in the OP so people can instantly check for a new build, rather then having to scour the thread.

Even though the 1/29 build is available now, it looks like at a glance, the 1/25 is the current build. This will get more annoying as the thread grows, just simpler to post it in the OP or right below the OP in one of the reserved slots.
 
You should post the latest build in the OP so people can instantly check for a new build, rather then having to scour the thread.

Naah, just set up your account so that the most recent post is the first one you see when you enter a thread. Works like a charm. (Actually, I set it up like this because the old Better AI thread got so huge....) :)
 
- Added additional logging to MPLog for tracking OOS errors.

I am prob gonna test out a multi game tommorow and I didn't know there was a MPLog file(and where it would be located). Is there anything that needs to be done to enable it or just install the new build. And if there is an OOS error "hopefully not" would you want the log file and save(s)
 
You need to enable logging. Go to the Warlords folder in My Documents and CivilizationIV.ini, you need to set all the logging options (but particularly LoggingEnabled and RandLogging) to 1, that'll log everything.

If (when?) you get an OOS error, what we need, is MPLog.txt from as many players in the game as possible from that turn - that way we can compare the logs. Note that it is not needed for everyone to have logging enabled (you can still play) but the more people who have logging enabled and the more logs from an OOS event, the better.

We KNOW that there is still one or two OOS events which can happen - however we successfully (TOO successfully) bypassed them by reloading - we simply couldn't reproduce the OOS after reloading. So we judged the build as "stable enough" for MP testing, unfortunately the difficulty of reproducing the remaining OOS's makes them hard to track down - otoh you can actually play MP :).
 
New Build 1/30 on SourceForge.

Governor/Economy:
- Governor should manage being near the happy/health caps much better.
- AI's performing the missionary strat should train more missionaries.
- Minor tweaks to building economic buildings (should manage war better)

Military:
- AI should defend valuable cites more appropriately.
- AI should be smarter about razing.
- AI shouldn't dribble attackers so much.

Other:
- Barbarian Behaivour should be close to 2.08.
- Sea bombard crash fix.

this is SVN revision 333
 
Played with the 1/30 build last night as Tokugawa an a fractal standard map at Epic speed. Shared a medium sized island with Mansa Musa. Some thoughts...

1) Isabella was wiped out astonishingly early (I think by shaka). I don't think it was even 2000 BC and she was gone. Kudos.

2) Shaka is out to a huge early points lead, primarily on pop and power I think. He is a couple of techs up on me (as is most everybody), but it's not too much. I'm not sure if anyone will be able to catch him once all the wilderness is claimed.

3) Mansa Musa adopted an interesting strategy: I settled forward and he had room for only 4 cities. He began to build wonders like nobodies business (he had stone) and this kept him competitive in score and techs, despite his small size.

4) Mansa Musa's strategy did not account for the player being a total backstabbing psycho. We shared a religion and were on friendly terms very early on. I couldn't help myself though, his capital is a holy city of at least one religion and he built all of those wonders. I did feel bad.

5) Mansa Musa defended his cities with an excellent mix of units. I lost 5 swordsmen attacking a city with an axeman, a skirmisher, and an archer. It was on flat land with no walls. Other cities are more heavily defended (though not much)... Still I bee-lined to catapults which I think was an excellent idea. His defense levels are I think appropriate for the situation. We were on friendly terms after all. The only other factors might be that we had very close borders and that I was the human player.

Do AI civs know what the reputation of other AI's are? More importantly is there any way for AI civs to know what the reputation of the player is?

Also, I got an Infinite Loop assert this morning which I will post tonight with a save game and steps to recreate in the bug reports.
 
Haven't tried the new AI (yet). Hopefully this will address some of the issues I'm running into.

Recently put together a scenario. It's pretty simple -- more like a large-scale historical battle. The main CIV's start out at war. The problem I run into is that the AI becomes incredibly shy and defensive, whether I run one side or the other. One of the two CIV's has the larger and better army, and after capturing a couple of cities it just runs back to its starting point and hunkers down. That's baffling considering that a couple of minor CIVs are very weak and are just waiting to be conquered... The two main CIV's are set up with -100 in diplomacy. How to I make the AI more aggressive on the field???
 
Haven't tried the new AI (yet). Hopefully this will address some of the issues I'm running into.

Recently put together a scenario. It's pretty simple -- more like a large-scale historical battle. The main CIV's start out at war. The problem I run into is that the AI becomes incredibly shy and defensive, whether I run one side or the other. One of the two CIV's has the larger and better army, and after capturing a couple of cities it just runs back to its starting point and hunkers down. That's baffling considering that a couple of minor CIVs are very weak and are just waiting to be conquered... The two main CIV's are set up with -100 in diplomacy. How to I make the AI more aggressive on the field???

Assuming you have custom xml for your scenario, you probably want to edit the leaderhead xml. Change each leader's maxWarRand to a much lower number. A 50 means that every turn that conditions are sufficient for war, it will declare war. A 200 means a 1 in 200 chance every turn the conditions are right (mostly power comparison). If you want AIs to declare war quickly when they are more powerful, you could make this a much lower number. Making it a 1 would guarantee every turn that a war was possible, it would be declared. A number more like 20-40 might make sense for your scenario. Going lower than about 10 might be a bit too much and unnecessary.

Note, you could instead (or also), change the limitedWarRand or dogpileWarRand.

In addition, you might want to change the noWarRand for various attitudes, and the near and distant power ratios for war.

-Iustus
 
(...) Note, you could instead (or also), change the limitedWarRand or dogpileWarRand.

In addition, you might want to change the noWarRand for various attitudes, and the near and distant power ratios for war.

Thanks for all that information -- this will be useful. In this particular scenario, however, we have a major battle essentially. Everyone is already at war right from the beginning. What I want to see are CIVs that are way more aggressive on the battlefield. The situation is France 1940, with the Allies set for defense and the Germans poised to unleash their invasion.

There's some fighting on Turn 1. But on turn 2, everyone runs for cover rather than duke it out on the field of honor! How embarrassing! :lol:
 
Thanks for all that information -- this will be useful. In this particular scenario, however, we have a major battle essentially. Everyone is already at war right from the beginning. What I want to see are CIVs that are way more aggressive on the battlefield. The situation is France 1940, with the Allies set for defense and the Germans poised to unleash their invasion.

There's some fighting on Turn 1. But on turn 2, everyone runs for cover rather than duke it out on the field of honor! How embarrassing! :lol:


I bet its because it is an 'unexpected' war for the AI?

Im probably wrong :crazyeye:
 
Thanks for all that information -- this will be useful. In this particular scenario, however, we have a major battle essentially. Everyone is already at war right from the beginning. What I want to see are CIVs that are way more aggressive on the battlefield. The situation is France 1940, with the Allies set for defense and the Germans poised to unleash their invasion.

There's some fighting on Turn 1. But on turn 2, everyone runs for cover rather than duke it out on the field of honor! How embarrassing! :lol:

Ahh, you want to look at the leaderhead xml for attack odds change:
<iBaseAttackOddsChange>4</iBaseAttackOddsChange>
<iAttackOddsChangeRand>8</iAttackOddsChangeRand>

These both basically increase the tactical aggression (and optimisim) of an AI by increasing the percieved odds an AI sees for a particular battle. Every turn, an AI does a new random, and uses that optimism level for that whole turn. The number is added to every odds check. So, if an AI had an optimism of say, 20&#37; one turn, that would mean that it would consider an attack that really had a chance of 30% success, to really have a 50% chance of success.

The optimisim number is iBaseAttackOddsChange + random(0-iAttackOddsChangeRand) + random(0-iAttackOddsChangeRand)
(yes it does the random roll twice)

If you want them to be always optimisitic, just change the base number, if you want it to vary from turn to turn, change the random number.

The above numbers, 4 and 8 are for Alexander. By default, every AI has an 8 random, except for barbarians, which have a 16 random (only part of the reason why they can be so suicidal, barbarians also have special code that has them attack at much lower percieved odds). Less aggressive AIs (like Gandhi) have a 0 base add, while Napoleon is the most optimisitic, with a 6 base add.

Do not make these numbers too large, a small change will have a large effect.

I bet its because it is an 'unexpected' war for the AI?

Im probably wrong :crazyeye:

It should not be, wars that are created in worldbuilder get a correct plan (the one you have on the left is the one that does the declare, the other is the defender). I do not know how this translates into scenarios.

This would be easy to check, turn on chipotle, using better AI alt over the name in the scoreboard. If the war is lising as an 'unplanned' war, rather than total war, limited war, defensive war, or something else, then this could be part of the problem.

-Iustus
 
I see there is no new build. I didn't report an infinite loop because I was planning on down loading the new build. Anyway, the assert was while playing a standard game of Warlords, and not one of the scenarios.

Tonight I am going to start another standard game at the Warlord difficulty level and see what happens.
 
New build 2/09 on SourceForge

Governor/Economy:
- AIs will avoid anarchy when it would cause a strike, due to low gold
and negative foreign trade
- Commerce value increased
- Emphasize great people effect reduced
- Food growth value adjusted (3f 3h 1c should be preferred over 4f now)
- Emphasizing hammers or commerce increases value of growth
- Slavery conversion of food to hammers calculated precisely
- Hammers valued more when building a granary
- Small cities better account for future size when considering value of
buildings
- AIs should train and use settlers more effectively (expanding faster)
- Minor tweaks to other city production choices
- Commerce value adjusted when under extreme conditions
- 'Infinite' loop in governor fixed

Military:
- AI defensive units should sally forth from cities much more frequently
- Defensive siege units should be used more effectively
- AI will train more city defender units
- More UUs are considered good enough for an early rush
- Crush strategy will no longer prevent boats from being built
- Bug where stack would not complete its attack fixed
- Fogbusting units will travel home to get upgraded when upgrades available
- New vassals will correctly abort undeclared wars on both sides

Other:
- Network game "Out Of Sync Error" potential fix
- AIs should correctly choose whether to load a settler on a ship or not
- Redundant workboat issue fixed
- Some erroneous asserts removed
- Some Chipotle mode displays cleaned up

SVN revision 356
 
Top Bottom