View Full Version : The AI and islands


Justy
Apr 04, 2008, 12:01 PM
Why is it that the AI seems to "know" where every island is? I understand that the AIs generally just sends units exploring everywhere and they trade maps frequently. Still the ability of the AI to find islands seems uncanny. Is there a specific "locate islands" algorithm in the programming?

I say this because when I trade maps with the AI later in the game I can usually guarantee that there is nothing in the black areas. You will see everywhere it has been. If there is an island to be found the AI has been there. It's wierd ya know?

bentley004
Apr 04, 2008, 12:04 PM
I'm sure they are programmed to search every tile on the map that they can. Unlike a human, the AI will never think, "its very unlikely an island is over there so I wont check."

Endure
Apr 04, 2008, 05:15 PM
No I agree with Justy. Even if you swap maps with the AI towards the early-mid game (when you can explore ocean squares) the AI will have black areas that are unexplored, but you can almost guarantee there's no islands there, even if the black areas are fairly large.

Maybe the AI enters world builder mode? :P

warpstorm
Apr 05, 2008, 07:45 AM
You can look at all the AI code in the SDK if you can read C++.

r_rolo1
Apr 05, 2008, 09:21 AM
AI ( Blake words ) is programed to have always a ship ( with a settler team inside if possible ) in explore duties, a thing that humans don't do as often as that. That alone explains why does the AI finds the lost islands first: they scout more than the humans.

Endure
Apr 05, 2008, 12:10 PM
I think you guys have missed the point that if there's areas of the ocean that the AI hasn't explored by the midpoint of the game, it seems there's never islands there. (You know the AI hasn't explored there because when you map trade, it's still a black area for you as well). So somehow the AI *knows* there's no islands there without exploring there first.

r_rolo1
Apr 05, 2008, 12:25 PM
^^You're taking conclusions too fast. I never noticed that phenomenon ( in the way you describe it ), but even if is true it does not lead immediatly to your conclusion ( BTW what map scrip you're using? I use fractal and B&S ( both tend to have some off board islands ) and never noticed something unusual about AI exploring routines )

bentley004
Apr 05, 2008, 02:09 PM
^^You're taking conclusions too fast. I never noticed that phenomenon ( in the way you describe it ), but even if is true it does not lead immediatly to your conclusion ( BTW what map scrip you're using? I use fractal and B&S ( both tend to have some off board islands ) and never noticed something unusual about AI exploring routines )

I've never noticed it either.

Refar
Apr 05, 2008, 06:03 PM
I think you guys have missed the point that if there's areas of the ocean that the AI hasn't explored by the midpoint of the game, it seems there's never islands there.I dont remember ever seeng that.

What i do remember seeing is the AI making obscene amounts of caravels - while i myself will often stick to the 2 i need to circumnavigate. No surprise they find everything sooner than me...

Bob-san
Apr 05, 2008, 06:24 PM
I usually try expensive tricks. If I'm circumnavigating the globe, I keep at least 1k GP in my treasury to buy a map. Odds are whoever you're meeting has the map of their entire continent. That, and I fuel war efforts by buying maps--I watch what happens during the war and keep somewhat up-to-date maps.

Refar
Apr 05, 2008, 06:26 PM
Funny... i usually go the other way around - i sell them map of my continent (to everyone on the same turn, or they will trade it among each other) and use the money i got to fuel my war effort :lol:

Justy
Apr 05, 2008, 08:37 PM
I think you guys have missed the point that if there's areas of the ocean that the AI hasn't explored by the midpoint of the game, it seems there's never islands there. (You know the AI hasn't explored there because when you map trade, it's still a black area for you as well). So somehow the AI *knows* there's no islands there without exploring there first.

Yes, you have noticed the same thing as I. You can almost guarantee that there are no islands in those black areas of the map. I wonder if there is a random attractor that will nudge the AI towards islands.

TheMeInTeam
Apr 05, 2008, 09:05 PM
Yes, you have noticed the same thing as I. You can almost guarantee that there are no islands in those black areas of the map. I wonder if there is a random attractor that will nudge the AI towards islands.

If there were, you could do it by teching optics first and pressing E with caravels.

More likely the AI just spams navy so finds things faster. I've had games where I knew where an island was long before the AI, because I was by far first to optics. LHC games ftw...

Justy
Apr 06, 2008, 08:19 PM
If there were, you could do it by teching optics first and pressing E with caravels.


Not if its a built in advantage for the AI. It could be compensation for the AI because the human player has an idea of where to look. Without this compensation the AI just chases down every unexplored pixel needlessly delaying the AI and giving an automatic advantage to the human.

A human using the explore feature may just get the function of your unit just randomly going to unexplored areas of the map.

Iamcameron
Apr 06, 2008, 08:27 PM
I have to definitely agree with the topic starter in that the AI has some way of knowing where the islands are. And it's not just that they build tons of caravels. Many times I have met a new civilization from another continent, and when I buy their map, it has their whole continent and a straight line, the path of one ship, toward mine.

JujuLautre
Apr 06, 2008, 08:44 PM
I do the same to get the circumnavigate bonus; don't you ?

Crowqueen
Apr 07, 2008, 06:47 AM
In my experience it knows where the islands are and dots its cities liberally about them as if it could build them happily light years from its capital without recourse to State Property. Or is there another Wonder I haven't heard about that allows all economic civics? No wonder they all have 0 Gold per Turn and about 20 wealth to spend on my technologies...

As for navy spamming the AI seems to forget that you can put two military units in a galley; Rome kept patrolling its former territory :):):D with galleys to wreck my fishing boats but with a couple of Praetorians in there too (not that I saw a single one during the war with it) it could have kept me busy behind the lines enough to slow down the rapid advance I was making towards Rome itself.

JujuLautre
Apr 07, 2008, 07:57 AM
In my experience it knows where the islands are and dots its cities liberally about them as if it could build them happily light years from its capital without recourse to State Property. Or is there another Wonder I haven't heard about that allows all economic civics? No wonder they all have 0 Gold per Turn and about 20 wealth to spend on my technologies...
If you're talking about what you can see in the foreign advisor, did you know that not everything appears here? So that an AI can have 1000 gold but only propose 200 for exchange?

As for navy spamming the AI seems to forget that you can put two military units in a galley; Rome kept patrolling its former territory :):):D with galleys to wreck my fishing boats but with a couple of Praetorians in there too (not that I saw a single one during the war with it) it could have kept me busy behind the lines enough to slow down the rapid advance I was making towards Rome itself.
Or perhaps they were just inside; you can't see the inside of a boat since warlords. Would also be stupid not to disembark them, but it was fyi.

r_rolo1
Apr 07, 2008, 08:27 AM
In my experience it knows where the islands are and dots its cities liberally about them as if it could build them happily light years from its capital without recourse to State Property.
Please post a save that clearly shows that.... otherwise it will be not more than anedoctal. And if you want, just go to WB and give yourself enough GSpies to infiltrate the AI and see his city screens... they pay heavily for that island cities as humans do

Crowqueen
Apr 07, 2008, 08:50 AM
If you're talking about what you can see in the foreign advisor, did you know that not everything appears here? So that an AI can have 1000 gold but only propose 200 for exchange?


I understand the principle you're citing here (I was being slightly facetious, hey, I'm a crow!) but it doesn't alter the fact that if I settle as far away from my metropolis as the AI tends to do, I incur massive debts as a result. I have a big sprawl as Gilgamesh and Pacal has a small but dense empire at the base of the continent. At the northern end Pacal establishes a network of tiny cities one next to the other. He's my vassal, so I guess I'm funding them, but still, if there is no space left for them they will find space beyond the continent in places that, if I wasn't running a wealth-economy to fund territorial expansion onto the next continent (on a Terra map), would cripple me. I can understand that Pacal is probably running a similar economy and is a Financial leader, but still, it seems that it is programmed to go crazy with city building rather than using its existing bases in the islands more efficiently.

Or perhaps they were just inside; you can't see the inside of a boat since warlords. Would also be stupid not to disembark them, but it was fyi.

That occurred to me at the time, which is why I panicked when I saw the galley. However you overlook the fact that you can see how many units a boat is carrying by the number of dots above its flag. Thus I could see that the boat was empty because a boat has one dot for the boat, and another two, three or four for its contents.

As for a save game, yes I do have a number of anecdotal ones but it seems to be a pattern with some leaders, particularly expansionist ones. Isabella did it in another game, but I'll let her off since her settlement patterns seemed reasonably logical and she was able to connect the several parts of her empire by a sea network. She settled twice on my continent but she let me fill in the gaps and we were friends despite not sharing the same religion by the end of the game. (She was more interested in Stalin, who was compact and unable to expand much.) I don't think the AI is cheating so much as some of its settlements seem placed in odd areas compared to the rest of the empire and I suspect it is trying to emulate the idea of concessions like Hong-Kong and some of the northern Chinese cities in the real world. I don't mind and I don't like to say the AI cheats (if it does, it doesn't do it that well) but it's just an observance over a while of playing BtS that it goes in for excessive city-building in odd places rather than being more rational.

EDIT - sorry, read the bit about "since Warlords". So any ship that is my enemy's would have only one dot rather than say, three for a galley plus two Praets?