Does the AI have preknowledge of the map?

MrCynical said:
@Onedreamer: No, I'm never done beta testing and have only read one or two articles on the subject. Have you ever done beta testing? If so, then when presented with Civ 4 for that purpose, would you at any point have decided to do the the various tests that have been carried out in this thread? Yes, my knowledge of the subject is limited, but the basic principle seems to be to try and break anything possible. I'm not sure this extends to creating maps for every little thing. This thread only appeared after a month or so of suspicions from the anecdotal evidence of the whole forum. As a result a specific issue which seemed dubious was focused on, and proved to exist. If you are a beta tester and feel you would have carried out these specific tests, then my apologies and feel free to enlighten me on good beta testing practice. If you are not a beta tester, then at least enlighten me on your clearly superior knowledge of the subject, and maybe tell me the source of it, so I can learn more.

@Kolyana: In some of the tests you seemed to be saying that the AI had a longer field of view into unexplored land. Is there then a distance at which resources are invisible even for the AI in unexplored terrain? If so it might account for why it isn't as noticeable as in Civ 3, or is it simply that the AI isn't willing to hike across the entire map any more even if it does know a resource is there? Also do they know where better terrain is, as well as specific resources? Should be an easy test with one arm of the X having some grassland at the end, and the others with desert. I couldn't find one in this thread though that didn't have resources involved as well.

I can do it but I might not be able to finish it for an hour or so because I have to go do some errands soon. So basically you want an island with four arms and each one has different types of land to see what the AI prefers or do you want one good arm and three bad to see if the AI knows where all the good land is at the beginning?

And yes, the AI can see farther out than humans can in the game. Don't know about the others however.
 
I meant one arm good and three bad to see whether the AI knows about terrain types as well as resources that it shouldn't.
 
O.k. Got cha'.
 
MrCynical said:
@Kolyana: In some of the tests you seemed to be saying that the AI had a longer field of view into unexplored land. Is there then a distance at which resources are invisible even for the AI in unexplored terrain? If so it might account for why it isn't as noticeable as in Civ 3, or is it simply that the AI isn't willing to hike across the entire map any more even if it does know a resource is there? Also do they know where better terrain is, as well as specific resources? Should be an easy test with one arm of the X having some grassland at the end, and the others with desert. I couldn't find one in this thread though that didn't have resources involved as well.

The first question is difficult to answer. We know that the AI doesn't go to the resource if it's too far away. Whether this is due to the AI not seeing the resource, or due to the AI wanting to put its cities closer together despite seeing the resource, is difficult to test (perhaps impossible with the tools we have at the moment). I tend to favor the second explanation, because the first one requires extra programming effort that probably wouldn't have been justified to achieve the effect in question. But that's speculation.

Regarding the last question: The AI knows about unexplored land when looking for a place to sette. Just add a single grass tile to one of the cross arms, and the settler will head towards that arm, no matter whether you reveal the area to the AI or not.
 
I would bet that the AI is not really seeing the tech hidden resource. I bet it is just doing a value check of every tile within a certain radius and going for the 'best.' The program does not check to see if the AI can actully 'see' the resource or tile, it just does a vaule check on every tile within a certain range. You guys have done a great job at testing this out, I hope some one at Firaxis gets wind of this thread, they may not be aware that the AI is even doing this and might put a fix in the next patch or two
 
Sorry, screwed up. Will redo soon. Please wait:). Really sorry. Don't use the below thing. Flawed.
 

Attachments

MrCynical said:
@Kolyana: In some of the tests you seemed to be saying that the AI had a longer field of view into unexplored land. Is there then a distance at which resources are invisible even for the AI in unexplored terrain? If so it might account for why it isn't as noticeable as in Civ 3, or is it simply that the AI isn't willing to hike across the entire map any more even if it does know a resource is there? Also do they know where better terrain is, as well as specific resources? Should be an easy test with one arm of the X having some grassland at the end, and the others with desert. I couldn't find one in this thread though that didn't have resources involved as well.

I had one test that threw everything off, because I switched out the terrain from grass to a mixture of desert and grass ... and in such large amounts (desert) the AI seems to be unwilling to settle anywhere and looks for an alternative.

A gut feeling told me that terrain is being accounted for, so I started replacing desert with grass, but found that in any large amounts, the AI would shy away from it until the amount of grass was beneficial.

Instead I decided to keep things on an even playing field and used only grassland and 4 'arms' of the same length.

I then placed a hidden resource (oil) within 1 square of the AI's starting city and this was, of course, ignored in the settling of the second city.

It was also ignored when I moved it a touch further away and felt that it was because it "belonged" to the first city ... it was already in a workable range. Only when I moved the resource out to 3 squares (maybe 4) did the AI then deem a second city at that location was necessary (it wasn't captured in the range of the first city). At this range, (and 6-7 squares) the AI would settle this location everytime. If I moved the oil (even though it was out of sight), to another location, the AI would change direction to the new location ... everytime (which tells me that it's re-evaluating a settling point every move).

When I placed the oil quite far away (like 10 squares or more), the AI ignored it and settled a none-resourced arm everytime. I concluded that it eveluates the distance between it and the land around it (the good squares) and distance is a factor - the further away, the less attractive it is (it may, focourse, be black and white: beyond a certain point, settle something closer).

I also tested the "better terrain" question, although somewhat inadvertently and because of this I'd rather not try and hypothesize (sp?).

regarding the filed of view ... to be honest I started every map and reduced his field of vision (just to be sure) and then placed resources in the unknown territory ... 1 square in to the unknown, 2 squares, 3 and so on ... the AI would go for it everytime. It gets to a point where the AI will ignore it though, so there is defintively a range factor. I'd say that the AI knows it's there, but it's too far.
 
Interesting, that suggests that the AI can't tell the terrain type even a single square into the black. So it's just the resources it can see that it shouldn't. Still rather an advantage as resources are more important than in Civ 3, but still an improvement for Civ 4.

EDIT: This may not be correct, problem with test.
 
Wait...!!! I screwed up. Let me redo it. Really sorry (I still have a bit of the flu). I made some one to short.
 
Edited, because of an inconclusive test and I don't want you lamers out there mis-quoting me ;)
 
Hi, really sorry. New test confirms (one hundred percent correct) they can see land pretty much on the first few turns (went right for it after their borders expanded even though it is far out of Kolyana's predicted range). They almost went straight for it (they looked at the bottom one and then went to the left and proceeded to settle before the borders expanded).

Here is the correct save:


Also, did I mention I was sorry?
 

Attachments

Condor, you may need to spice this up a little ... chance the good terrain from arm to arm, ensure that the AI has no visibility of the new arms (sometimes when map building, the new tiles START with the AI knowing them and you have to go into the visibility mode to remove them from the AI's knowledge).

When testing with resources, the AI would go *STRAIGHT* to the resource with no diversion ... an absolute straight line ... I don't like this 'wandering around for a turn or two', it's too open ended and inconclusive.
 
Condor, I downloaded your first save and did some tests (after correcting the length of the arms. I think we're onto something. Currently I'm trying to test the hypothesis that the AI can see exactly four tiles beyond its cultural border, but no further. Hang on. :)

The "wandering" in your example took place until the cultural border of the city expanded. As soon as it expanded, the AI sent its settler to the right arm. Also, if I give the city an expanded cultural border to start with, then the settler goes straight to the right arm without wandering around before.

I'm preparing a test and a savegame.

Edit: Sorry. I get contradicting evidence and have to test further, unfortunately I don't really have the time at the moment. :(
 
Kolyana said:
Another test (attached).

I made the island 3x3 with 7 long arms of grassland. Removed the AI's visibility on all arms and placed an oil 1 square away. He ignored it and went off down another arm.

He did the same when I put the resource 2 squares away and I concluded that he was ignoring it, because it would eventually be within the range of the original city.

So I put the oil in a fog of war square 3 squares away and the AI went for it every time (even if I moved it) ... so in fog of war and a resource that can't be seen, the AI went for it everytime.

I am satisifed with my testing ... the AI starts with information that it shouldn't have, in squares it can't see, not having the tech required to see invisible resources.

I tried this scenario out because - to my knowledge - the AI does not use info about resources for which they have not discovered the appropriate tech when founding cities. This is, in fact, still true... it doesn't know that there is oil on that tile. However, there was a little bit of info leaking through (the yield calculation WAS crediting that square with an extra hammer) which on such a symmetrical map would make enough of a difference to act as a tie-breaker. I'll tighten that up for the next patch. Sorry about that... it probably would never make much of a difference in a real game situation... (as the value of a single hammer is very low)
 
Soren Johnson said:
I tried this scenario out because - to my knowledge - the AI does not use info about resources for which they have not discovered the appropriate tech when founding cities. This is, in fact, still true... it doesn't know that there is oil on that tile. However, there was a little bit of info leaking through (the yield calculation WAS crediting that square with an extra hammer) which on such a symmetrical map would make enough of a difference to act as a tie-breaker. I'll tighten that up for the next patch. Sorry about that... it probably would never make much of a difference in a real game situation... (as the value of a single hammer is very low)

that explains a few things :P

btw the value of a single hammer is actually quite a lot... especially if you get that extra hammer for the next 200+ turns :P
 
no, I mean the value of a hammer compared with all the other numbers used in that calculation. (a single hammer would probably be worth 40, oil would be worth >800, if that gives you any sense of the ratios)
 
I've just fallen off my chair.
 
Soren Johnson said:
no, I mean the value of a hammer compared with all the other numbers used in that calculation. (a single hammer would probably be worth 40, oil would be worth >800, if that gives you any sense of the ratios)

ahh ok you mean how the AI rates worth... similar to the value stat of various units helping to determin what the AI preferrs right?
 
Soren Johnson said:
no, I mean the value of a hammer compared with all the other numbers used in that calculation. (a single hammer would probably be worth 40, oil would be worth >800, if that gives you any sense of the ratios)

So, how did you get this information on the AI's utility of squares and the utility values on that map?
 
Back
Top Bottom