Does the AI have preknowledge of the map?

The Condor said:
Hi, (I know it has been awhile) I got some further evidence of workers knowing stuff beforehand. But this time it is for the human player and not the AI.
Here is a pic of what most people would think was just a mine made by a automated worker (note: all these actions were performed by a "AI" worker) in the middle of a lush jungle on a hill.

Hi Condor, nice to see you're still experimenting with AI knowledge. :)

I don't think your screen shots show that the workers knew stuff beforehand, because there's good reason to mine these hills anyways. The workers could simply have though "Hey, we need more hammers, let's mine these hill!", without knowing that there's a resource down there.This would lead to the same result.

To test it, we could make a setting where a worker has to decide between several hills, and only one of them holds an (unknown) resource. If the worker has any pre-knowledge of the resource, then it will mine this hill first.

Currently, the worker probably *will* mine the hill with the resource first because of the yield calculation bug that we found earlier. The AI will mine the hill with the resource first because it *thinks* that it gets more hammers from this hill, although it actually doesn't. This behavior should cease once Soren fixes the leak in the yield calculation though.
 
Psyringe said:
Currently, the worker probably *will* mine the hill with the resource first because of the yield calculation bug that we found earlier. The AI will mine the hill with the resource first because it *thinks* that it gets more hammers from this hill, although it actually doesn't. This behavior should cease once Soren fixes the leak in the yield calculation though.


I've been lurking around this thread for a long time, thought I should speak up. I agree with Psyringe, sounds right, wouldn't hurt to test. Also, looking at Condor's 2 screenshots on the previous page, maybe we're looking too hard. I mean, somethings can be attributed to pure coincidence. Like in that second shot, it would make sense, given the argument, that the workers would have improved that second hill with the coal, before building the farm in between. That is, of course, if they were going by knowing about the *resource* as opposed to knowing about the bonus hammer, as food might have been needed more than a hammer.

My 37 cents: Kolyana's screenshot of workers building a road toward what should be absolutely nothing, and then having it turn out to be an as yet undiscovered oil, is definitely weird. Now, Soren found that the AI's settling habits are influenced by the extra production they would get from the resource, so there's no dispute there... but Kolyana's bit might be showing a totally different bug altogether, and maybe that could be tested? Also she mentioned the same AI habits hold true when the resource is something like dye, which doesn't provide any bonuses until it's improved. So maybe it's a different bug in a different part of the program? If I didn't spend all my days of C++ in highschool playing Quake III, I might know a thing or two about programming...

So, I was trying to think of some kinda test. Tests involving resources that don't have an immediate bonus (ie: dye) would prove or disprove that the AI settles based on resources themselves, not just based on the bonus. From there, I was thinking: If the AI settled adjacent to, say, oil, and then was given some sort of choice between settling near another oil, or something with the same bonus, like coal, would they choose the coal? This would prove that they settle beyond just knowledge of the extra hammer, if they consistently chose the different resource, the one they didn't "have" already.

I'd love to help out and test it myself, but you can add this sort of testing to the list of things I don't know how to do. So I'm just throwing out some ideas.

Or if there were 2 civs, each with one city, and one of them had an undiscovered resource in it's boundaries, in the opposite direction of the other city. Then set a worker to automate a trade network, and see if it doubles back to connect that resource, as well as connecting to the other city.

Either way, good luck. You all proved it wasn't just my paranoia, although I do still like to think there are nano-machines on my disk messing with my games. Propagating themselves and making my coffee cold before it should be.
 
Psyringe said:
Hi Condor, nice to see you're still experimenting with AI knowledge. :)

Actually, it came up just in a regular game I was playing.

I don't think your screen shots show that the workers knew stuff beforehand, because there's good reason to mine these hills anyways. The workers could simply have though "Hey, we need more hammers, let's mine these hill!", without knowing that there's a resource down there.This would lead to the same result.

I would believe that but if you look there is an additional hill next door in the first picture that are "identical" which lead me to think why did the worker pick that one and not the other one and it turned out it had a coal resorce. Also, for the city with the aluminium pretty much the same story except the "twin" was a small distance away.

To test it, we could make a setting where a worker has to decide between several hills, and only one of them holds an (unknown) resource. If the worker has any pre-knowledge of the resource, then it will mine this hill first.

I might just do that later.

Currently, the worker probably *will* mine the hill with the resource first because of the yield calculation bug that we found earlier. The AI will mine the hill with the resource first because it *thinks* that it gets more hammers from this hill, although it actually doesn't. This behavior should cease once Soren fixes the leak in the yield calculation though.

Yeah.
 
Back in the days when my AI opponents and myself were researching Banking and the like, one opposing civ went off and built a remote city on a single Tundra tile surrounded by Ice except for one Coast tile. Once we had developed Physics, guess where his only source of Uranium was ?
Right. On the aforesaid Tundra tile, in the middle of his puny city. Should have been called Chernobyl.
 
Yeah, that is due to a leakage in the information provided to the AI that to some degree gives away where all the resources are to the AI. Soren Johnson discussed that on page eight.
 
OK, thanks, Condor: I have now read Soren Johnson's posts. But I find it very hard to believe that one single hammer, half a world away, could outweigh the several hammers on the AI's as-yet-undeveloped hills, which did exist as I knew from a recent scouting expedition.
 
That is why Firaxis is making sure to fix this in the next patch;).
 
Bushface said:
OK, thanks, Condor: I have now read Soren Johnson's posts. But I find it very hard to believe that one single hammer, half a world away, could outweigh the several hammers on the AI's as-yet-undeveloped hills, which did exist as I knew from a recent scouting expedition.

I can't tell why the AI settled that spot in your game, but I'm prett sure that it didn't have anything to do with that uranium. In our tests in this thread, we proved that the AI does favor settling near resources *if* all other things are equal. This is due to the tile production bonus of the resource erroneously leaking through in the yield calculation. However, we have also shown that this bonus cannot be larger than the one hammer that Soren mentioned. If you give the AI the choice between a site with (unknown) oil, and a site with one additional grass tile, it will favor the grass tile, because the 2 food it provides are valued more by the AI than the single hammer it "sees" in the resource tile.

I did another test with a forest tile and an oil tile. The AI will always settle near the forest, never near the oil. When I give the AI the tech to see the oil, then it wil lfavor the oil site of course.

Based on these results, I don't think that the AI will ever choose a site in a real game situation because of a resource being there. It cannot see the resource itself. All it can see is an additional yield, which in itself is unlikely to make the difference in determining a place to settle.

I realize however that this does not explain why the AI in your game settled a rather worthless piece of tundra. My current theory is that the AI always produces more settlers than it needs, and sends them to to the most remote places in the hopes of getting a foothold there. But that's difficult to test.
 
I dunno. When the v1.52 thread was thriving with Firaxians I couldn't get a reply from any of the three of them talking to all of us (except one of them did say "it is not in my department") so they could of not addressed it. I think they probably did but the only way to tell for sure (seeing as to how the Firaxians couldn't really be bothered) is too :sad: do all the tests over again.
 
I probably will do most of the tests again (only the ones that proved the AI was "cheating" and leave the rest of them alone).
 
Didn't you read the quote for the Machinery discovery?

The AI knows where everything is on the map. Then why do they bother "exploring"?
 
Hi,

I first like to give kudos to Firaxis for actually reading this big thingy of ours (despite the fact they couldn't be really bothered to answer it). Second, I'd like to say the new patch rocks (despite it taking me 10hrs to download:rolleyes:!)!. And third it appears this thread will be at an end for Firaxis has done their job well with the new patch.

First off, I started with the most important test:
The AI seeing what it shouldn't be seeing. I used a classic map I made (that actually didn't have mistakes the first time:lol:!). The four armed clover leaf:

Upon using the test the AI looked to be cheating (it followed the oil with the settler) so I then moved the oil and fortunately the Ai didn't notice and plopped the city on a now resourceless arm. Now this made me wonder so I tried it again (moved the oil in the beginning) and fortunately (and yet odd) it did not follow the oil but instead to the same arm again that was resourceless. So there is one test done. Also, on the save "newresourcetest" you get the oil moved to show the AI doesn't go for it (I did not want to trouble you people by giving you the other save where you had to move the oil to see the Ai doesn't cheat).

The second test (and third with varied settings) I did was see if the workers still were "all-knowing". It consisted of my usual little nine square islands. On the islands the city that would be founded is surrounded by eight hill and two had resources (and two workers). Now the good thing (and yet deeply disturbing thing) with the workers was that they didn't head straight for the hills with the resources. Instead (the Ai did everything the worker AI's did I just don't want to write the same thing twice:p) the workers proceeded to building a road on every hill which was fine but then the odd part was after they built the roads they just stayed in the city and didn't proceed to making any mine at all:D! On the varied settings they did the same thing except since I took away the road tech (to force them just to do mines in the beginning hopefully) it left them with "nothing" to do so they just sat their for a millenia till I "researched" the wheel to see they just build roads everywhere and then just hole up again. So in conclusion, the AI workers can't see everything no more but won't be bothered to do improve anything unless it has a road to and on it.(also I forgot which worker test is which so just download both to find out for yourself:D)!

(I will provide pics later;))
 

Attachments

Hi Condor, great to see that you're checking our testbeds with v1.52. I'll have a look at it myself after installing the patch, but I'm currently playing the GOTM, so the patch will have to wait a little. From your desription it seems that Soren fixed the bug in the yield calculation (the other Firaxians in the thread might not have known about the bug or the fix, otherwise they probably would have answered). The worker behavior in your "hill mining" test seems odd, I'll have a look at it when I finished the GOTM.
 
Here are the pics:
First test scenario:
resourcetestmove.JPG


Second test:
Arabian island:
minearabia.JPG
Mongolian island:
minemongolia.JPG
 
Hmm, just a thought: Given that there is a palace in Mecca, its borders should expand really soon. As soon as the borders expand, the AI may put its citizens on the coastal squares, so that the AI sees no reason to further improve any hills (because it wouldn't put citizens there anyway).

Actually this would be a *bad* AI strategy, because a) the yield of a mined grassland hill id actually better than that of a coastal square, and b) it's better to let workers complete not-yet-needed improvements than to let them stand around twiddling thumbs. But I'm trying to explain the observed behaviour, and that was the first thing I came across.

Can you surround the island with fishes and give the city enough population so that the citizens are sure to work the hills (size 13, I guess, but make sure that there are no angry citizens in the city by giving it some improvements)? In that case, the AI should improve them, everything else would constitute a bug.
 
Psyringe said:
Actually this would be a *bad* AI strategy, because a) the yield of a mined grassland hill id actually better than that of a coastal square, and b) it's better to let workers complete not-yet-needed improvements than to let them stand around twiddling thumbs. But I'm trying to explain the observed behaviour, and that was the first thing I came across.

a) not necessarily, if they are prioritizing research then the coast is better, prioritizing reseach being ideal if they don't have anything worthwhile to build.

although b) is true if there is an unimproved tile in the empire (counting forests as 'improved') it is always worthwhile to build something)
 
Krikkitone said:
a) not necessarily, if they are prioritizing research then the coast is better, prioritizing reseach being ideal if they don't have anything worthwhile to build.

You're right. I was just tallying the yield, but depending on the circumstances, 2 commerce may well be worth more than 3 hammers. Thanks for putting that right. :)
 
Back
Top Bottom