SGOTM 16 - Kakumeika

Okay, I get the power. +4=TW. +2=Pop8. +3=archer in Vienne.

===

Here's what I suggest: First move the slave 1W, so we can see if it's safe to move him to Silk-1W.

My thinking is that we might have to bail out on pillaging the copper, but at least we can try to get the slave through rapidly. To do that, I'm thinking Louis goes NE-NE !!! The idea is to threaten his CIty3, defended by only an archer. Hopefully this will draw the axe onto the hill mine. But since he'll complete another axe IT, we don't want it to move NW/W, so it's better if the slave is not on the silk, but west of it, if possible. Meanwhile, Eve should probably stay put, to possibly draw a unit southward.

Whaddaya think?

xpost w/ STW


..

Don't you think the axe would be lured 1S1W to get the worker? Is a warrior such a threat to an archer defended city? or the AI fears threatened cities most?
 
I favor pillaging the copper. Losing 1 Woodsman II warrior to try to prevent multiple axes from being produced is a good trade.

I recommend a pause or stopping point to discuss.

it's a big loss.
But, we've been counting on the pillage gold to get some research done.

Everyone agrees on the pause?

upload game?
 
Don't you think the axe would be lured 1S1W to get the worker? Is a warrior such a threat to an archer defended city? or the AI fears threatened cities most?
DOn't konw the code on that, but my experience is that the AI will try to beef up his city protection as fast as possible. Okay, I agree with SHulec, let's stop for 24 hours. We can examine the unit preferences. I believe that Axe is probably something like AI_COUNTER, but we can take a look and see how threatening a worker matches up with protecting a city.

xpost: Yeah, let's pause. I prefer uploading. I don't care about other teams seeing our scores.
 
OK, counting mine it's 3 votes for a 24 hours pause. With five teammembers online, it's a majority.

uploading now. will post passive intelligence info later/tomorrow when I figure how to make nice
Code:
 tables.

cheers

EDIT: 

session turn log

[SPOILER]Here is your Session Turn Log from 2040 BC to 1920 BC:

Turn 49, 2040 BC: You have discovered Animal Husbandry!
Turn 49, 2040 BC: You have discovered Mysticism!
Turn 49, 2040 BC: You have discovered Hunting!
Turn 49, 2040 BC: You have discovered Mining!
Turn 49, 2040 BC: You have declared war on Brennus!

Turn 50, 2000 BC: You are the worst enemy of Brennus.
Turn 50, 2000 BC: Ramesses II will trade Archery

Turn 51, 1960 BC: The enemy has been spotted near Paris!
Turn 51, 1960 BC: Ramesses II will trade Bronze Working
Turn 51, 1960 BC: You have discovered Bronze Working!
Turn 51, 1960 BC: You have discovered Archery!
Turn 51, 1960 BC: Ramesses II adopts Slavery!

Turn 52, 1920 BC: The enemy has been spotted near Paris![/SPOILER]


[SPOILER]Reference number: 	11865
Game: 	C-IV SGOTM 16
Your team: 	Kakumeika
Your name: 	Walter_Wolf
Date submitted: 	2012-10-15
Software Version: 	BtS 3.19
Game date: 	1920BC
Total turns played: 	52
Session turns played: 	3
Player race: 	France
Firaxis score: 	184
Session time played (hh:mm:ss): 	02:53:04
Total time played (hh:mm:ss): 	08:06:10
Game status: 	Incomplete
Submitted save: 	Louis XIV_1920-BC_Oct-16-2012_00-48-10.CivBeyondSwordSave
Renamed file:	Kakumeika_SG016_BC1920_01.CivBeyondSwordSave
	
Right click the Renamed File link above to copy it.
You can then paste it into your team post as the download link for the next player.
News Update: 	Humbaba is still alive[/SPOILER]



BUFFY log:

[SPOILER]Logging by BUFFY 3.19.003 (BtS 3.19)
------------------------------------------------
[u][b]Turn 49/500 (2040 BC) [10-Oct-2012 00:21:51][/b][/u]
[color="Green"]Tech traded to Ramesses II (Egypt): Writing[/color]
[color="Green"]Tech acquired (trade, lightbulb, hut, espionage): Animal Husbandry[/color]

Logging by BUFFY 3.19.003 (BtS 3.19)
------------------------------------------------
[u][b]Turn 49/500 (2040 BC) [10-Oct-2012 08:35:46][/b][/u]
[color="Green"]Tech traded to Brennus (Celtia): Agriculture[/color]
[color="Green"]Tech traded to Brennus (Celtia): Writing[/color]
[color="Green"]Tech traded to Brennus (Celtia): The Wheel[/color]
[color="Green"]Tech acquired (trade, lightbulb, hut, espionage): Mysticism[/color]
[color="Green"]Tech acquired (trade, lightbulb, hut, espionage): Hunting[/color]
[color="Green"]Tech acquired (trade, lightbulb, hut, espionage): Mining[/color]

Logging by BUFFY 3.19.003 (BtS 3.19)
------------------------------------------------
[u][b]Turn 49/500 (2040 BC) [15-Oct-2012 22:37:23][/b][/u]
[color="Green"]Research begun: Meditation (125 Turns)[/color]
[color="Green"]Research begun: Priesthood (125 Turns)[/color]
[color="Green"]Research begun: Mathematics (125 Turns)[/color]
[color="Green"]Research begun: Meditation (125 Turns)[/color]
[color="Red"]Louis XIV (France) declares war on Brennus (Celtia)[/color]
[color="DarkRed"]While attacking in the wild near Bibracte, Eve (2.00/2) defeats Celtic Worker (Prob Victory: 0.0%)[/color]
[color="Blue"]0% Research: 0 per turn[/color]
[color="Blue"]0% Espionage: 4 per turn[/color]
[color="Blue"]100% Gold: 17 per turn, 0 in the bank[/color]

[b]After End Turn:[/b]
[color="Purple"]Paris finishes: Library[/color]

[b]Other Player Actions:[/b]
[color="Blue"]Attitude Change: Brennus (Celtia) towards Louis XIV (France), from 'Cautious' to 'Annoyed'[/color]

[u][b]Turn 50/500 (2000 BC) [15-Oct-2012 22:41:00][/b][/u]
[color="Purple"]Paris begins: Settler (9 turns)[/color]
[color="Blue"]100% Research: 37 per turn[/color]
[color="Blue"]0% Espionage: 4 per turn[/color]
[color="Blue"]0% Gold: -3 per turn, 17 in the bank[/color]

[b]After End Turn:[/b]
[color="RoyalBlue"]A Hamlet was built near Paris[/color]

[u][b]Turn 51/500 (1960 BC) [15-Oct-2012 23:04:48][/b][/u]
[color="Green"]Tech traded to Ramesses II (Egypt): Alphabet[/color]
[color="Green"]Tech acquired (trade, lightbulb, hut, espionage): Bronze Working[/color]
[color="Green"]Tech acquired (trade, lightbulb, hut, espionage): Archery[/color]
[color="Blue"]100% Research: 38 per turn[/color]
[color="Blue"]0% Espionage: 4 per turn[/color]
[color="Blue"]0% Gold: -3 per turn, 14 in the bank[/color]

[b]After End Turn:[/b]

[b]Other Player Actions:[/b]
[color="SeaGreen"]Civics Change: Ramesses II(Egypt) from 'Tribalism' to 'Slavery'[/color]

[u][b]Turn 52/500 (1920 BC) [15-Oct-2012 23:27:10][/b][/u]
[color="RoyalBlue"]A Pasture was built near Orleans[/color][/SPOILER]
 
Check out our score and power graphs. That'll garner some attention...we'll have to check thread posts dated October 16-17 after the game... :)
 
If we do have to sacrifice a warrior, I would hope we can arrange to sacrifice Eve rather than Louis. I'm still holding out hope we can upgrade louis to an axe and we can continue to harass Brennus until we eventually take him out.

Do we have any copper near us?
 
@Tachy: Have you ever studied AI units? I can't read code properly, but my understanding is that each UNITAI_type will go through a sequence of checks to decide what to do each turn. Furthermore, the AI units will promote and move around according to _type. The CI axe came out with the threat by Louis. That probably tells us what _type he is likely to be, if we know the code. I vaguely remember klarius saying that _COUNTER was a common _type for CI axes or similar units.

In CvUnitAI.cpp, the UNITAI_COUNTER's first move is:

Code:
void CvUnitAI::AI_counterMove()
{
	PROFILE_FUNC();

	if (AI_guardCity(false, true, 1))
	{
		return;
The problem is, I can't understand this:
Code:
// Returns true if a mission was pushed...
bool CvUnitAI::AI_guardCity(bool bLeave, bool bSearch, int iMaxPath)
but near the bottom, it has this, which I think might be relavent to sending the axe to help defend BrennusCity3, but of course, I might be way off base:
Spoiler :
Code:
if (bSearch)
	{
		iBestValue = MAX_INT;
		pBestPlot = NULL;
		pBestGuardPlot = NULL;

		for (pLoopCity = GET_PLAYER(getOwnerINLINE()).firstCity(&iLoop); pLoopCity != NULL; pLoopCity = GET_PLAYER(getOwnerINLINE()).nextCity(&iLoop))
		{
			if (AI_plotValid(pLoopCity->plot()))
			{
				if (!(pLoopCity->AI_isDefended((!AI_isCityAIType()) ? pLoopCity->plot()->plotCount(PUF_canDefendGroupHead, -1, -1, getOwnerINLINE(), NO_TEAM, PUF_isNotCityAIType) : 0)))	// XXX check for other team's units?
				{
					if (!(pLoopCity->plot()->isVisibleEnemyUnit(this)))
					{
						if ((GC.getGame().getGameTurn() - pLoopCity->getGameTurnAcquired() < 10) || GET_PLAYER(getOwnerINLINE()).AI_plotTargetMissionAIs(pLoopCity->plot(), MISSIONAI_GUARD_CITY, getGroup()) < 2)
						{
							if (!atPlot(pLoopCity->plot()) && generatePath(pLoopCity->plot(), 0, true, &iPathTurns))
							{
								if (iPathTurns <= iMaxPath)
								{
									iValue = iPathTurns;

									if (iValue < iBestValue)
									{
										iBestValue = iValue;
										pBestPlot = getPathEndTurnPlot();
										pBestGuardPlot = pLoopCity->plot();
										FAssert(!atPlot(pBestPlot));
									}
								}
							}
						}
					}
				}
So the question is, if Louis moves 1NE-1NE to BrennusCIty3-1SW, will that possibly trigger the axe or other units to run to protect it?

Brennus has three units available to do that, the archer at Bibracte 1SE, the axe at Bibracte-1NW, and the new archer in Vienne. Next turn he'll probably have another axe in Bibracte as well. They'll move in the order I listed.

How many will get assigned to a mission to protect City3, if any?
I assume the archer at Bibracte-1SE would be assigned first, so then the question is, will the axe at Bibracte 1N also get assigned, or will the code consider 1 reinforcement for CIty3 enough?

EDIT: Hang on! If there is one archer garrisoning each city, one newly built archer in Vienne and one archer at Bibracte-1SE, then Bibracte only has one garrison!!! Can we leverage that somehow to get units to move back into Bibracte?
 
Possible solution (current turn is 52).

T52 - Eve and slave 1N1W to the silk; Louis 2N via the forest. Hope the axe moves 1S.
T53 - Eve 1S1W escapes the axe; Louis smells the forest, Slave moves to the other silk 1N1W. Axe moves to the silk or 1E.
T54 - Slave escapes 2N2E to the forest Louis was camping a lot.

The axe move 1S1W instead of 1S IBT 52 - 53 ruins the plan.
Okay, I think I actually like this plan, but I would move Louis 1NE-1NE. We have to assume that Bibracte will produce another axe IT. So my hope would be that the axe we see would move 1NE to the hill, while the new axe would move 1W to the forest.

Then Louis cold move to City3 1W to keep the pressure on the axe, but Louis stil has jungle to move westward to pick up the slave if it makes it through. The slave then goes to the other silk, as you planned, and Eve goes somewhere and we hope that the slave has clear sailing the following turn.


===

Now, if we knew that the new axe would go 1W to the forest, then 1SW to the silk, we could have Eve go with the slave to the other silk. Then the next turn Eve could move to the copper and sacrifice herself. The problem is, if the axe doesn't go to the silk but goes straight west, Eve is trapped without pillaging the copper. I would only do that if Tachy codedived and was sure the axe would go to the forested silk.
 
I haven't read the suggestions yet, I first wanted to decide what I would do.

Louis : NE-NE
Slave : W - W
Eve : E (on forest)

then Slave : N - N (on the other silk)
 
So, now reading the other plans. I like WalterWolf's plan with the Louis NE-NE that LC and I like.

In general, I'd say forget the pillage, save the worker and warriors.
 
So, now reading the other plans. I like WalterWolf's plan with the Louis NE-NE that LC and I like.

In general, I'd say forget the pillage, save the worker and warriors.

You are right. If we had reinforcement to harass, then a pillage would be an option. If we can get our units north, we have a good chance that a worker will come to the horse that we might be able to steal.
 
Is someone willing to test tactics where we can both pillage the Copper safely and get the Slave north of Brennus' culture too?

A few test games could be made with the most likely AI scripts defined for the Axeman and possibly the Archer too. We move our units in ways similar those suggested, except that we lure the Axeman 2 plots away from the copper mine such that Louis lands on the copper mine the same turn and pillages it the next turn and then flees via forests/jungles.

Later on we built Chariots or even Horse Archers to pillage Brennus' metals for good.

Sun Tzu Wu
 
The axe is likely to attack in the situation we are right now.

Someone else has to do those tests, I'm busy with LowtherCastle's questions...
 
Have you ever studied AI units?
Some parts, but too big of a file to have gone through.

through a sequence of checks
That's right. That's the break; that ends a check and passes to next check.

Furthermore, the AI units will promote and move around according to _type.
Perhaps be careful in using terms or deducing from what you see in the code.
Units are primarily classified in classes, then some classes have some subclasses called types of units.
Here's an example:

<Class>UNITCLASS_SWORDSMAN</Class>
<Type>UNIT_ROME_PRAETORIAN</Type>

In my calculator recently, that was an important definition to include.

but my understanding is that each UNITAI_type will go through a sequence of checks to decide what to do each turn.
That's a hunch but I think what you said about units moving in order of creation just like cities do seem the correct mechanics. Will come by this subject later....if possible.

From what I see about the beginning of CvUnitAI.cpp (and ignoring the very very first lines that have more about C++ customs on how to initialize a file) is:

Defines what happens to an unit after using up its movement point or after attacking (and thus no movement more). Also units loaded in transportation class of units like galleys, galleons, etc.
Then, it goes to define scripts for automated units (as automated units are also AI's) otherwise it lists a serie of scripts for each AI class.
If a unit has a corresponding script like UNITAI_COUNTER axe will gives AI_counterMove(), which defined later in the code.
Then upon findind that AI_counterMove(), inside there are other functions common to many units.

=======================


You were right city guarding is the first mission a counter-scripted unit will have if the conditions are satisfied. If not, it passes to the next one until finding a matching.

Code:
void CvUnitAI::AI_counterMove()
{
	PROFILE_FUNC();

	if (AI_guardCity(false, true, 1))
	{
		return;

Code:
// Returns true if a mission was pushed...
bool CvUnitAI::AI_guardCity(bool bLeave, bool bSearch, int iMaxPath)

What you did not understand was:

bLeave=false, bSearch=true and iMaxPath=1.

bLeave, bSearch are defined in AI_guardCity function.

Let's start with bLeave role:

Spoiler :
Code:
pPlot = plot();
	pCity = pPlot->getPlotCity();

	if ((pCity != NULL) && (pCity->getOwnerINLINE() == getOwnerINLINE())) // XXX check for other team?
	{
		if (bLeave && !(pCity->AI_isDanger()))
		{
			iExtra = 1;
		}
		else
		{
			iExtra = (bSearch ? 0 : -GET_PLAYER(getOwnerINLINE()).AI_getPlotDanger(pPlot, 2));
		}

		bDefend = false;

		if (pPlot->plotCount(PUF_canDefendGroupHead, -1, -1, getOwnerINLINE()) == 1) // XXX check for other team's units?
		{
			bDefend = true;
		}
		else if (!(pCity->AI_isDefended(((AI_isCityAIType()) ? -1 : 0) + iExtra))) // XXX check for other team's units?
		{
			if (AI_isCityAIType())
			{
				bDefend = true;
			}
			else
			{
				iCount = 0;

				pUnitNode = pPlot->headUnitNode();

				while (pUnitNode != NULL)
				{
					pLoopUnit = ::getUnit(pUnitNode->m_data);
					pUnitNode = pPlot->nextUnitNode(pUnitNode);

					if (pLoopUnit->getOwnerINLINE() == getOwnerINLINE())
					{
						if (pLoopUnit->isGroupHead())
						{
							if (!(pLoopUnit->isCargo()))
							{
								if (pLoopUnit->canDefend())
								{
									if (!(pLoopUnit->AI_isCityAIType()))
									{
										if (!(pLoopUnit->isHurt()))
										{
											if (pLoopUnit->isWaiting())
											{
												FAssert(pLoopUnit != this);
												iCount++;
											}
										}
									}
									else
									{
										if (pLoopUnit->getGroup()->getMissionType(0) != MISSION_SKIP)
										{
											iCount++;											
										}
									}
								}
							}
						}
					}
				}

				if (!(pCity->AI_isDefended(iCount + iExtra))) // XXX check for other team's units?
				{
					bDefend = true;
				}
			}
		}


Code:
pCity = pPlot->getPlotCity();

I think it defines that certain plot has a city settled onto it.

Code:
if ((pCity != NULL) && (pCity->getOwnerINLINE() == getOwnerINLINE()))

The first check is "this plot is necessarily a city plot AND is it ours? =Yes. "
The second:

Code:
		if (bLeave && !(pCity->AI_isDanger()))
		{
			iExtra = 1;
		}
		else
		{
			iExtra = (bSearch ? 0 : -GET_PLAYER(getOwnerINLINE()).AI_getPlotDanger(pPlot, 2));
		}

The second check fetchs bLeave (no need to understand what bLeave means except it makes the link between that check and the other bLeave in AI_guardCity() and it equals for our counter unit to false. ===> bLeave=false.
To complete the second check: if ( bLeave=false AND is the city plot in danger), then excute what's in {}.

What's the use of iExtra; let's see AI_danger() function CvCityAI.cpp.

Code:
		bool CvCityAI::AI_isDefended(int iExtra)
{
	PROFILE_FUNC();

	return ((plot()->plotCount(PUF_canDefendGroupHead, -1, -1, getOwnerINLINE(), NO_TEAM, PUF_isCityAIType) + iExtra) >= AI_neededDefenders()); // XXX check for other team's units?
}

What's AI_neededDefenders()? Well, that's what Klarius was likely to refer about holy cities incite to keep more defenders.

Spoiler :
Code:
int CvCityAI::AI_neededDefenders()
{
	PROFILE_FUNC();
	int iDefenders;
	bool bOffenseWar = ((area()->getAreaAIType(getTeam()) == AREAAI_OFFENSIVE) || (area()->getAreaAIType(getTeam()) == AREAAI_MASSING));
	bool bDefenseWar = ((area()->getAreaAIType(getTeam()) == AREAAI_DEFENSIVE));
	

	if (!(GET_TEAM(getTeam()).AI_isWarPossible()))
	{
		return 1;
	}
	
	if (isBarbarian())
	{
		iDefenders = 2 + ((getPopulation() - 2) / 7);
		return iDefenders;
	}
		
		

	iDefenders = 1;
	
	if (hasActiveWorldWonder() || isCapital())
	{
		iDefenders++;
	}
	
	if (!GET_PLAYER(getOwner()).AI_isDoStrategy(AI_STRATEGY_CRUSH))
	{
		iDefenders += AI_neededFloatingDefenders();
	}
	else
	{
		iDefenders += (AI_neededFloatingDefenders() + 2) / 4;
	}
	
	
	if (bDefenseWar)
	{
		if (!(plot()->isHills()))
		{
			iDefenders++;
		}
	}
	
	if ((GC.getGame().getGameTurn() - getGameTurnAcquired()) < 10)
	{
		if (bOffenseWar)
		{
			if (!hasActiveWorldWonder() && !isHolyCity())
			{
				iDefenders /= 2;
				iDefenders = std::max(1, iDefenders);
			}
		}		
	}
	
	if (GC.getGame().getGameTurn() - getGameTurnAcquired() < 10)
	{
		iDefenders = std::max(2, iDefenders);
		if (AI_isDanger())
		{
			iDefenders ++;
		}
		if (bDefenseWar)
		{
			iDefenders ++;
		}
	}
	
	if (GET_PLAYER(getOwnerINLINE()).AI_isDoStrategy(AI_STRATEGY_LAST_STAND))
	{
		iDefenders += 10;
	}
	
	iDefenders = std::max(iDefenders, AI_minDefenders());

	return iDefenders;
}

It is a serie of checks that modify iDefenders, thus the number of needed defenders in a city.

Let put an accent on the most important to us:

It starts with iDefenders = 1.
If the city is a capital ORhas an active wonder (SH with Astro is no longer active for instance), then execute iDefenders++, which means add +1 to the last iDefenders, this iDefenders=2.
In a defensewar=true (I suppose he's in a defense war because we're the agressors), then again iDefenders++ (thus iDefenders=3) for cities on flat terrains. (non-hilly).

Here's the part mentioning holy cities, but I'm not sure to grasp it entirely .

Spoiler :
Code:
if ((GC.getGame().getGameTurn() - getGameTurnAcquired()) < 10)
	{
		if (bOffenseWar)
		{
			if (!hasActiveWorldWonder() && !isHolyCity())
			{
				iDefenders /= 2;
				iDefenders = std::max(1, iDefenders);
			}
I think it has to do with captured cities more than those settled by the AI as it double checks don't make sense otherwise. First, it's under an offense war situation, this meaning creating more defenders for captured cities within which wonders are built and a religion was founded. For 9 turns after capture, the AI focuses on defenders, then move on.

Afterwards, there's another condition similar to that last one, but it's still for 9 turns earlier founded cities. Brennus capital was founded many more turns than that.

Anyways, after passing through those checks, it returns a precised iDefenders value.
In CvCityAI::AI_isDefended, it returns yes the city is well defended for a condition I can't grasp but include that iExtra from AI_guardCity. I can't go further because "plotCount" function is rather complex and too advanced to my level.

Anyways, what is that all talk about? Well, that C1 axe is not within city tile, thus doesn't respect the above rules and is probably something else than AI_isDefended.

Sorry, I can't go further, I burnt half my night on this. I thought I spot on something, but it kept calling further functions from other c++ and that was rather annoying as it got more and more complicated.

I'll see if I can see for bSearch part...later ofc.
 
Passive intelligence data:

Code:
               Esionage mission                    Score              
             -----------------------          ----------
Turn      Bitracte       Vienna          Brennus      Ramesses         Power ratio (w Brennus)
------    ---------   ---------       --------      ---------            -----------------
T49           82           118            168 (+18)       133 (+6)                     0,5745
T50           74           135            168 (+18)       138 (+11)                    0,5745
T51          149          152            182 (+14)       144 (+6)                       0,5510
                                                        156 (+18)                    0,8367  - after the BW trade
T52          231            0              182               161 (+17)                  0,7885

EDIT: well, it's not really alligned, but still ...
 
Sorry Sun Tzu Wu

This is the situation:

attachment.php


Possible solution (current turn is 52).

T52 - Eve and slave 1N1W to the silk; Louis 2N via the forest. Hope the axe moves 1S.
T53 - Eve 1S1W escapes the axe; Louis smells the forest, Slave moves to the other silk 1N1W. Axe moves to the silk or 1E.
T54 - Slave escapes 2N2E to the forest Louis was camping a lot.

The axe move 1S1W instead of 1S IBT 52 - 53 ruins the plan.

EDIT: Brennus axe is combat1 promoted.



The archer 1S1E of Bibracte must be older than the axe, so if Brennus is going to fortify the Capital, it will do it with the archer I guess.

Possible solution (current turn is 52).

T52 - Eve and slave 1N1W to the silk Slave 1W, if safe from barbs, Eve 1N1W to the silk and Slave 1N1W to 1W of silk; Louis 2N 2N2E via the forest. Hope the axe moves 1S or 1N1E to threaten Louis.
I'm affraid this would make the axe moving 1S1W to threaten our two units instead of moving in the desired direction. Both Eve and slave to the silk might be better.


- If the axe moves 1S IBT 52 - 53:Eve 1S1W escapes the axe; Louis smells the forest, Slave moves to the other silk 1N1W. Axe moves to the silk or 1E next turn.

T54 - Slave escapes 2N1E to 1W of the forest Louis was camping a lot.



- If the axe moves 1N1E IBT 52 - 53:

Slave moves to the copper; Louis moves 1N to the jungle; Eve 1N to try to reach copper.

- If the axe moves 1S1W IBT 52 - 53,
Louis moves 1S to the G mine T53 to pillage or move to copper T54.Sl
ave &#731;&ve escape south to lure the axe further south, and if the bait works, Louis can go to back to copper T54/55. He'll have another axe by the time which complicates things.


EDIT: I didn't have time to finish this. will try a bit later
 
The axe is likely to attack in the situation we are right now.

Yes, the Axeman will almost certainly attack Louis if he pillages the Copper Mine. Louis will need to escape now while our other units lure the Axeman away. The Axeman may need to be lured 3 plots from the Copper Mine in 2t; then Louis can return to the Copper and we hope all units in Bibrate are AI_DEFEND, including any recently built unit. Louis pillages the Copper when the Axeman is still 2 plots away.

Sun Tzu Wu
 
Passive intelligence data:

Code:
               Esionage mission                    Score              
             -----------------------          ----------
Turn      Bitracte       Vienna          Brennus      Ramesses         Power ratio (w Brennus)
------    ---------   ---------       --------      ---------            -----------------
T49           82           118            168 (+18)       133 (+6)                     0,5745
T50           74           135            168 (+18)       138 (+11)                    0,5745
T51          149          152            182 (+14)       144 (+6)                       0,5510
                                                        156 (+18)                    0,8367  - after the BW trade
T52          231            0              182               161 (+17)                  0,7885

EDIT: well, it's not really alligned, but still ...
Brennus put 10h into something on T49, then switched builds after our tech trade and DoW.

Bibracte has 28h in its current build. This could be:
Code:
BUild  Cost Power  Comments 
-----  ---- -----  --------
axe     29h  6000 
spear   29h  4000 
Dun     37h  3000  assuming cost is 50h*85% ???
lib     76h        assuming 60h*85%
GW
The axe, spear or Dun would all complete T53, but his power change would tell us which.

===

EDIT: Walter, I use notepad when I want to align text for [ code ]. Notepad defaults to courier font which is the same as [ code ] so the simple alignment in Notepad doesn't get messed up here.

..
 
Code:
if (bDanger)
    {
        if (AI_cityAttack(1, 30))
        {
            return;
        }

        if (AI_anyAttack(1, 40))
        {
            return;
        }

Here's the definition of bdanger:

Code:
bool bDanger = (GET_PLAYER(getOwnerINLINE()).AI_getPlotDanger(plot(), 3) > 0);

It is defined that the unit feeling a danger (bdanger=true) can feel it at a range of 3 tiles. My hunch: that range is synced with an unit moving 3 tiles onto roads once Engineering is teched.
AI_getPlotDanger function in CvPlayerAI.cpp gives after checks a value called iCount.
If that iCount is just 1, that enough to trigger spiderman senses and force the unit to attack if threshold odds are fulfilled.

Just that little part of the code is sufficient to give at least one iCount:

Code:
iDistance = stepDistance(pPlot->getX_INLINE(), pPlot->getY_INLINE(), pLoopPlot->getX_INLINE(), pLoopPlot->getY_INLINE());
				    if (atWar(pLoopPlot->getTeam(), getTeam()))
				    {
				        if (iDistance == 1)
				        {
				            iBorderDanger++;
				        }
				        else if ((iDistance == 2) && (pLoopPlot->isRoute()))
				        {
				            iBorderDanger++;
				        }
				    }

Yes, Brennus' C1 axe is at a distance of 1 tile ("stepDistance" just mean diagonals are meant to be 1 tile of distance too), thus get one iBorderDanger.

Later in the code, that iBorderDanger is converted to iCount under condition the danger is not in human lands AND the danger is not within the city. Lol, that's not gonna happen...killed from within...

Code:
if (iBorderDanger > 0)
	{
	    if (!isHuman() && !pPlot->isCity())
	    {
            iCount += iBorderDanger;
	    }
	}

	return iCount;

To recapitulate, we have a C1 axe outside a city, thus likely doesn't guard the city.
bdanger=true, thus we pass to either AI_cityAttack(1, 30) or AI_anyAttack(1, 40).

AI_anyAttack(1, 40) is obviously the good one given the axe attacks on the field.
First argument is the range (next to the enemy unit) and the second is the odd threshold.
That is the unit must feel at least 40% odd of winning to attack. With our warrior, yuck, that way beyond that for C1 axe.

Q.E.D.

Oh man...I am starting to feel DanF's world coming bit by bit.
 
Back
Top Bottom