View Full Version : Is BetterAI really better? Let's find out


dizzygreen
Sep 26, 2009, 11:01 AM
Let's play a BetterAI game together! Yes some parts of it are already in 3.19 but there are some exciting new developments:


Code optimizations that reduce between-turn waiting by ~20% (not just for BetterAI, similiar code optimizations are available for regular BTS 3.19, search for "CAR mod" if you're interested)

Two BIG BTS bugs are fixed:
1. Workshop/cottage endless cycling by AI workers
2. Fixed major bug where AI only builds HALF of the # of workers that it calculates it needs.

if (iNeededWorkers < iExistingWorkers)

is changed to

if (iNeededWorkers > iExistingWorkers)

No kidding!

Because the AI techs faster now, some moderate global tech throttling has been implemented. Basically, all medieval techs are 4% more expensive, industrial techs are 8% more expensive, modern techs 12%, future techs 12%. This applies to everybody (human and AI). If you don't like that you can turn it off easily but let's leave it on for the purpose of comparison.

Of course, the soul of BetterAI is war strategy. I won't say it's improved because that is up to debate, but it is certainly different and worth experiencing.

The settings are:

Big and Small (islands mixed in)
Standard size
Normal speed
Monarch difficulty
All victories

And we will be playing as Victoria of England. I think this is a fairly strong leader that most players are probably familiar with, good at warmongering or peaceful playing. The difficulty is Monarch because I hope this will attract the greatest number of players.

EDIT There is an Immortal version of the save posted by Soirana below.

The goal is to have fun, learn a little, and most importantly to answer the question: "Is BetterAI really better?" Clearly one game is not enough to come to any conclusions, but I do think it'll be interesting to hear if people find the game to be more or less difficult than the typical Monarch game.

BetterAI can be found here. (http://forums.civfanatics.com/downloads.php?do=file&id=9819)

For those not familiar with mods, the download is a ZIP file that you extract to your Beyond The Sword/Mods folder. It won't affect your regular installation. Just start BTS up normally and chose "Load A Mod" at the title screen.

Good luck and have fun! I'll be weighing in at the standard 1 AD, 1000 AD checkpoints but anyone is welcome to post whatever they like.

And the start position...

TheMeInTeam
Sep 26, 2009, 12:41 PM
I was a little harsh on betterAI at first, but then I found out that the reason they didn't seem too impressive was that the people who actually writing it weren't in the thread yet :lol:. I'm actually going to try this. Jdog's work on the code and his activity in that subforum has really impressed me. I want to see how far along this project has come in about a year since I've played...and if it has CAR it might actually tax my system less so it's worth a try.

civ editor11
Sep 26, 2009, 12:58 PM
The AI doing quite well in 1200 AD. Do you have raging barbarians on? The barbarans have been destroying all of my work boats so I haven't been able to grab the crab resource. The AI's doing quite well there doing better than me in technology and possibly military but I'm catching up.

Ignorant Teacher
Sep 26, 2009, 03:09 PM
I think I'll try this too.

Grashopa
Sep 26, 2009, 03:57 PM
Since I've been wanting to start a better AI game series I'm definitely in on this. I've been waiting for this release after the cottages thing got fixed and after reading jdog's post about the workers I realize it does hamper the AI - though it also allows them to expand faster.

I think war is considerably improved and enjoyed the mod simply from naval warfare.

Izmir Stinger
Sep 26, 2009, 10:26 PM
Well, I've played 24 turns and I tried a common tactic used to "game" the standard AI because A) In a normal game, it would be a good move and B) Testing out the "better" AI's behavior is kinda the point of this game, isn't it?

I worker stole from Hannibal. He reacted in exactly the way they normally do. I was moving my warrior to a forest to hunker down and stasis him, but Hannibal finished a third archer while he was still on a hill adjacent to the city. He has 3 to 1, so he attacked, just like the regular AI does, and he lost by a fluke (should have had favorable odds). My warrior was badly damaged (10 HP) and if another archer attacked they would have certainly won. Even if there was another fluke, the city would still have had a defender. But no... the remaining archers stayed right were they were, just like the normal AI does. Two healthy archers covering in the face of a single strength 0.2 warrior. I could have promoted the warrior and stasissed him for a while but I wanted to explore south of him and Hannibal had another archer was blocking the safe return of my captured worker (yes, he has as many archers as I have warriors, yet he won't attack), so I asked for peace and *Dun*Dun*Dunnnnnn* I got it. He lost two units and I lost none, so he was loosing, right? If he had been taken over by a human player the turn before that peace treaty, he could have destroyed me in 20 turns. As far as I can tell, he did exactly what the regular AI does.

I know I'm being a little harsh - this is after all just a microcosm of the problems plaguing the normal AI, but I have another non game-spoiling gripe. I saw I was loosing money and went to check my Financial Adviser to see what my free unit cap was, and it wouldn't open. Domestic, Financial and Military adviser screens are a no go. What is up with that? Did the new AI steal my advisers from me to level the playing field? Not really what I was expecting, but it will help them a little bit. I'm going to have a hard enough time playing without BUG. BTW, are you BUG compatible?

Am I missing some kind of replacement adviser screen built into the mod? If there is one, why are the regular buttons still there and non-functional?

I'll keep playing, and post snapshots, but it looks like there are some kinks to work out.

Ignorant Teacher
Sep 26, 2009, 10:48 PM
Izmir, wait until they start to get their vassals. You'll see the difference.

Lone Wolf
Sep 26, 2009, 10:54 PM
The most noticeable improvement in BetterAI is naval invasion AI.

Ignorant Teacher
Sep 26, 2009, 11:02 PM
The most noticeable improvement in BetterAI is naval invasion AI.

And the end of the lovely "Let's build a workshop over a town and a cottage over a workshop two tiles away" feature. :)

Izmir Stinger
Sep 26, 2009, 11:12 PM
Sounds like fun. So I shouldn't expect my neighbor to the east to react much differently to what is about to come his way? He doesn't like... know... already does he? Not sure how he'd prepare for it even if he did know.

And what is with these adviser screens? Please... advise.

Powerslave
Sep 27, 2009, 02:29 AM
I've been using Better AI ever since Blake started the project, years ago.

It's an amazing difference. Just playing on Monarch can be challenging, if the AI gets a good enough start. I suppose the human will always win every war, but the AI plays a very good peaceful game.

TheMeInTeam
Sep 27, 2009, 03:00 AM
I've been using Better AI ever since Blake started the project, years ago.

It's an amazing difference. Just playing on Monarch can be challenging, if the AI gets a good enough start. I suppose the human will always win every war, but the AI plays a very good peaceful game.

I don't know, there are some pretty good "screw you" canned strategies that could allow the AI to compensate for its lack of tactical thinking:

1. A row of 10-20 horse archers that don't stop at all (or not until the stack is sufficiently weakened), and raze every city captured.
2. Amphibious razing invasions, that out-run inland troops and only attack when city capture is likely.
3. Large amounts of units to which you have no counter due to lacking a resource
4. Increased dogpile chances (would also work against other AIs).
5. A built-in choke+pillage DoW.

Even executed poorly, it would be hard to fully prepare for these and if they caught one by surprise they'd be total screw jobs.

Soirana
Sep 27, 2009, 03:20 AM
maybe i will try [if i can live without BUG that is]

reconverted save to immortal level as i do not think AI can be smart enough to cause problems at monarch.

dizzygreen
Sep 27, 2009, 05:34 AM
@civ editor11 Raging barbs is off

@izmir Do you have BUG installed in \customassets? I haven't noticed the advisor screens issue. betterAI can be used with BUG but they need to be merged (someone is usually nice enough to post a merged copy of the mods but there isn't one yet for 0.81M)

@soirana Thanks, I had originally wanted to post a save where people could pick what difficulty level they wanted but wasn't sure how to do that. Seeing as there is somewhat of an all-star lineup playing along, it would be cool (if you haven't started yet) for the advanced players to play at their regular difficulty level.

r_rolo1
Sep 27, 2009, 10:48 AM
Well, I've played 24 turns and I tried a common tactic used to "game" the standard AI because A) In a normal game, it would be a good move and B) Testing out the "better" AI's behavior is kinda the point of this game, isn't it?

I worker stole from Hannibal. He reacted in exactly the way they normally do. I was moving my warrior to a forest to hunker down and stasis him, but Hannibal finished a third archer while he was still on a hill adjacent to the city. He has 3 to 1, so he attacked, just like the regular AI does, and he lost by a fluke (should have had favorable odds). My warrior was badly damaged (10 HP) and if another archer attacked they would have certainly won. Even if there was another fluke, the city would still have had a defender. But no... the remaining archers stayed right were they were, just like the normal AI does. Two healthy archers covering in the face of a single strength 0.2 warrior. I could have promoted the warrior and stasissed him for a while but I wanted to explore south of him and Hannibal had another archer was blocking the safe return of my captured worker (yes, he has as many archers as I have warriors, yet he won't attack), so I asked for peace and *Dun*Dun*Dunnnnnn* I got it. He lost two units and I lost none, so he was loosing, right? If he had been taken over by a human player the turn before that peace treaty, he could have destroyed me in 20 turns. As far as I can tell, he did exactly what the regular AI does.

I know I'm being a little harsh - this is after all just a microcosm of the problems plaguing the normal AI, but I have another non game-spoiling gripe. I saw I was loosing money and went to check my Financial Adviser to see what my free unit cap was, and it wouldn't open. Domestic, Financial and Military adviser screens are a no go. What is up with that? Did the new AI steal my advisers from me to level the playing field? Not really what I was expecting, but it will help them a little bit. I'm going to have a hard enough time playing without BUG. BTW, are you BUG compatible?

Am I missing some kind of replacement adviser screen built into the mod? If there is one, why are the regular buttons still there and non-functional?

I'll keep playing, and post snapshots, but it looks like there are some kinks to work out.
Well in defense of the developers of BBAI I need to post some wise and informed words of other posters, one of them being a well known beta tester of civ IV ( among other things he actually made the drafting charts for the game ) and other a very good player with a high degree of code knowledge ( ppl with both skills aren't so easy to find :p )
I can't ever forget the discussion we had back in pre-release testing, where Soren Johnson ( note: Soren was the chief of the Civ IV team in Firaxis until Warlords, in case you don't know ) explained that he could program the AI to defend against early rushes, but he would have to break the game for normal play in order to do so. We agreed at the time that it was better to leave things alone, and trust players not to exploit the AI's shortcomings in this regard. (The AI has been deliberately programmed not to "see" an early rush coming; it will always give you peace in the first ~80 turns of the game, and assumes you will do the same.)


IIUC in order to actually start a total war, an AI needs a "Stack of Doom" = a group of units lead by a unit with UnitAI ATTACK_CITY. (...)

In the early game the minimum number of units in a SoD is 4 -- only then a stack is "ready to attack" so that the head unit can run the AI_targetCity-mission and the selection group starts moving towards the enemy, triggering the DoW when it crosses the borders. With a lower unit count the group will run the AI_moveToStagingCity-mission = move to the most threatened city and wait there.


My point with this quotes is to enlighten a little the debates that always appear regarding AI behaviour in early warfare. Bolded and underlined for emphasis: the fact that the AI can't awnser well to early rushes is a game design decision of the coders and not laziness or bad coding because ( this is my part of speculation ) allowing the AI to attack with less than 4 units built, one being CITY_ATTACK would probably bork the warfare in later eras . Regardless of my speculation, the fact is that the original coder wanted things to be this way ( with probably good reasons ) makes the option of changing it also a game design decision, a thing that BBAI coders had not done as much as that ( and to add, most likely trying to make things work both in early and less early warfare is not a easy thing to do ). And, to say the truth, if Soren was really right ( I would not discard that ) and you can't have both a AI that acts inteligent in terms of war before t80 and a AI that acts inteligent in terms of warfare after t80, i definitely prefer the latter ;)

Grashopa
Sep 27, 2009, 11:28 AM
If you had not been able to get peace BetterAI would have built archers only until it killed you. This is my experience so I think the peace no peace is different per AI at that point. But if we keep the series going we'll see someone try everything.

I'm also playing immortal and looking forward to a better AI tech rate. Hoping if I have a crappy start I'll be forced to try out some of TMITs strategies to even the playing field.

vixafox
Sep 27, 2009, 11:39 AM
Wow, better AI at Monarch. I have trouble with the dumb AI at Monarch. Perhaps I should start a better human thread.

Izmir Stinger
Sep 27, 2009, 05:56 PM
@civ editor11 Raging barbs is off


The island chains near your starting location provide a huge number of coastal tiles for barbarian galleys to spawn on. That's why you are seeing heavy barb naval activity.

@izmir Do you have BUG installed in \customassets? I haven't noticed the advisor screens issue. betterAI can be used with BUG but they need to be merged (someone is usually nice enough to post a merged copy of the mods but there isn't one yet for 0.81M)

Gah! This was the problem. I apparently didn't get a clean uninstall of BUG 3.6 from custom assets when I installed BUG 4.0 as a mod. I probably would have had problems with FFHII as well, but I haven't been playing any mods except BUG since 4.0 came out. Thanks for the tip.

Grashopa
Sep 27, 2009, 09:38 PM
Immortal/Normal 425 BC

I went Agriculture, AH, sailing, masonry, writing then alphabet. Built a workboat and sent it east first thing. Found a 2 fish site south of Hannibal and settled it 2nd. Built the GLh, then the pyramids and no one had built the oracle at ~800 BC. I was 7 turns from the oracle and 7 from MC since I wanted colossus so I built it and grabbed machinery. I had trade routes with 4 civs very early, but a barb city must have formed blocking me from everyone but Hannibal unfortunately and I am still blocked or GLh would have been ridiculous here. Its so far and so much land I can't justify 2 galleys and 4 axe to go looking for it.

I settled the 2 fish/stone city first, and that gave me good commerce running the coast tiles which helped an early alphabet. No one had alphabet at 600 BC so I gifted it to everyone for the heck of it.

I'm thinking of trading for monarchy then going feudalism-guilds switching to caste and building workshops all over.

I was thinking the worker fix might slow AI expansion and it seems like Hannibal is getting out cities slow, but perhaps they just aren't on the trade network yet.

http://i295.photobucket.com/albums/mm149/grashopa2/Civ4ScreenShot0386.jpg

Izmir Stinger
Sep 27, 2009, 11:52 PM
So, I'm going to playthrough with periodic snapshots. I think I am a good candidate player for this showcase. Everyone knows TMIT and Ignorant Teacher are going to win, but I am an Emperor player. I am virtually guaranteed to win on Monarch vs. normal AI and can win on Emperor with my favorite leaders, but I struggle with unfavorable situations on that difficulty level. If I can't win this game, that will be pretty solid evidence that Better AI really is better, as this same set-up without better AI is only a moderately difficult game for me (I don't know the mapscript and rarely play IMP leaders). If I win decisively, I'll be convinced better AI doesn't have much to offer. Things will be more ambiguous if I eek out a narrow victory.

After some headaches with an old, partially uninstalled version of BUG interfering with this mod (thanks Dizzygreen), I am ready to go:

I don't settle in place; way too much water in the capital's grid. Coast isn't terrible when financial, but quite a few tiles were ocean if I settle in place, so I decided to go north. I debate which plains hill to settle on. Do I want London to be coastal, or have more workable land? Is there seafood hidden to the NW? I decide to go landlocked, and as there as no seafood is revealed, I feel vindicated by my decision.

I start researching agriculture and I start a warrior. No, this isn't evidence of my newbishness; I don't have wheel or agriculture, so if I went worker first I'd have a bunch of idle worker turns on my hand. I toyed with the idea of going BW first to prevent idle worker turns, but there isn't much to chop and that would delay Agri and AH even longer and I don't like going without food resources for so long, plus I may want those trees for a wonder or a rush (ooh... foreshadowing). In retrospect I had the option of going settler first - Imperialistic might make this feasible (especially with a 2H city square) but I am not experienced with IMP leaders, and that's why I didn't think of it. Tech order is Agri, AH, BW, Wheel, Myst, pottery, writing.

My explorers reveal that I am sharing with Carthage either the western edge of a northern peninsula of a larger land mass visible to the south, or a small continent with islands near by, or some variation on this theme. I have never used the Big and Small script or its cousins, so I don't know. "Islands mixed in?" Does that mean the land I can see across the straits (which I hereby dub, The English Channel) is probably a small archipelago? I won't know for a few dozen more turns because Carthage blocks access to the rest of the land mass. The land that I have discovered between us so far is marginal at best. This means I have 3 expansion options:

A) Block him as well as I can and spread to the islands when I run out of decent city sites, or
B) Kill him quickly, or
C) Kill him slowly and have my fun with him while doing so, and dance on his grave when I'm finished.

Easy decision. Plus we want to test the Better AI, so using a trick the normal AI has no defense against is called for. I worker steal. Ah, fond memories. Learning this trick from lurking these forums helped propel me from Prince to Monarch. Now lets see if Better AI has any new tricks up his sleeve. I move my warrior around to set up shop on the forest and stasis him (assuming that works on Better AI) but something unexpected happens. He built a third archer that turn and attacked my warrior as he passed on a hill. I won (fluke) but was heavily damaged. As I already mentioned, he should have followed up with one of the other archers who almost certainly would have won, but he didn't because of whatever weird code makes early cities with huge stacks of archers terrified of a lone fortified warrior. So, no change here. I get peace, a free worker, and a lifelong enemy. As I already mentioned, he thinks he is loosing the war, so he accepts peace. Sucker.

England, 2000 BC (50 turns):

http://img59.imageshack.us/img59/7749/civ4screenshot0003.jpg

I had copper in my capital BFC and a decent production city site nearby, so Operation Behead Carthaginian Dogs is a go. Two of the axemen required for OBCD are done, and more will be coming off the line quickly thanks to a few chops, a few whips, and some strong production tiles. Ample early warriors (none of which have died to animals - this never happens to me) have revealed the whole peninsula/continent NW of Carthage and the one that initiated the war is exploring SE of Carthage. The situation is grim. OBCD must succeed or England will become a small nation of herders and miners playing second fiddle to a commercial seafaring power. It is a long way to Carthage, so once the workers have finished the infrastructure for OBCD, they start building the road to perdition Carthage.

Oh, and I met Saladin. His scout met mine on the far side of Carthage. He is a devout Hindu and likes Hannibal for some reason, so he is a little miffed I declared war on his friend. Unless Hannibal does something to piss Saladin off like found a religion (which would be double sweet, cause I could take the holy city) that modifier is going to go up to -2 or -3 by the time this is done, which is a little worrisome. Saladin is a pretty good balance between unit building and empire building, IIRC, and can be a formidable opponent. I also have no idea where he is so can't really plan his demise at this point. Of course, my assumptions about how he will behave are all based on standard AI, but I can only operate on the principles I know until I see something different, and I haven't yet. Oh well, if he is nearby I will probably adopt Hinduism when he starts spreading it, and if he isn't then who cares.

I do some recon with my warrior that made it past Carthage and an axeman on the other side. I figure flaunting my axemen before axe rushing him will either be a good joke or a clue to the Better AI that he needs to get his rear in gear. Good news, my scouts report Hannibal lacks access to copper and horses, so we will face only archers, and it will be glorious. No diversion to hunting is necessary because I won't need spearman. I am about to finish writing, and debate what to research next. I decide on sailing, as I am about to found a coastal city (London switches to settler after OBCD production was finished), and capture one or two more, including one with a freshwater lake. I will need commerce for my economy to recover from OBCD; my distance and unit maintenance costs will be high. The map also looks like GLH could be a real help.

Saladin converts to Judaism. He has two holy cities. I wish to conquer him. But lets not get ahead of ourselves.

Carthage, 1080 BC, Second English-Carthaginian War (73 turns):

http://img21.imageshack.us/img21/7633/civ4screenshot0013b.jpg

Two archers! You have got to be kidding me. The city is large enough to whip 2 more by the time I can attack, but Utica is too far away to send reinforcements in time. Not that normal AI would, but "Better AI" might.

Another thing I didn't notice until I looked at the screen shots just now: The workers are building a mine in the flatlands. This could have clued me in to the fact that Hannibal has IW and there is iron on that tile. Had I been a little slower on my rush, I could have been facing Axes (bad) and spears (good). Would "Better AI" have skipped the spearmen because I, his worst enemy, am incapable of building chariots/HAs? Again, we will never know (unless one of the Better AI team members tells us).

40 years (1 turn) later:

http://img9.imageshack.us/img9/2619/civ4screenshot0014t.jpg

Ah hah! Hannibal had just dispatched a settler, like, the turn before I arrived. He sent one or two archers with it, which accounts for the shabby state of Carthage's defenses. As expected, he whips an archer. He also tried to recall that scout and leaves it parked next to the stack. I destroy it contemptuously (which is why that one axeman isn't in the stack). Was he heroically sacrificing himself to buy Carthage more time? The world will never know.

One interesting thing to note, those two workers that were next to the stack did not retreat into the city. They just moved one tile away and started another improvement. Does the normal AI do this? I'm not sure. If Carthage was to survive, this is wise conservation of worker turns.

The fall of Carthage, 1000 BC (75 turns):

http://img195.imageshack.us/img195/289/civ4screenshot0015e.jpg

The population of Carthage dropped again, but he did not gain an archer. What is he whipping, a monument? Wouldn't surprise me. Also doesn't help him.

9 axemen
vs.
3 archers in a hill city with 40% culture defense.

Two are fortified and have (oddly) the guerrilla promotion. One is too new and level 1. All my axemen are level 2. I promote them to city raider before the attack. How many do you think will die?

Phase 2 of OBCD, 925 BC (78 turns):

http://img42.imageshack.us/img42/4348/civ4screenshot0016.jpg

Would you believe only 4? Most of my troops are level 3 now and proceeding to Hardrumetum. It has 3 archers. I don't think it could have built one by itself in 4 or 5 turns, so that means these archers left Carthage. Probably while my SOD was visible on their borders. Also, if they had connected it with roads - which those two workers we saw could have done in a single turn in reaction to my DOW - they could have reinforced Carthage, if Better AI does that kind of thing.

This has been a typical axe rush. I don't know if he was pursuing IW specifically to defend against me and was just too slow, or if that was his normal tech path and he just got unlucky. I do know he whipped something other than an archer in his capital while the SOD was approaching and missed an opportunity to reinforce with nearby archers. These sorts of tactical considerations are apparently not what Better AI is about.

So far it seems Better AI doesn't have any tricks up its sleeve to deal with the two cheapest tricks human players hold over them, the worker-steal and the axe-rush. Granted, my victim was ill equipped to deal with it anyway, lacking important resources, but there are many things he could have done to survive or even beat me. So far, I have not noticed any definite improvement from Better AI.

This is not surprising. The goodies hinted at in this thread include better naval invasion forces and something ominous about vassal collectors. Perhaps they coordinate their wars with their vassals? Can they use their allies' transports? Coordinate the attacks of two stacks? We shall see.

I have some hard decisions to make. Finish off Hannibal or milk him for techs? Settle the islands or consolidate my hold on the continent? How will I handle raising my happy cap? What techs to pursue? As for the latter, I messed up a little. I went Poly after writing, intending an Oracle->CoL slingshot. Been a while since I've done one of those; they are harder on Emperor. Someone else finishes the Oracle while I am researching Priesthood. And someone founds Confucianism not to long after that, anyway, though I was really after the courthouses. If I'd gone Alphabet, I could have demanded exorbitant techs from Hannibal already, but he's just been spamming archers this whole time and appears to be trying to counterattack with them.

http://img197.imageshack.us/img197/5633/civ4screenshot0020.jpg

Good luck with that. I go Alpha after Priest and get IW and HBR from him in exchange for his unconditional surrender. Why did he waste his time researching HBR. There are no horses on this side of the continent! Saladin has started spreading Judaism to my lands, and I convert so our relations improve. I would have traded with him for some other stuff, but luckily I meet Ramesses II the turn before I get Alpha. He doesn't have a Diplo penalty with me (and is also Jewish) so I get a sweet deal: Monarchy, Meditation, Monotheism and Hunting for Alphabet and HBR. He apparently does have horses, because I see a War Chariot exploring my territory, but I am not afraid of this guy, he's a pushover. And a wonder-whore, maybe he stole GLH and Oracle from me. Perhaps I can capture the GLH. Also, getting Monarchy and Monotheism on the same turn allows a "magic number" revolt to OR and HR. I need to start spamming missionaries in my production city.

I need to explore, I don't know where anybody except the Carthaginians are. Now that I have IW, I can slash and burn the food rich jungle south of Carthage for my GP farm. The islands have promising looking space for more commerce cities. I have stone and am setting my sights on the Hanging Gardens. After picking up calendar, and maybe literature for Great Library in my GP farm, start the Lib race. I wonder if the AI will make that harder on me. I have already diverted a little from it to pick up other stuff, but this is Monarch, so I thought it was OK. We'll see.

PieceOfMind
Sep 28, 2009, 10:22 AM
So far it seems Better AI doesn't have any tricks up its sleeve to deal with the two cheapest tricks human players hold over them, the worker-steal and the axe-rush.
That is closer to the objective of Aggressive AI than Better AI. To my knowledge, even Aggressive AI does not go all out to prevent such a thing happening but it definitely does a lot better in response to that player strategy. The problem is, people complain about Agg AI because it is weaker in peaceful parts of the game. In the past, I and a couple of others have had the very controversial view that Agg AI is for rushers and non-Agg AI is for those who don't rush as this was the design philosophy used by the main Better AI programmer back in the days of warlords (Blake), who also happened to be one of the AI developers for the BtS expansion - almost certainly why the BtS AI was much more cunning in warfare than in warlords. I don't want to bring back that debate here but just in response to your comments I would suggest trying BBAI combined with Agg AI and seeing how that goes. I haven't played the latest versions of Better AI for a while so I'm not sure how they play.

As rolo said above, even the Better AI guys need to work within the existing game design and part of that is not to spam units near the start of the game - something the human player must do in order to rush, and a worker-steal strategy programmed into an AI would be so amazingly annoying it's not hard to see why that has not been touched.

Izmir Stinger
Sep 28, 2009, 02:25 PM
As rolo said above, even the Better AI guys need to work within the existing game design and part of that is not to spam units near the start of the game - something the human player must do in order to rush, and a worker-steal strategy programmed into an AI would be so amazingly annoying it's not hard to see why that has not been touched.

I'm not saying the AI should try to duplicate these tricks, that would be some terrible nonsense, but there is room for improvement in how they react to them. Without building any more archers than he did, my victim could have quickly doubled the number of defenders in his capital by reinforcing, but he didn't. This wouldn't have stopped me, or made the attack unsuccessful, but it would have slowed me down. The way it works now, the AI is practically begging to be eliminated by an axe rush.

AI axe rushing or worker stealing humans might be needlessly vindictive, and I have no interest in seeing anyone teach the AI how to do that, but I have no problem with them being as vindictive as possible trying to stop my axe rush once the DOW has been made (or even when they see the stack approaching). That's only fair. They have basically lost the game the moment I decide to rush (well, maybe not a chariot rush, I still don't have the hang of those), they owe it to themselves to go out fightin', not whipping grannies and building mines in a city that is going to fall next turn.

I have yet to see what improvements Better AI really has in store. I'm still hopeful they will blow my socks off. But the title of this thread is "Is BetterAI really better? Let's find out." Maybe my rivals are a little further ahead in tech than they would be otherwise, but I have no way of knowing. The difference would probably be measured in fractions of a tech anyway. For all I can tell, I have played a game to 1 AD and so for the answer so far is No.

r_rolo1
Sep 28, 2009, 03:18 PM
Sorry, but you are saying: "I am doing something that the original coder, for some reason decided to not code the AI to cope with because it would bork the rest of the game. So the AI is stupid and any mod that doesn't change it is null and void" That is not a aceptable point...

Let me repeat this : the fact that the AI can't cope with a rush is a game design decision to not bork the rest of the game .... it is atleast as much a game design decision as you being able to draft rifles or that the AI will trade more with civs that it is friendly with than with civs that is Furious with. And to say the truth, what would be the only solution to both worker steal and early rushes? Say to the AI to build more units... and then you would not rush them and they would be cripped by maintaining a relatively large standing army :p Not exactly the best of the worlds , right?

peppe1
Sep 28, 2009, 03:38 PM
If the AI is designed to expect peace for 80 turns...

It plays well when it gets this, but what is its backup plan when it gets early war from a crafty player?

Can how it handles an early worker steal, blockade, or rush be changed without affecting the late game? Maybe a function that calls the normal scripts after turn X, but before turn X call early game response functions.

Can the AI make different decisions when it starts next to a human or has human units on/near its border or are all players human and AI alike seen the same by the game? Human will backstab/dow at any moment, so should the AI prepare for this?

dizzygreen
Sep 28, 2009, 03:40 PM
I am a poor Monarch player with BBAI (record is 2-6). The obstacle preventing me from getting better right now is a tendency to turtle up & bad diplomacy skills. I also tend to somewhat ignore the naval aspects of the game, and never use slavery (don't know how to, will learn eventually but not this game).


This game, I started by putting two cities to block off Hannibal, then expanded peacefully while wonderspamming slightly in the capital. No wars yet, (from me or AI). Unfortunately I got shut out of oil, with Hannibal claiming it to the frozen North and Pacal to the SW.

If anyone is kind enough to look at this 1730 AD save, how can I improve my game? Should I attack Hannibal or Pacal for the oil? Carthage looks delicious..

Dhaulagiri
Sep 28, 2009, 04:04 PM
Pacal is usually weak in troops, so you could do a short war and take his oil island and ask for peace. Then gear up for a full scale war with Hannibal. Pacal looks to have curisairs while Hannibal will be landing cavalry, rifles and cannons and his navy is probably pretty big.

If you decide on Pacal, raze his city and put a new on right next to the oil so charly doesnt culture steal it from you.

Izmir Stinger
Sep 28, 2009, 04:59 PM
Sorry, but you are saying: "I am doing something that the original coder, for some reason decided to not code the AI to cope with because it would bork the rest of the game. So the AI is stupid and any mod that doesn't change it is null and void"

No I'm not. If you'd like a copy of what I am saying, press the quote button. You will find it is more accurate than writing something different in quotation marks. I would also disagree with someone that said that.

By using my method you might get something like this:

I have yet to see what improvements Better AI really has in store. I'm still hopeful they will blow my socks off. But the title of this thread is "Is BetterAI really better? Let's find out." Maybe my rivals are a little further ahead in tech than they would be otherwise, but I have no way of knowing. The difference would probably be measured in fractions of a tech anyway. For all I can tell, I have played a game to 1 AD and so for the answer so far is No.

See, now you can communicate what I actually said instead of something that I would disagree with.

And to say the truth, what would be the only solution to both worker steal and early rushes? Say to the AI to build more units... and then you would not rush them and they would be cripped by maintaining a relatively large standing army :p Not exactly the best of the worlds , right?

I am not sugesting the AI shoot it self in the foot. In my game and the synopsis above that you read so much nonsense into, I have given alternate sugestions:

there is room for improvement in how they react to them. Without building any more archers than he did, my victim could have quickly doubled the number of defenders in his capital by reinforcing, but he didn't. This wouldn't have stopped me, or made the attack unsuccessful, but it would have slowed me down. The way it works now, the AI is practically begging to be eliminated by an axe rush.

...

I have no problem with them being as vindictive as possible trying to stop my axe rush once the DOW has been made (or even when they see the stack approaching). That's only fair. They have basically lost the game the moment I decide to rush (well, maybe not a chariot rush, I still don't have the hang of those), they owe it to themselves to go out fightin', not whipping grannies and building mines in a city that is going to fall next turn.

A little subroutine that could check to see if another city could send some of its defenders to help hold the one that is threatened would go a long way to helping defend against rushes without changing their build priorities at all. And thier build priorities do need to change when the war is actively going on. I watches as my victim whipped something other than an archer in his capital one turn before I took it. All of these things are possible improvements to the AI, and from what I see none of them are in the mod.

Now, if you reply to this, I would appreciate it if you didn't quote me as saying, "this mod sucks, durt, dur, DUR!" again. I have not said that, so if you want to argue with someone about how great the mod is, go find someone who has played it and didn't like it. I am not that person. I am a person trying it for the first time and reserving judgment until I can get more interactions from the AI. I observed that it doesn't do anything differently against worker stealing and axe rushes. Unless that is untrue, stop trying to disagree with me.

TheMeInTeam
Sep 28, 2009, 08:35 PM
Ugh, I didn't realize we had the gay and small map script going, but I played it anyway, finding a way to bypass all the incessant micro.

I didn't see the immortal save, so I took the monarch one...

1802 UN.



http://i279.photobucket.com/albums/kk134/themelnteam/better%20AI%20blasted/Civ4ScreenShot0000.jpg
http://i279.photobucket.com/albums/kk134/themelnteam/better%20AI%20blasted/Civ4ScreenShot0001.jpg
http://i279.photobucket.com/albums/kk134/themelnteam/better%20AI%20blasted/Civ4ScreenShot0002.jpg
http://i279.photobucket.com/albums/kk134/themelnteam/better%20AI%20blasted/Civ4ScreenShot0003.jpg
http://i279.photobucket.com/albums/kk134/themelnteam/better%20AI%20blasted/Civ4ScreenShot0004.jpg
http://i279.photobucket.com/albums/kk134/themelnteam/better%20AI%20blasted/Civ4ScreenShot0005.jpg
http://i279.photobucket.com/albums/kk134/themelnteam/better%20AI%20blasted/Civ4ScreenShot0006.jpg
http://i279.photobucket.com/albums/kk134/themelnteam/better%20AI%20blasted/Civ4ScreenShot0007.jpg
http://i279.photobucket.com/albums/kk134/themelnteam/better%20AI%20blasted/Civ4ScreenShot0008.jpg
http://i279.photobucket.com/albums/kk134/themelnteam/better%20AI%20blasted/Civ4ScreenShot0009.jpg
http://i279.photobucket.com/albums/kk134/themelnteam/better%20AI%20blasted/Civ4ScreenShot0010.jpg
http://i279.photobucket.com/albums/kk134/themelnteam/better%20AI%20blasted/Civ4ScreenShot0011.jpg
http://i279.photobucket.com/albums/kk134/themelnteam/better%20AI%20blasted/Civ4ScreenShot0012.jpg
http://i279.photobucket.com/albums/kk134/themelnteam/better%20AI%20blasted/Civ4ScreenShot0013.jpg
http://i279.photobucket.com/albums/kk134/themelnteam/better%20AI%20blasted/Civ4ScreenShot0014.jpg
http://i279.photobucket.com/albums/kk134/themelnteam/better%20AI%20blasted/Civ4ScreenShot0015.jpg
http://i279.photobucket.com/albums/kk134/themelnteam/better%20AI%20blasted/Civ4ScreenShot0016.jpg
http://i279.photobucket.com/albums/kk134/themelnteam/better%20AI%20blasted/Civ4ScreenShot0017.jpg
http://i279.photobucket.com/albums/kk134/themelnteam/better%20AI%20blasted/Civ4ScreenShot0018.jpg
http://i279.photobucket.com/albums/kk134/themelnteam/better%20AI%20blasted/Civ4ScreenShot0019.jpg
http://i279.photobucket.com/albums/kk134/themelnteam/better%20AI%20blasted/Civ4ScreenShot0020.jpg
http://i279.photobucket.com/albums/kk134/themelnteam/better%20AI%20blasted/Civ4ScreenShot0021.jpg
http://i279.photobucket.com/albums/kk134/themelnteam/better%20AI%20blasted/Civ4ScreenShot0022.jpg
http://i279.photobucket.com/albums/kk134/themelnteam/better%20AI%20blasted/Civ4ScreenShot0023.jpg

There, UN.



I did a lot of classical/medieval war to test the AI's warring ability. It didn't feel too different from a normal game, which meant a walkover on monarch. The only reason I didn't take domination for this was that one of the AIs split a colony (thanks G&S!) and wouldn't vassal even after I took 8 of its 12 cities, including its capitol and every city on its mainland continent. Nope, because he had lincoln as his butt buddy on a frozen tundra island, no vassaling.

So I just beat down who I could without having to do any annoying shipping, turn on production automation, set every city to emphasize commerce, automated workers, turned off leave improvements, and just hit end turn while teching democracy then straight to mass media.

I noticed that for monarch AIs they did tech slightly better...I was expecting a more dynamic war game though, especially on a gay map that hands everyone 0398476098473 cities (including us). Oh well.

One thing I did learn is that i'm definitely playing SP with the CAR mod from now on ;).

TheMeInTeam
Sep 28, 2009, 08:39 PM
A little subroutine that could check to see if another city could send some of its defenders to help hold the one that is threatened would go a long way to helping defend against rushes without changing their build priorities at all. And thier build priorities do need to change when the war is actively going on. I watches as my victim whipped something other than an archer in his capital one turn before I took it. All of these things are possible improvements to the AI, and from what I see none of them are in the mod.

Changes that are supposedly better maybe aren't. Let's take a scenario where you're attacking with a 2 move unit, or units with guerrilla or woodsman II. If the AI shuffles its defenders, you can outmaneuver it, block it on defensive terrain, kill its units in the field using mounted, or bypass the front city and go on a capture or razing spree. That may even be the reason they just lazily programmed the AI to spam several units in all of its cities...programming something to act dynamically to that kind of threat was probably hard (note, in my wars in this game, I still didn't see the AI shift its garrison in such a way that would hold off a horse archer charge).

Powerslave
Sep 30, 2009, 08:05 PM
Ugh, I didn't realize we had the gay and small map script going

Nope, because he had lincoln as his butt buddy

I was expecting a more dynamic war game though, especially on a gay map

Dude. Is there something about yourself that you want to tell the group? We're not judgmental.

BetterAI is better, not perfect. It's still got a long way to go before it can challenge someone who's read any War Academy articles. You're an excellent player, so I'm unsurprised that you were not challenged on Monarch. I would suggest trying Aggressive AI next time. It anticipates war a little better, though its war strategies are just as equally brain-dead as usual. Mostly, the AI plays a better peaceful game, but I have seen a few surprise declarations of war that made me scramble to take back a coastal city. The AI brings overwhelming force in its intercontinental wars now. I'm an outrageously sloppy player, and I sometimes leave a single Warrior defending a coastal city, long after I've reinforced every other coastal city with a dozen Infantry. For people like me, who play below their skill level, BetterAI can be an eye-opening experience, since you're not expecting the AI to notice your sloppiness.

Unfortunately, the AI will probably never be good enough to truly challenge a skilled human. It's not bad at handing Noble-Monarch players their ass, though.

TheMeInTeam
Sep 30, 2009, 08:26 PM
Dude. Is there something about yourself that you want to tell the group? We're not judgmental.

BetterAI is better, not perfect. It's still got a long way to go before it can challenge someone who's read any War Academy articles. You're an excellent player, so I'm unsurprised that you were not challenged on Monarch. I would suggest trying Aggressive AI next time. It anticipates war a little better, though its war strategies are just as equally brain-dead as usual. Mostly, the AI plays a better peaceful game, but I have seen a few surprise declarations of war that made me scramble to take back a coastal city. The AI brings overwhelming force in its intercontinental wars now. I'm an outrageously sloppy player, and I sometimes leave a single Warrior defending a coastal city, long after I've reinforced every other coastal city with a dozen Infantry. For people like me, who play below their skill level, BetterAI can be an eye-opening experience, since you're not expecting the AI to notice your sloppiness.

Unfortunately, the AI will probably never be good enough to truly challenge a skilled human. It's not bad at handing Noble-Monarch players their ass, though.

No don't get me wrong, I'm impressed by betterAI, I just really hate big and small. A lot. Of all the maps in the game, it's on part with archipelago in terms of the amount of micro needed to play it very well. I hate micro fiercely, especially incessant, annoying things like constantly loading a galley because there's absolutely 0 way to automate it. Also this map is one of the better scripts to milk sushi for score which I also think is kind of stupid :p.

Silu
Oct 01, 2009, 03:07 AM
No don't get me wrong, I'm impressed by betterAI, I just really hate big and small. A lot. Of all the maps in the game, it's on part with archipelago in terms of the amount of micro needed to play it very well. I hate micro fiercely, especially incessant, annoying things like constantly loading a galley because there's absolutely 0 way to automate it. Also this map is one of the better scripts to milk sushi for score which I also think is kind of stupid :p.

You should try some Big&Small with say, Massive Continents (Normal continents isn't that prone on ship-micro-galore usually either, but you could get a couple of bad rolls), Tiny Islands and a separate island area. This usually plays a lot like a Pangaea/Fractal but is a bit more interesting with the colonization factor and funkier terrain. Like this ship micro is almost guaranteed to be needed less than on Continents/Hemisph for example.

I also really like the resource allocation, actually B&S is the only map where I've ever favored Cereal Mills over Sushi because I happened to have something like 7 Corn + a lot more possible from trades and not really much seafood at all.

Because it usually gives very good land it's also challenging as the AIs play relatively better with good land than bad - BetterAI doesn't change this AFAIK.

MartinHarper
Oct 01, 2009, 08:22 AM
what would be the only solution to both worker steal and early rushes?

Fixing worker steals is mostly a question of never leaving a worker in a position where it can be taken and not taken back on the following turn. In Izmir's game, the AI should probably have converted its two defending archers from AI_RESERVE to AI_CITYDEFENSE as soon as it got DoWed. This would have allowed them to counter-attack the warrior on 0.2 strength.

Defending against the rush better is also possible without breaking the game. As Izmir says, the AI could have whipped a second archer, which could have killed off another axeman or two. Additionally, the AI should have seen Izmir's power graph and boosted its production of archers a little to compensate. Fixing the relative perceived strength of axes and archers would help this. The archer counter-attack is also dumb.

My victim could have quickly doubled the number of defenders in his capital by reinforcing, but he didn't.

This, however, I don't see. The AI has two turns to respond between your DoW and losing Carthage. Building a road on a flood plain with two workers takes two turns, and without that road Carthage is too far away from Hadrumentum. It's also too far from Utica. Therefore, I think Hannibal is best off keeping his archers in his cities and taking as many of your axes with him as he can.

JammerUno
Oct 01, 2009, 09:33 AM
The only way to fix early rushes is by making the AI build more units, and the only way to then save the rest of the game is for the AI to use those invested hammers to get returns, i.e. rushing, which would make the game unplayable on higher difficulties. In that case you might as well rename the game 'Hittin people with sticks' in stead of Civilization.

Also, you could fix workerstealing by making a new negative diplo modifier '-4 you have been our enemy since the dawn of time', for when you declare war before, say, 2500 BC, making early declarations less attractive.

TheMeInTeam
Oct 01, 2009, 11:09 AM
Like this ship micro is almost guaranteed to be needed less than on Continents/Hemisph for example.

Ship micro on continents is merely using large transport stacks most of the time. None of this ferrying a couple units here and there and constantly giving load/unload orders since waypoints and massed movement are impractical.

Massive continents are probably more preferable to me though as you say.

SergeiKirov
Oct 01, 2009, 01:38 PM
There is a simple and not that unrealistic way of partly fixing the ship micro issue. Workboats ought to be able to create a bridge over a single tile of water, at some point in the tech tree (maybe Engineering) and later slightly longer ones, maybe up to three tiles, with some modern era tech. These could be destroyed in the same way fishing boats can, and work as a road over a water tile. Not sure if this would clash in a fundamental way with the unit programming (there might be issues with land units moving to a water tile).

Yesod
Oct 01, 2009, 11:56 PM
Do you guys really move your workers around the continent that often? why not just delegate two of em for a city thats stranded on a little island.

Mayor West
Oct 02, 2009, 09:28 AM
Also, you could fix workerstealing by making a new negative diplo modifier '-4 you have been our enemy since the dawn of time', for when you declare war before, say, 2500 BC, making early declarations less attractive.

That's not bad. I've actually always thought the diplo modifiers for war/peace should scale with time; the +1 bonus for "years of peace" should be a +1-4 modifier, and then you could add a -4 for early war.

It also wouldn't be too tough to make worker-stealing harder, but the fix would be just as easily gamed as the current situation: if the AI knows to move its workers away from tiles that are threatened by units from a civ that it isn't at war with, worker stealing would be really tough, but it would also mean that you could station a warrior just outside the AI's cultural radius to prevent it from improving that grassland gem in the capital's BFC without declaring war. Cure is worse than the disease.

It's the same problem with adapting the AI to expect a rush. Either the human player is going to beeline bronze working and whip out axes, or it's not. If the AI guesses wrong, it loses. So, for the AI to properly compensate for both cases, the only way to program it to do that is to let the computer be a cheating bastard and see your tech and build queue, and respond appropriately. That's questionable at best, in the early game, and by the time modern warfare rolls around, it'll mean that your SOD will always be met with precisely the correct countermeasures in precisely the correct place. Also not so good.

And that's the rub with all of these fixes being proposed. It's not that there are intrinsic parts of the game that can be exploited, it's that we've learned what the AI is likely to do in most situations, and we've adapted our strategies to take advantage of weaknesses in those tactics. The only systemic fix for that is to make the AI predict what a human players countermeasures are likely to be, and as an occasional dabbler in AI programming, let me tell you what the likelihood of that happening is.

MartinHarper
Oct 02, 2009, 01:23 PM
You could station a warrior just outside the AI's cultural radius to prevent it from improving that grassland gem in the capital's BFC without declaring war.

The AI can simply move a unit onto or adjacent to the grassland gem. Then the warrior will not be able to steal the worker without winning a combat against the odds. I'd also be in favour of teaching the AI to steal workers, if it gets the opportunity. This means that human players, like AI players, will need to use units to guard their workers.

For the AI to properly compensate for both cases, the only way to program it to do that is to let the computer be a cheating bastard and see your tech and build queue, and respond appropriately.

The AI can already see the power of neighbouring civs which should be all it needs to see if you've whipped out a stack of ten axes. It also knows how close you are, so it knows whether those axes might be a threat. These two things should allow it to respond to early game rushes - or at least respond better than it does now.

Powerslave
Oct 02, 2009, 08:08 PM
Good reply, MartinHarper.

The AI should definitely try to remain nearer to the top in power, as long as it doesn't impact their research too much. This way, AIs who make or capture shrines (and, later, corporations) will become crazy powerful, much like the human players. Of course, this does contradict the unit build probabilities in the XML, which some players would find a turn-off. Maybe this sort of strategy should be limited to "Aggressive AI"?