Report Questionable Behavior

I think thar your ideas are very good...
I can't suggest more detailed ideas because I don't know how AI works at program code level and how AI logic is handled for attack / defense but I think that implementing human strategies is a good idea.

For example: when I attack in modern era I use fighters or bomber for pillage resources which are in the range of action prioritizing strategic and then food, then I move my air units to the new captured city and so on... Obviously I also use air units to reduce city's defence and air strike defending units. It would be wonderful that AI will handle this tactic. But I think that first is better develope a ground-unit tactic. I think that gunship are amazing for enter deep in enemy territory and pillage but they can easily countered by mech infantry or sam infantry...

Another example: in modern era I protect strategic resources like Oil, Aluminum and Uranium in this manner: 1 spy, 1 or plus sam infantry or 1 mobile sam, 1 or plus mech infantry / tanks depending the proximity with te enemy or the coast.

Thanks for developing BBAI!!!:goodjob::goodjob::goodjob:

I'm sure that you will make a great job as always.
 
I'll keep thinking about the right way to implement this ... any other ideas or comments?

Just that I'll be very much looking forward to this particular AI upgrade, and that I'm really glad I don't have to try and do it myself. ;)
 
I think that getting small pillaging stacks to sit on important enemy resources would be the way to go since they will already be out and about in enemy territory. Maybe give some extra weight towards aggressive defense of resources if the resource is in terrain with a defensive bonus?
 
Greetings! I've just merged your awesome AI dll into my new mod I've just started to develop, and I've got a strange issue here.

You see Mutfruits to the right of Villinois. They would add +3 food with a plantation and would make Villinois to grow further. But workers seem to ignore the resource for 200+ turns. They have the technology and no matter how many turns I autoplay they totally ignore it. What could cause it?
 

Attachments

  • Civ4ScreenShot0145.JPG
    Civ4ScreenShot0145.JPG
    205.1 KB · Views: 357
@jdog: are you sure you have improved city raze behavior? I'm playing with latest SVN and the AI just razed a 21 pop city with an high amount of villages.... near own borders.
 
well, in the makefile? not active atm, therefore: dunno why razed.

----

I guess the AI could still spend money better on universal suffrage:



Thats nearly 50 modern armors within one round... or even more, dunno.
 
@jdog: are you sure you have improved city raze behavior? I'm playing with latest SVN and the AI just razed a 21 pop city with an high amount of villages.... near own borders.

jdog added some code recently that will cause the AI to raze high culture cities if it thinks their opponent is using it to push for a cultural victory.

Code:
		// Reasons to always raze
		if( 2*pCity->getCulture(pCity->getPreviousOwner()) > pCity->getCultureThreshold(GC.getGameINLINE().culturalVictoryCultureLevel()) )
		{
			CvCity* pLoopCity;
			int iLoop;
			int iHighCultureCount = 1;

			for( pLoopCity = GET_PLAYER(pCity->getPreviousOwner()).firstCity(&iLoop); pLoopCity != NULL; pLoopCity = GET_PLAYER(pCity->getPreviousOwner()).nextCity(&iLoop) )
			{
				if( 2*pLoopCity->getCulture(pCity->getPreviousOwner()) > pLoopCity->getCultureThreshold(GC.getGameINLINE().culturalVictoryCultureLevel()) )
				{
					iHighCultureCount++;
					if( iHighCultureCount >= GC.getGameINLINE().culturalVictoryNumCultureCities() )
					{
						//Raze city enemy needs for cultural victory unless we greatly over power them
						logBBAI( "  Razing enemy cultural victory city" );
						bRaze = true;
					}
				}
			}
		}
 
@jdog: are you sure you have improved city raze behavior? I'm playing with latest SVN and the AI just razed a 21 pop city with an high amount of villages.... near own borders.

If it was close to their borders, then this must have been from one of the very raze happy AIs ...

Brennus: 50%
Ghengis: 75%
Montezuma: 50%
Ragnar: 50%
Shaka: 50%

These are the percentages from BTS, I haven't changed them ... I've just made it so they're actually used sometimes (there were bugs in the calculations before). There are maybe 7 more leaders with odds >= 20%, but more than half of leaders have 0% odds (33/53).

These percentages are adjusted up and down by various factors, like closeness to rest of empire, chance enemy will recapture, wonders, etc. For the five leaders above there will still be a chance they simply destroy nice looking cities near their empire (lower than the percentages above). For the other 90% of leaders, the chance is 0 without some other strong factors.
 
First I must say that I'm not an AI expert nor an unbelievably good player. But still I have a small suggestion that depends on can or should it be implemented.

So I had a city around 20 defenders (cavalry, riflemen, cannons, etc.). I was preparing for a war with my neighbour Shaka. :cool: He had been annoyed towards me since the begining so I was expecting an attack. Also his unit building was mad, about million soldiers. First I tried to keep up with him but after my economy started to collapse I had to stop it. (He had founded and spread his religion to all over the world :crazyeye:) Then after years of waiting, a 20 units stack of doom appeared near my border city. :eek: I quickly began to improve my defences. The stack moved near my city preparing to attack and raze it, but before they could do anything my airships and cannons had weakened them and my cavalry and riflemen did the final blow.
This is very normal behaviour. But the point is that the next turn there appeared another 20 stack that also moved near my city and got slaughtered. But this time it was thougher. If both of those stacks had arrived at the same time I would have lost my city and most of military, but instead they attacked separately and died.
So finally (I like to write stories :p), my reguest is to make the AI consider if there are other stacks moving to the same place. IIRC the stack AI isn't aware of other stacks, but I can be wrong. Also I would like to hear what you think of this idea.

PS: I don't know if this "questionable" behavior, but I had no other idea where to post this.
 
It is possible to coordinate timing between multiple stacks once the stacks have committed to attacking the same city ... until the stacks have selected their targets, the decisions are individual: is the stack big enough to capture the city?

It sounds like in this circumstance some more coordination would have made a big difference and with the second stack arriving just a turn later there's a possibility for coordination.

Some questions:
1. How far did the stacks have to travel inside your territory to reach your city?
2. How many airships did you have?
3. Were Shaka's stacks also a mixture of rifles, cavalry, and cannon?

If you have a screenshot or two that would also be helpful.
 
The AI just razed a city with 6 active wonders in it. This is questionable. ;) (Perikles)
 
It is possible to coordinate timing between multiple stacks once the stacks have committed to attacking the same city ... until the stacks have selected their targets, the decisions are individual: is the stack big enough to capture the city?

It sounds like in this circumstance some more coordination would have made a big difference and with the second stack arriving just a turn later there's a possibility for coordination.

Some questions:
1. How far did the stacks have to travel inside your territory to reach your city?
2. How many airships did you have?
3. Were Shaka's stacks also a mixture of rifles, cavalry, and cannon?

If you have a screenshot or two that would also be helpful.

I don't have a screenshot of it, but I illustrated it with paint. :D
So the first stack came from Ulundi (zulu capital) and the second stack from the city which name I can't see now. The red lines show where the border was. And I had few grenadiers in that fort near zulu border.

1. They had to move just one plot from their own territory.
2. I had 4 airships but my cannons where doing most of the job.
3. No, Shaka didn't have any horses nor the tech that rifleman requires. Instead they had lots of cannons and grenadiers. Grenadiers are good at attacking riflemen but they didn't have a chance to do so.

I hope this information was useful.
 

Attachments

  • Civ4ScreenShot0063.jpg
    Civ4ScreenShot0063.jpg
    208.1 KB · Views: 141
Top Bottom