Mitchum
Deity
I thought that he was on the forest at gold resource-2N at the start of your turn... checking save... yes, he was. He moved 1W this turn.
If we delay pottery we can save enough gold to upgrade a warrior to an axe to escort the 2nd settler.
else if GC.getGameINLINE().getNumCivCities() > GC.getGameINLINE().countCivPlayersAlive() * 3
@ZPV:
When the barbs switch to AREAAI_OFFENSIVE (3 cities per player), do they remain in that state for a set number of turns?
With this formula:doesn't that mean there have to be 10*3+1 cities to get a TRUE value?Code:else if GC.getGameINLINE().getNumCivCities() > GC.getGameINLINE().countCivPlayersAlive() * 3
For pillaging, does the 1 mean the barb has to already be on the tile? In other words, for attack 1, the barb is next to the tile it attacks, but for pillage 1, the barb would have to be on the tile to pillage it. (I vaguely remember something from klarius on this point, but it may be faulty memory).
Well, for whatever reason, the Barb Archer wasn't being lured by improvements 2 squares away... perhaps the Hills and Forests blocked its view and without the improvement existing for 20 turns and without visibility, the Barbs "don't know about it" and thus can't target it?Nope - pillage(1) will pillage an adjacent tile (or for units with 2 moves, a tile 2 tiles away).
@magnus: Let's go ahead and switch our espionage points to Hammy.
We could even aim to settle 1N of the Marble and later settle a different City on top of the Banana to grab the Crab. Then we'd have no worry with the Barb Archer until we hit the 30-Cities mark.
Attached is an updated test saved game.
Sure, let's do it.@magnus: Let's go ahead and switch our espionage points to Hammy.
Maybe, maybe not. It might work out better to have the Barb Archer "rush" us, since then we can defend on a fortified position and will have more time to have whipped up an Axeman.LowtherCastle said:There are now 25 cities worldwide, still no barb cities. That means there are probably 5 AIs with only 2 cities. Hard to say when we'll reach 31 cities worldwide. If not before, most likely when we build Crab, so barbs will then beeline our cities. It will be preferable to eliminate that barb archer before then.
Well, I was suggesting settling on top of the Banana for a couple of reasons:magnusmarcus said:Note we dont "have" to settle on the banana to get the crab. We could also settle a city 2 tiles s of marble as well and settle I think its nw of banana (Which happens to be river connected)
Obviously, we have a chance here, thanks to where Toku's Archer moved (1W) in the real game. I'm sure that there is an "explore unexplored land" factor and that there is a random factor. AI movement is not deterministic, but there is very likely a deterministic weighting... but, if you play a test game and then change some things that will cause a random number to change, you can get an AI unit to move in different directions. So, we're still going to have to rely on random number generation to some degree here.LowtherCastle said:Assuming that Toku's archer doesn't run into any barbs, he'll continue to explore, I assume.
Okay, ZPV, I took a stab at code-diving, just for a bit of fun. I might be completely out to lunch on this, but this is what I've got. COrrect me where I'm wrong, or don't bother if I'm all wrong.
Looking in UnitAI.cpp, I studied the ExploreRange function, which seems to be the key function called from other functions such as AttackMove and Explore. ER(3) calls the searchRange function and returns (3+1)*(1+1)=8. So this crazy ER function examines an area of 17x17 tiles iiuc. (No wonder AI scouts seem like they're able to beeline goody huts.) For each tile, it seems to only assign points to three characteristics:
100,000 Goody hut
10,000 fogged
1,000 each for adjacent tile(s) fogged
Then if the tile has received any points and satisfies a few more conditions (no enemy there, MISSIONAI, whatever that is, reachable by peaceful path, within 3 tiles of starting point) if can get more for:
RNG(10,000)
10,000 Next to land tile
5,000 owned by AI
Adjusted for diagonal direction (I didn't bother to study carefully but I assume it's divided by some part of 1.5 for diagonalness)
Then the most valuable tile wins the contest, if there is at least one and the archer sets off in that direction. Rinse and repeat each turn.
There are some details in the above function that I definitely don't understand. I couldn't find the PROFILE function anywhere and I couldn't find the AI_plotValid function.
----------------
Okay, looking at the above map I made, I understand why T54 1W would make sense, but now I don't understand why T53 1SE . That move was in the opposite direction of any fogged tiles.
----------------
With all that said, my general impression from this function is that, yes, the archer is likely to explore to the SW because that direction provides more path-reachable fogged tiles.
Three more questions to the above:
1. I'm not sure what atPlot() is.
2. As far as I can tell, iPathTurns must be <= iRange, that is, the best tile must be within 3 tiles for ER(3) or this function returns FALSE. If that's the case, then why in the world does it examine a 17x17 matrix?
3. I couldn't figure out if fogged water tiles count too.