A Better AI.

I have been playing some multiplayer games with the lastest better ai mod and have been getting OOS errors, i can't remember the last time i got these except way before the official patches. I dunno if the mod can cause it or not. maybe its just a streak of bad luck or something but just wanted to check.

the latest one happened when the other player took over an AI, who was the victim of a very good AI dagger strategy. after he took it over it happened almost every turn after each of us taking turn reconnecting.
 
If we have a more attacking strength than the enemy has defending strength, then attack. (outnumbering the enemy)
If we have less defending strength than the enemy has attacking strength, then run away. (outnumbered/outgunned by the enemy, stick together for safety)
If we have more defending strength than the enemy has attacking strength, then pillage. (longbows in a city on a hill but no counter units)


However I would still question whether it's better to pillage than to just go away and hope the enemy lets their guard down a bit... it could be based on whether it's war for profit vs war because i hate you....

First of all, I have to agree with you that a massive pillaging strategy is not very effective. It usually costs more units than it returns in money or hurts the enemy. Single suicide pillagers can only be really usuful when used against strategic resources. In general I pillage 0 non-resource tiles in my games, so you can see that our valuation of the pillaging strategy is similar.

The problem here is that a good strategy for a human player and a good strategy for the AI is not necessarily the same. The AI will never adjust its strategy so when a player learns that the AI will not pillage in certain situation, then the human player can dig in and just defend the city.

Also, a human player is far better than an AI at attacking cities. And allthough you will surely make it very able at attacking cities (you're already doing that), I doubt it will become as good as a decent human player. It just cannot guess the number of units that are needed as accurately as a human can. Thus the AI will have to retreat from cities more often and its stacks will be destroyed near enemy cities more often.

So as the AI will regularly fail to take cities with its stacks, it should pillage the enemy cities when it sees that it can not take them. In the larger picture, that will typically be a sound strategy. It should of course never pillage a city that it can take that turn with the attack stack. When the AI retreats an attack stack from a city, it should also use its fast units to pillage on the move (if we can't take it then we'll burn it). In that way it can keep the stack together and still do some damage while retreating.

By the way, it's great to see such dedication to this project that you're working on it during the holidays. :goodjob:
 
[edit] A question or two: The power rating values (ie, 305 (460)), when considering max nearby power ratios and what not, is it using the vassal/defensive pact combined power rating (the bracketed value) or the normal power rating? In the game, it looked like it used the combined power rating but I didn't think it did this.

The war check is our team power (counting vassals) vs their team (counting vassals) and all its defensive pact partners and all their vassals.

Both numbers are displayed in the chipotle stuff.

-Iustus
 
Hi guys,

Here's another. Compare what tiles are being worked (forest + grass mine) to what it could be working (farm + plain mine on river). Same food count and same hammer count, but we're missing out on 2 commerce....

Wodan

can you post a save?

-Iustus
 
First of all, I have to agree with you that a massive pillaging strategy is not very effective. It usually costs more units than it returns in money or hurts the enemy. Single suicide pillagers can only be really usuful when used against strategic resources. In general I pillage 0 non-resource tiles in my games.

For me at least this isn't true, especially if I axe rush. Wich Monty and others regularly do in the latest builds. If I axe rush, and see that I can't resonably take a city I just start burning Towns, and Villages, and specifically target Strategic Resources and Mines. This does 3 things. First it cuts off the enemies Metal, so he can't field axes of his own, and it sets back their economy, so I can build up Sword Stacks (and if necessary Catapults) to hit later that meet limited resistance. Finaly it gives me a limited amount of $$$ I can use to fund my war, so I'm not so hurt while I have a couple stacks rampaging around in enemy territory. I never mess with fams or cotages though, just Towns, Villages and mines. Farms and simple cottages just arn't worth it $$$ wise, and I'm only really concerned with killing my enemies Commerce and production, so Strategic Resources, developed Cottages and Mines are all that's really worth it to hit. A few turns later then you can head up with your Sword Stacks, and begin taking the Cities.

This is why I was curious if the AI can switch it's warstance. Chipotle always shows the AI in a Defensive war, Total War, or whatever, and I never see the AI switch it's stance. I could be wrong but I always thought the warstance was tied to the AI's warring strategy. For the AI to become a decent warmonger it'd help immensly if it could switch it's strategy based on what it can "see" is practical.

Basically I have 3 questions. Is the AI warstance tied to it's war strategy? Can the AI switch it's warstance mid war if so? Would this give the AI more depth in it's ability to warmonger, if it goes for a domination win?
 
Thanks Blake! Ever since a couple of months after the game's release, this (the AI) is where I've wanted modders to focus and now it's finally happening. You have my gratitude and I wish you all the best on this monumental task!:goodjob:

I especially like the improvements you're making to things like the city govenor and automated workers. I hate the micro-managing I do in each game, but I never automate things because the script's decisions are too pathetic. Situations like Wodan's (post 1135), where automated citizens work sub-optimal tiles, should never happen.

On other matters...

Chazcon said:
If you picked 20 different real Civ4 players, identified their playstyles, and coded it into the AI, you'd really have something.

After all, the best AI would be random and unpredictable, including making mistakes, but have an overall 'style' or major goal in mind, and emulate a human as closely as possible.

I'm of a similar opinion to Chazcon. Eventually I'd like to see AIs in each game use a random, unique play style that changes from game to game, but I do concede this may be something which never leaves the pipeline. I like the fact that already many of the AI decisions are made with a random element in them.

The only suggestion I can make at this time is to make sure the new AI tactics don't become just as predictable as the old ones, even if they are more effective. Occasionally the AI should try something the player doesn't expect, despite it being higher risk. Sorry I can't put this in more concrete terms but I'm sure you understand what I mean.
 
I've really been enjoying the mod and I have been using it with my friends when we play mp over a lan. So far we haven't encountered any problems with sync or crashing until today. For some reason the game keeps crashing at this point, and the windows error code points to the mod .dll file.

I don't really understand any of the programing, but I've attached a save file if that helps. In the save I was Cyrus and the other human player was Ramses.

http://forums.civfanatics.com/uploads/67793/AutoSave_AD-1268.CivWarlordsSave
 
from waht i've noticed, expansive civs will recalculate the worker's cost after closing the screen a lot of time, as in, it is re-jiggering the worked tiles once it gets the build order in.

the same holds true of settlers and imperialistic civs ~

this might not hold with the new patch (1221), but it could be

I think you misunderstood the screenshots. It doesn't have to do anything with a calculation error. It has to do with the governor not using the optimal tiles. And it will not pick different tiles after I've closed the city screen. The standard governor should pick the forested plains hill and not the grassland corn tile. It makes a difference of 8 turns in building speed for the worker, 15 instead of 23 turns for the first worker. That's a huge difference.

What do you mean with "it is re-jiggering the worked tiles once it gets the build order in.". The game instantly calculates the production cost of a build and instantly pickes different tiles if those would be better for that build. I've never seen it take a while before the used tiles change. The AI-algorithm just pickes sub-optimal tiles in this case.
 
I agree weighting for pillaging should be:
1.) Strategic resources
2.) Towns / Mines (don't know which is more important,about same)
3.) Other

I still think stacks should be kept together while doing the pillage because it would be more problem to re-gather the stack afterwards not to mention split-up it's more dangerous, defender units arriving the front can catch them easily.
Though i may be wrong.
 
I agree weighting for pillaging should be:
1.) Strategic resources
2.) Towns / Mines (don't know which is more important,about same)
3.) Other

I still think stacks should be kept together while doing the pillage because it would be more problem to re-gather the stack afterwards not to mention split-up it's more dangerous, defender units arriving the front can catch them easily.
Though i may be wrong.
Once the number of speed 2 pillagers gets to a certain point it becomes hard to clean them up, until you have railroads. After railroads, pillaging isn't a viable strategy (as a rule) until gunships.

So I'd say go ahead and let the horse-drawn units go nuts on resources and towns - separately - if they're not critically needed.
 
Once the number of speed 2 pillagers gets to a certain point it becomes hard to clean them up, until you have railroads. After railroads, pillaging isn't a viable strategy (as a rule) until gunships.

So I'd say go ahead and let the horse-drawn units go nuts on resources and towns - separately - if they're not critically needed.

OK it might be way faster.

Another thing i thinked about is maybe it would be useful to sum up the units of all the allied civs thats sent against the city too when evaluating attack on the city to avoid each civ sees that in itself they cannot capture the city so all would pillage the city then leave though together they could easily take the city.

The worst is probable that we can see a lot of times that attackr stack just sits around without doing anything :)
 
Wodan said:
Hi guys,

Here's another. Compare what tiles are being worked (forest + grass mine) to what it could be working (farm + plain mine on river). Same food count and same hammer count, but we're missing out on 2 commerce....

Wodan
can you post a save?

-Iustus
Unhh yeah I guess so. Look at Hamburg... just click on the citizen automate button and compare.

Wodan
 
The war check is our team power (counting vassals) vs their team (counting vassals) and all its defensive pact partners and all their vassals.

Both numbers are displayed in the chipotle stuff.

-Iustus
Is the <vassalPowerModifier> (in the leaderheadinfos file) factored into it in any way? Warmongers like Napoleon, Julius and Genghis all have higher vassal power modifiers and leaders like Gandhi and Mansa have negative vassal power modifiers. I am wondering whether this modifier affects that bracketed value. If so, then these warmonger do benefit from vassals quite a bit (Genghis being the most, as his value is set to 50%, whereas the other conquerors are at 20%). I have noticed that the vassal power modifier does seem to affect the code related to whether it will capitulate or not, but I don't know about whether it also affects the total vassal power (team power). Do you kow if it affects the team power rating?

I second that. For Ghandi it should be unlikely, for peaceful leaders it should be somewhat random and the mongols should burn anything they can.
Yeah, it's strange not seeing the Mongols pillage and burn. In my latest game, the Mongols attacked Monty. There was no pillaging, but he razed a city rather hard (I think from memory it was a good city). Monty sued for capitulation. I think certain warmongers are much more 'vassal powered' (once I figure out exactly what that entails) in that they benefit more from having vassals. In that sense, pillaging and razing isn't such a bad strategy for them I guess, especially if it ends up in gaining a capitulated vassal.
 
I'm also experiencing this. It definitely doesn't approve of 18 civs.

EDIT: something else I noticed - in the past, when you told a unit to explore, if it was attacked and took damage, it would halt to heal and then continue exploring. Currently (not sure when this behavior started to occur), if an exploring unit takes damage, it continues to explore without healing. Is this deliberate?

Infact, it seems to be map type that affects this. I can start a pangea 16 civ game, but not fractal 16 civ. Any word? (2gig ram 2.2ghz Athlon3200XP Radeon 9600 256MB) CTD at loading screen, during "World Initialization" or whatever it is in English.
 
I just discovered Persepolis, a huge size 15 city in 355BC. But the terrain surrounding the city is almost completely irrigated. And that is really not necessary to produce enough food as the city has 2 food resources in the fat cross. Wouldn't it be better to create a number of cottages on those rivers? Persepolis could have been a great commerce city by now while still maintaining a decent rate of production by using the mines.

(Game settings: emperor level, epic speed setting, huge continents map, aggressive AI, no city razing, city flipping after conquest, require complete kills. Victory conditions: time, conquest.)

By the way, it's great that the AI managed to create such a huge city. I don't have the happiness or health to create such a city.

See the screenshot below (build 21-12), I've also attached a second picture without the units for easy viewing (toggle bare map option).

Farms
Farms 2
 

Attachments

  • Farms.JPG
    Farms.JPG
    152.7 KB · Views: 105
  • Farms 2.JPG
    Farms 2.JPG
    176.8 KB · Views: 118
The fact that the AI tends to over-build farms at the expense of cottages is well-documented. Wouldn't it be nice if the AI specialized it's cities? Now, there would be a challenge! If I ever get caught up, it's one of the things I'm thinking about...

At some point every nation will have been modded, every unit anyone can think of, every little tweak to the game...except the AI. I feel that the area with the most room to grow is the AI, and I can't wait to see where it eventually goes.
 
I have a fairly weird crash bug which I believe is caused by the better AI mod. I say this because when I remove the .dll from the Custom Assets folder the crash does not occur. To reproduce, just load the attached save and right click on Nanjing to try and move the selected stack into it.

Darrell
 
I just discovered Persepolis, a huge size 15 city in 355BC. But the terrain surrounding the city is almost completely irrigated. And that is really not necessary to produce enough food as the city has 2 food resources in the fat cross. Wouldn't it be better to create a number of cottages on those rivers? Persepolis could have been a great commerce city by now while still maintaining a decent rate of production by using the mines.

Go into world builder and see if the AI is running a SE in Persopolis, rather then a CE. The AI might be doing better then you think.
 
Cyrus has a flavor preference for building farms.

Thanks for the crash save darrelljs, it crashes for me too.

Units not healing while exploring has been fixed.

Um next build has lots of stuff fixed. Close starts, gone, greenland starts, greatly reduced. Stupid long distance wars, staked through the heart (I hope), AI should defend itself better. New wonder building logic which leaves little to chance - if the AI can snag a wonder, it will tend to. The AI will pillage some too, not much, mainly targeting strategics. It should promote it's units better, following promotion lines... and more stuff :).
 
I am playing with the 12/21 patch as Ragnar, standard settings Warlord, Noble difficulty (after a Monarch game involving interminable hours of killing dozens of units landed by Napoleon ...).

I found a lightly-defended size 11 city belonging to Brennus, landed, and took it with two berzerkers and a knight. While I was waiting for reinforcements to arrive by sea, a group of about 8 units belonging to the former owner showed up next to the city. My mental arithmetic told me the city would be taken so I figured I'd abandon it and come back for it in a few turns when I had more units. So I evac-ed ....

Turn passes, the city is still mine.

Why didn't the AI retake its empty city? It had a couple of longbows in the attacking stacks that would have made it difficult to retake.

So at that point reinforcements did arrive and I moved them in, and I suppose I have a toehold now, for no reason that I comprehend.

Brennus is at war with Monty (who is larger) and maybe the AI really really wanted those units somewhere else, but I can't quite believe that.
 
Back
Top Bottom