Report Questionable Behavior

Asking someone to join you in a war. Then ending it next turn. It is ridiculously common in Civ4...

I'd argue that so long as the person you asked to join the war cannot talk to the person they went to war with, neither should the asker.
 
I'm not seeing how that change would make the AI play better ( remember that this is the point in this mod ) ... in fact I'm not seeing how the phenomenon you are describing can be filed as bad. You can call it annoying, surely, but calling someone for a war and going out if it as soon as you made the other part enter is not necessarily a bad idea. Now doing that with no particular reason... that is a completely diferent issue ;)
 
It would apply to the player as well.

In effect, if you ask an AI to engage in war, you are locked into the war as well (as if you just went to war) for a similar period of time.
 
I don't think that is necessarily questionable behaviour. More fool you for accepting the AI's request to commit yourself to a battle you weren't already involved in. I'd probably try to manipulate a human player like that, too. ;)
 
I don't think that is necessarily questionable behaviour. More fool you for accepting the AI's request to commit yourself to a battle you weren't already involved in. I'd probably try to manipulate a human player like that, too. ;)
And the player should (in theory) be able to manipulate the AI in a similar way (Y go to war with X, then go to peace with X leaving Y fighting X). Forcing the person who asks Y to join the war be locked out of diplomatic contact with X just as long as Y is makes as much sense as Y being locked out of diplomatic contact in the first place.
 
So, what you are actually saying is that you don't like the philosophy behind this behaviour, and not that you think the behaviour is questionable in terms of AI smartness, since , as you admit implicitely in the above post , it makes equal sense to use the current aproach or the one you propose...
 
That is quite wierd... can you post a save from just before the chop?

Ok, I solved it. I had just been building culture, research or wealth at the city while chopping 5 tiles...:blush:

But I still don't understand the railroads. I guess this isn't a bug either but rather some game rule I'm not aware off, but I just don't get it. The city is not yet linked to my other cities so it doesn't have coal hooked up yet, but I can still railroad the coast tiles. I'm thinking this is because the ocean works as a trade network so the workers have the required coal to build rr, but how come the railroad doesn't link the new city with my existing trade network? Is it because the city itself isn't on coast?
 

Attachments

  • Test AD-1955-July.CivBeyondSwordSave
    1.5 MB · Views: 73
Not exactly...

The toggle of the trade route groups ( that also decide if a tile has acess to the resources that are avaliable ...a tile has only acess to the resources that the cities in the same trade group have ):
Spoiler :

The tiles in turquoise have connection to the capital, hence have acess to the railroads resources. The light blue ones belong to other trade route group, and because of that they only have acess to the resources that are present inside the trade route ( that is, none ;) ). The tiles without color don't have acess to any trade route group ....

As you can see easily, the tiles where you can build the railroads are the ones that belong to the turquoise trade route group and it also clear that they only belong there because of the river ( river mouths count as forts or cities in terms of trade routes, and rivers act as roads )

This is not a bug, just a uncommon trade route situation ;) You can solve that easily by making a road in the farm tile NW of the city, the plains forest N of the city:
Spoiler :

or by roading to the other river in the east of the city.
 
I've always found this weird.

In CvCityAI::AI_specialistValue the value of a specialist is nowhere modified by the city's CvCity::getTotalGreatPeopleRateModifier().

Rather the opposite: the great people point value is divided by the player's average AI_averageGreatPeopleMultiplier(). So as far as I can tell, the higher your great people point modifier, the less valuable the AI will think specialists are. I am missing some part of the picture here, or this is a bug that has always been present?
 
I've always found this weird.

In CvCityAI::AI_specialistValue the value of a specialist is nowhere modified by the city's CvCity::getTotalGreatPeopleRateModifier().

Rather the opposite: the great people point value is divided by the player's average AI_averageGreatPeopleMultiplier(). So as far as I can tell, the higher your great people point modifier, the less valuable the AI will think specialists are. I am missing some part of the picture here, or this is a bug that has always been present?
I think the idea is that, if elsewhere you have a huge great people factory, you don't want to build great people HERE.

But for this to work, you at the least have to scale the GPP of this specialist to include this cities multiplier. You sure that never happens?
 
I can't see anything. Check for yourself I'd say! It would be nice to know I'm not going crazy.

The idea you describe sounds good at first sight, but on second sight... I don't know. For instance even with a city multiplier, if you're running Pacifism but have no other modifiers in any city, the averagesmultiplier would still cause great people to be just as valuable as under a non-Pacifism civic, even in the city most likely to produce a great person. I don't think that's smart behaviour.
 
I've given a quick look to the function Maniac pointed outand the only references to GP rate modifiers I noticed are commented out... :confused:

And just to add something on my own, the decisions made on this part of the same function:
Code:
        if (!isHuman() && (iCurrentEra <= ((iTotalEras * 2) / 3)))
        {
            // try to spawn a prophet for any shrines we have yet to build
            bool bNeedProphet = false;
            int iBestSpreadValue = 0;

			
			for (iJ = 0; iJ < GC.getNumReligionInfos(); iJ++)
            {
                ReligionTypes eReligion = (ReligionTypes) iJ;

                if (isHolyCity(eReligion) && !hasShrine(eReligion)
                	&& ((iCurrentEra < iTotalEras / 2) || GC.getGameINLINE().countReligionLevels(eReligion) >= 10))
                {
					CvCivilizationInfo* pCivilizationInfo = &GC.getCivilizationInfo(getCivilizationType());
					
					int iUnitClass = GC.getSpecialistInfo(eSpecialist).getGreatPeopleUnitClass();
                    FAssert(iUnitClass != NO_UNITCLASS);
                    
					UnitTypes eGreatPeopleUnit = (UnitTypes) pCivilizationInfo->getCivilizationUnits(iUnitClass);
					if (eGreatPeopleUnit != NO_UNIT)
					{
						// note, for normal XML, this count will be one (there is only 1 shrine building for each religion)
						int	shrineBuildingCount = GC.getGameINLINE().getShrineBuildingCount(eReligion);
						for (int iI = 0; iI < shrineBuildingCount; iI++)
						{
							int eBuilding = (int) GC.getGameINLINE().getShrineBuilding(iI, eReligion);
							
							// if this unit builds or forceBuilds this building
							if (GC.getUnitInfo(eGreatPeopleUnit).getBuildings(eBuilding) || GC.getUnitInfo(eGreatPeopleUnit).getForceBuildings(eBuilding))
							{
								bNeedProphet = true;
								iBestSpreadValue = std::max(iBestSpreadValue, GC.getGameINLINE().countReligionLevels(eReligion));
							}
						}
				
					}
				}
			}

			if (bNeedProphet)
            {
                iTempValue += ((iGreatPeopleRate * iBestSpreadValue));
            }
		}
		iTempValue *= 100;
		iTempValue /= GET_PLAYER(getOwnerINLINE()).AI_averageGreatPeopleMultiplier();
		
		iTempValue /= (1 + iEmphasisCount);
		iValue += iTempValue
are a good example of things that currently are being done at city level and that should be centralized. You don't need all the cities considering to hire priests just because you have a shrine to do ( in fact this is a horribly inneficient way of doing that ).... First you calculate the ammount of Prophets you want, then you cicle the cities to see who can get them first and to those you say to hire priests if there is nothing more pressing to do ;)
 
Nice find Maniac, that was quite bizarre. Up through Warlords this part was much simpler and more logical, looks like Blake probably took a crack at it and that was incorporated into BTS.

In the next version, when the AI has a bonus for GP rate or is running a civic with a bonus, that will now make them MORE likely to use specialists instead of LESS. Wow. The value will also scale by the city's GP rate modifier, so that having a city with a high modifier makes that city more likely to go after GP instead of making all cities a little less likely to use specialists ...


rolo: I agree with you, unfortunately there isn't an easy way to make a centralized selection happen for specialists with the code structure of BTS.
 
jdog, the conventional wisdom is that if you have a +1000% great people city, working on great people in other cities is not worth bothering with.

So the math should be something like:
(civ-wide GPP multiplier) / (average multiplier GPP per city)
to find the "bias factor" (how does this city compare to the average in my civilization).

Then multiply that by the GPP multiplier in this city.

But I'd be afraid of out-of-control GPP spending being triggered by the above (feed in a +1000% GPP civ-wide multiplier...)
 
rolo: I agree with you, unfortunately there isn't an easy way to make a centralized selection happen for specialists with the code structure of BTS.
I know that it is hard to make such kind of centralization, but IMHO even saying to the AI governor that you only want one city trying to get prophets would help. There is no point both in terms of AI smartness or even on game performance to make ALL the cities of the empire consider going priest mode just because you want ONE Prophet. I wonder how badly this can gripe the AI when they have lots of cities....

@Yakk

I don't see how your solution could bring out of control GPP focus with a civ-wide 1000% modifier.... those 1000% would be added to both the civ-wide and the average GPP multiplier per city, right?
 
City multiplier: 11x
Average empire multiplier: 11x
Global multiplier: 11x

11/11 = 1, * 11 = 11.

So every city values GPP at 11 times the standard value, which might lead to growing GPP rather than feeding the city (or something not quite a stupid).

In effect, what we want is:
If you have a high GPP global multiplier, we should be building more GP.
If this city is higher than the empire average, it is our GP factory. We should focus on making GP here.
 
Ok, I understood your point ....

Then how about reversing it? Instead of going via modifiers, simply get the city that has the conditions to get a GP out faster and make it go specs?
 
So the math should be something like:
(civ-wide GPP multiplier) / (average multiplier GPP per city)
to find the "bias factor" (how does this city compare to the average in my civilization).

Then multiply that by the GPP multiplier in this city.

I assume with (civ-wide GPP multiplier) you mean everything in CvCity::getTotalGreatPeopleRateModifier() except getGreatPeopleRateModifier(). Granted, this doesn't happen in vanilla Civ (but it can happen in Planetfall for instance), but I see a problem when the only GPP modifiers a faction has are the city's getGreatPeopleRateModifier(), and almost all cities have the building giving the GPP modifier. Then the numbers would be:
(civ-wide GPP multiplier) = 100
GPP multiplier in this city = 150
(average multiplier GPP per city) = 150

100 * 150 / 150

You'd end up with every city valueing great people as if they hadn't a positive great people modifier.
 
Domination AI. There is code in CvCityAI::AI_chooseProductionto focus on building health when we are within 90% of a domination win. I notice that it uses this to determine its proportion of the population for the purposes of domination:

Code:
int iOurPopPercent = 100 * GET_TEAM(getTeam()).getTotalPopulation() / std::max(1, GC.getGameINLINE().getTotalPopulation());

Since Warlords, you can use 50% of the population of your vassals towards a domination in. Therefore, I believe this code should be using:

Code:
GET_TEAM(getTeam()).getTotalPopulation([B]true[/B])

On a side note, it seems like this logic could be expanded to include buildings that produce food directly (eg, Supermarket). Similarly, if we have unused food-producing tiles and unhappiness, we might want to build happiness, either via units or buildings. Also, shouldn't this be restricted to cases where the AI isn't in a land war?
 
Top Bottom