A Better AI.

Surely this should be in C&C?

Good work anyway! My work on the AI kinda stalled with the coming of a new university year - regular 50-60 hour weeks as well as a social life doesn't leave much time for AI programming.

Have you done anything to encourage specialization of cities? I had roughed out code for this which still needed a bit more substantial testing if you're interested - it was mainly to do with improvement optimization.

Otherwise, if you need any part time help with anything specific feel free to give me a shout. The rather seasonal nature of university gives me quite a bit of free time for half the year, and absolutely none for the other half.
 
Hey, will the free C++ Studio Express build this thing? I haven't used a "PC" compiler since, um, Turbo Pascal,* so I only half know what I'm talking about.

*There's lots of Unix, Mac, and VMS to make up for that though.
 
Iustus, Blake,

There's something funny going on with AI stack attacking in the most recent build. I've attached a save for you to see for yourself. When you load up this game, focus on my beleaguered city of Madras which has a large Russian stack based outside attacking it each turn. Basically the problem I'm encountering is the AI will only attack with the siege weapons in the stack (i.e. trebuchets or cats). None of the other units (knights, crossbowmen, etc) ever attack the city. Essentially the outcome is the AI takes Madras but it could take it turns before it eventually does, simply by using all of the stack's units.

Can this be addressed?

Also, I notice that the AI now actively uses their Generals (i.e. attaching them to a unit). Is this something you've done as part of BetterAI? I don't remember the AI ever doing this before... Does the AI always do this now?

Cheers
 
2) The Diplomacy is racked against the human now. Too many war requests there is no way to really keep up. It's impossible not to have everyone pissed at you in large multi way games now. The AI is always warring, and you are getting war requests every other turn or so. There needs to be some diplo modifier for this new found behaviour. The original Diplo Rules with a -1 refusal to help penalty just rack up too quickly to keep up now. You can at best succede in keeping 4 or so Civs in Good standing, and everyone else ends up hating you now.

A fix I'd like to see for that is to have the AI civs tend frame their requests for help as trades. If the AI offers you even a nominal cash incentive to join their war, then there wouldn't be a diplo penalty for refusing. Ideally, the AI would tend not to demand aid unless they're backed into a corner, or if they're just the demanding sort of leader. :lol:
 
I just played a game with latest build. A short game. Settings: Large pangea, 12 AI, Marathon, Monarch. I rolled Asoka. I got farming from a hut on the 2nd turn, so capital was building a worker and I went after Buddhism. Got it, worker is built, farms some food resource and builds a couple mines, meanwhile I build a warrior (capital grows to size 3) then a settler. Research path is hunting --> the wheel. I build a city in the southwest, hook it up, buddhism spreads. All looking fairly ok. My army at this point is 2 warriors. Here we go :)

I was invaded in 2500 BC by Shaka (random personalities, but looks like he got a personality similar to his usual one!). He marched a stack of 6 archers into my capital's surroundings. Since I have neither Archery, BW nor has horseback riding research finished, I'm not really capable of stopping this. I go "WTH" (of course), and open WB. Turns out Shaka's capital is size 7, he hasn't even bothered to build a 2nd city, and he has trekked a fair distance ( we weren't even close to each other) just to f*ck me up.

Now, I can see some good reasons for this - I had a tiny army, a holy city and so on. But on the other hand, we weren't close and no diplo modifiers. Infact it was quite a good move by Shaka, but I think the maintenance from my capital and his retardation near his own capital might slow him down.

What I think though, is with this kinda thing happening, the game risks becoming "unfun". If I wanted to watch out for an archer rush in 2500BC, I'd play multiplayer and expect axes by that time also. I think on Monarch upwards (or whatever level the AI starts off with significant extra units), the human player has always a lower power in the very early stages. This means if someone at all nearby wants to declare a real early war, human is very likely the subject. And that makes the game feel like the human player is being victimised for being human.

Now, I like this project and I give it my full support :goodjob: and I don't mind dropping a level (already come down from Emp o.0) or focussing a bit more on military early on. But I wonder if this is an extreme case, and what other people think about this kinda thing. Obviously I had it coming, but I got it way before I expected it. What surprsied me is how far away Shaka turned out to be.. anyway, I will post the save also if anyone is interested.
 
*forum rant* pfff grr you can't add an attachment when you edit a post, that'd be far too easy*/forum rant*
 
Having just observed Montezuma sit tight with chariots, jags, spears, and axes, until he had 8-10 of them in a city that he had taken from me, against what was originally three or four chariots and no archers, I think the spear is too conservative. It was certainly not aggressive. Monty kills himself anyway ... he might as well do it in a blaze of glory.

What happened is that I got my war economy in serious gear (after building 4-5 wonders, which is how I got into the mess in the first place), built 6-8 chariots, then a half dozen horse archers, and then the big stack o' death came at me. But I think I lost about 4 units to it, partly because it attacked my stack of about 10 units including two fortified archers on a hill; then I wiped out a small second wave, then wiped out some cats and some more units, then definitively retook the city that got it all started.

If the attack had proceeded earlier I might have lost my capital and felt all stupid for being such a slacker. I thought, oh geez, I can't get away with this any more!

The "stock" Warlords AI where Alex shows up with a bunch of chariots dispersed into singletons or small groups right after he finds your cities and briefly pretends to make nice with you would have worked better in this case.

If he had managed to get some units into a flank around the side that would have worked better too. I had the obvious route into my territory well blocked after a while.

I also think the AI is underestimating the difficulty of stack attacks, after seeing two that ended up about 2:1 or 3:1 in my favor (as the defender), unless that's just part of Monty being stupid.

It was a scary moment though, seeing the initial stack bear down on a frontier city - which I just evac-ed and left to him. Too bad (for him) he didn't keep going. The anthropologists and historians will study it.

This was at Noble and Epic on a large continents map, although I can't imagine that makes much difference in the overall behavior.

PS cymru_man - yep. But I don't think it's unfun. If you want less of it, play against fewer opponents, or pick your opponents, or play on maps where you can be by yourself for a while. No biggie.

It could be a little disheartening to first-timers (or tenth-timers) though.
 
I am playing the newest version of the improve AI mod, Prince level, standard continent map, standard speed.

The more I play this mod, the more I find the AIs are expanding overaggressively, to a point it doesn't just annoy the human player, it actually invites the human player to launch an early attack, e.g.

improved AI0000.JPG

improved AI20000.JPG

In this game I played as Fredick. Hatsy expands so fast that she basically sent her settler a dozen tiles away south from her capital to set up a city right near my two cities, including my capital. It's not like she has no other options. There is an ample amount of valuable space south of Thebes, which include what exactly she needs (horses to build her UU and stones for her Great Wall). It's true the spot she occupies have tons of resources as well, but it is filled with jungle tiles which she will not be able to do much till discovery of IW and a lot of worker actions. And what she does right now is essentially an invitation to me to war with her.

The funny thing is, she is not doing anything to prepare for an inevitable attack. Her two major cities are building great wonders! This is a recipe of disaster.

I don't mind aggressive expanding AIs. Human players are aggressive as well. But unless there is a really good choke point, a reasonable human player does not build a city far away and is near somebody's capital to invite an unprepared war. This overaggressiveness makes the game less fun (forces the player to choose war), at least for me.
 
I dont think the game is unfun only because the AI is using strategies that are used sucefully by players! I would love to see a big stack of warriors going to my capitol defended by 1 or 2 warriors! Of course I would have to go to another game after this :p

That kind of thing just makes the game more funny for me! More feel like you are not the only world's changer!
 
Also, I notice that the AI now actively uses their Generals (i.e. attaching them to a unit). Is this something you've done as part of BetterAI? I don't remember the AI ever doing this before... Does the AI always do this now?

Cheers

The AI used to favor building Military Academies with all their generals. Now they can't (until Education), so they are forced to attach them early on. This is annoying because they always get Heroic Epic now. :lol: They don't settle the generals often in my experience...

As for the other post involving Shaka attacking, that's Shaka for you (he does that often). Wang Kon attacked me before in 1700's BC as well (even before 2.08). The AI won't likely send warriors only, since it stops building warriors when it has archers.
 
I'm playing a game where Genghis sent multiple huge stacks against me along with a general who was all alone in the open. He died instantly.

It's something to see streams of keshiks being killed off by my infantry. The AI brings everything built since time began. I laughed as each keshik died after a single shot. But finally my infantry must have worn out his trigger finger and took a spear the wrong way. :cry:

I've also learned with the 12-02 build that getting the AIs involved in a war is not insurance against them attacking you. :eek: In this case, Genghis was getting a bit beligerent. Attacking him myself wasn't of any strategic use, so I involved Alexander. Not on the same continent, but I figured they'd keep each other occupied. Instead, Genghis still declared on me a few turns later!

So far, I've lost two cities previously captured from Egypt. It's zillions of cannons that have given me the trouble. They're mostly all gone now, but Egypt decided to declare on me again from the other side. She has infantry now, but I just started making tanks. :goodjob:
 
I would love to see a big stack of warriors going to my capitol defended by 1 or 2 warriors!

Just play Age of Empires or something then. Or Rise of Nations with an Aztec neighbour.

SP is not = MP in Civ, and should never be. Call me dumb or inferior.
 
The AI used to favor building Military Academies with all their generals. Now they can't (until Education), so they are forced to attach them early on. This is annoying because they always get Heroic Epic now. :lol: They don't settle the generals often in my experience...

As for the other post involving Shaka attacking, that's Shaka for you (he does that often). Wang Kon attacked me before in 1700's BC as well (even before 2.08). The AI won't likely send warriors only, since it stops building warriors when it has archers.

I said I had random personalities on :P And I believe Monarch = AIs start with Archery, although I could be wrong on that. I know they do on Emperor. I was just shocked to see this playstyle, and not sure it would help Shaka in the long run, him being such a distance away.

you can, go to advanced mode.

Thanks, learn something new every day and all that. It was late, ok? :)
 
I just played a game with latest build. A short game. Settings: Large pangea, 12 AI, Marathon, Monarch. I rolled Asoka. I got farming from a hut on the 2nd turn, so capital was building a worker and I went after Buddhism. Got it, worker is built, farms some food resource and builds a couple mines, meanwhile I build a warrior (capital grows to size 3) then a settler. Research path is hunting --> the wheel. I build a city in the southwest, hook it up, buddhism spreads. All looking fairly ok. My army at this point is 2 warriors. Here we go :)

I was invaded in 2500 BC by Shaka (random personalities, but looks like he got a personality similar to his usual one!). He marched a stack of 6 archers into my capital's surroundings. Since I have neither Archery, BW nor has horseback riding research finished, I'm not really capable of stopping this. I go "WTH" (of course), and open WB. Turns out Shaka's capital is size 7, he hasn't even bothered to build a 2nd city, and he has trekked a fair distance ( we weren't even close to each other) just to f*ck me up.

Now, I can see some good reasons for this - I had a tiny army, a holy city and so on. But on the other hand, we weren't close and no diplo modifiers. Infact it was quite a good move by Shaka, but I think the maintenance from my capital and his retardation near his own capital might slow him down.

What I think though, is with this kinda thing happening, the game risks becoming "unfun". If I wanted to watch out for an archer rush in 2500BC, I'd play multiplayer and expect axes by that time also. I think on Monarch upwards (or whatever level the AI starts off with significant extra units), the human player has always a lower power in the very early stages. This means if someone at all nearby wants to declare a real early war, human is very likely the subject. And that makes the game feel like the human player is being victimised for being human.

Now, I like this project and I give it my full support :goodjob: and I don't mind dropping a level (already come down from Emp o.0) or focussing a bit more on military early on. But I wonder if this is an extreme case, and what other people think about this kinda thing. Obviously I had it coming, but I got it way before I expected it. What surprsied me is how far away Shaka turned out to be.. anyway, I will post the save also if anyone is interested.

My game went like this too. Alexander, who started just to the West of me only had one city when I had 4 or 5. He they attacked with a stack of 6 or 7 archers. I just managed to repel this, but it seemed odd he built a stack instead of using settlers to claim some early land...

Over the course of the game I got double teamed several times and I finally had to give up when the two biggest Civs (both Judaist; I was Confucian) on my continent attacked. Definitely much harder and I'm going to have to drop down from Monarch to Prince I think, particularly if the BetterAI team can get stack attacks working for the AI again.
 
re: the AI Warlord logic.

I saw the AI make a catapult into a warlord. Cool, I guess, except it then threw it at my stack which was resting on a forest. Suffice it to say, it didn't last long. (I didn't look at the combat log to see the odds though)

Maybe some warlord logic needs to be made as part of a future goal somewhere, where it looks after them better. Just some logic along the lines of not attacking with it unless it has a 95+% odds of success or something; Give it Leadership as its first promotion for the extra xp; Attach it to a successful swordsmen or axemen (for a warmonger) or something like that; MAYBE a well promoted Trebuchet (at least city raider III), etc. Stuff that people would do.
 
Haven't installed 12-02 yet. My latest is whichever was the one before it... 11-26 or smth?

When I hover over my name on the scoreboard, and then hold ALT, I don't get the == Better AI == message, but if I hold ALT and then hover over the scoreboard, I do get it. Is that normal?

I played a gave on a large Earth Map with 18 civs, no tech trading, aggresive AI. I chose the Romans, with the English, Russians and Greeks nearby (no other European nations.)

Anyway, Carthage is just across the pond so I was looking at it and saw it building quite a large army, and hovering over his land and saw "AI Dagger Strategy". Eventually, he declared on Hatshepsut, and one by one, Hatshepsut's 3 cities falled. That was a swift invasion and I don't blame Hatty for not being able to do much.

However, I was a little disappointed at a later war. Alex had been building an army and eventually declared a war on Ghandi, who had only minimam defense. Now, whatever happened to Alex, he took many many turns before he showed up on Ghandi's doorstep, but it was disappointing to note that Ghandi didn't lift a finger to build any defense, God knows he had enough time to do so.

Was this some ploy on Alex's part to feign a 'phoney-war' and fooled Ghandi into thinking that no defense was necessary? Or is it just a present inability of the AI to succesfully defend against these AI war-machines we've now created?
 
I think that is a key think If the warmongers are preparing for war, then the peacemongers must also prepare for war, at least defensive war. Perhaps the building a wonder decision should be tied into the military building decision, you don't build wonders unless you either have a 'decent' power rating or a number of cities able to build units for you.

someone earlier talked about making a AI GP Farms. I think that would be good if that decision was triggered when Literature is researched (or Researchable) because it is the National Epic that makes the GP Farm worthwhile. It would also require X Cities of course


Gold Cities (for settling of Prophets and Merchants in) would be triggered by
1. the appearance of a Prophet or Merchant and the decision that it would be worth Settling Them
OR
Corporation
2. the minimum cities

Heavily favoring a Holy City with a Shrine

Science Cities... the same triggered by either a Scientist that they decide to settle OR Education

The issue with City builds is there are basically 4 kinds

I. Limit per Empire City Boosters (National Wonders, Great Library, Super specialists, Academies, Military Academies, Cathedrals)

II. Limited Empire Boosters (All other World Wonders, Projects)

III. Unlimited Empire boosters (Units)

IV. City Boosters (Most City Improvements)

Type I you want in the 'Best' City for it to be in.

Type II you want to be in the best highest Hammer City

Type III you want to build in the 'Best' City for it to be built in.

Type IV you want built whenever there isn't something better to do.

The best way I can see to do this is have the AI value building the National Wonder/Wonder/Project in City X based on

1. The basic Value of the NW/W/P to the AI in That City

2. Times the chance the AI will "get it" with this city based on how long it will take to build here combined with how much lead/lag the AI Thinks it has. (considering any Great Engineers it has been saving.)

1. would be the same in each city for most Wonders (exceptions Verssailes and the Great Library)

2. would be the same in each city for the National Wonders (chance of losing it = 0)

Factor 1 just needs to be made Very strong for National Wonders, so that they go to the "Right" city (designated Science, Gold or GP Farm)

You can't really have one 'designated' Military city since there are three Military NWs and you may want more than one unit pumper.

so for those I would just suggest synergy (the more Military buildings you have, the more valuable another one, or a unit, will be in that city, but with the National Wonders/Military Academies+Instructors involving a Strong Synergy, but low basic value) Although Instructors in a city should probably work against new Instructors because of the diminishing returns of additional exp.
 
someone earlier talked about making a AI GP Farms. I think that would be good if that decision was triggered when Literature is researched (or Researchable) because it is the National Epic that makes the GP Farm worthwhile. It would also require X Cities of course


I talked about Great Person Farms earlier. And I agree with your rquirement of the National Epic. I talked about the specialist enabling buildings and that the National Epic should be placed in that city, but it is actually quite logical to wait for the Natinal Epic before you create a great person farm. And of course a certain number of cities is required and it's better if the AI is not at war when it decides to build such a city.

I also agree with the other specialist cities, but those are probably already in the game in some limited sense. Blake talked about some logic for placing Wall Street, Oxford University and other small wonders (IIRC). It would be nice if the terrain around the city would be adjusted to make the benefits of these small wonders as big as possible. However, building a Great Person Farm really requires the change in terrain as without a lot of farms, the Great Person Farm will not work at all. I think the major difficulty is in marking the city and making the AI understand that the terraforming logic is different around that city than in every other city. If the AI can be made to build Great Person Farms, than the other specialist cities will be rather easy I think.
 
Back
Top Bottom