How the AI knows the progress of your Wonder building

"So, even more interest from me in your test results now!"

Change your capital to work only the tiles 1s,1e,and 1se, leaving one citizen not working tiles. The Oracle still completes in two turns but Djenne now attempts to build it.

This proves that the AI does not cheat on wonder building based on how many turns are left in your build, as OP suggests. In both OP's example and mine, the Oracle will be completed in 2 turns in our capital, but in OP's example Djenne builds walls and in my example Djenne builds the Oracle.

While it's still possible that other ways of 'cheating' exist (perhaps OP's tile micro invested 95% of the Oracle hammers while mine invested only 94.5%, and that's the cutoff), it's pretty unlikely and I see no reason to believe it.
 
While it's still possible that other ways of 'cheating' exist (perhaps OP's tile micro invested 95% of the Oracle hammers while mine invested only 94.5%, and that's the cutoff), it's pretty unlikely and I see no reason to believe it.
Fair enough. :)
But if Dirk will wish to run that debug test he was talking about in the other thread, I still interested in it. :)
 
So basically what you are saying is:
The rng might change the build from walls to the oracle, based on me working a mine or foods tile.
Cos it is random. But it has nothing to do with the amount of rounds it takes to finish the Oracle, cos this "cheat" might not be there. But the tile worked can effect the build via the rng.

Sounds pretty unrealistic to me :)

I think this post hits the critical question. Does your choice of working a mine or a food tile affect the RNG? If not, then the only explanation for Mansa's behavior is that he sees you building the Oracle and assigns a different valuation to building the Oracle, which causes him to build walls instead. Honestly, I don't think your choice of tile assignments affects the RNG.

I think the easiest way of "testing" this is to look at the code. Or maybe someone can do new random seed on reload and do a statistical sampling of what Mansa does between the mine scenario (Oracle 2 turns) and food scenario (Oracle 5 turns).

edit: x-post with Keilah. Interesting results...
 
Change your capital to work only the tiles 1s,1e,and 1se, leaving one citizen not working tiles. The Oracle still completes in two turns but Djenne now attempts to build it.

And science was had, and there was much rejoicing.
 
I played around a little bit and i suspect that you can deter the AI to start building a wonder if you already are putting hammers into it.

So what i basically did:

1: gave everyone the same tech for a wonder
2: built the wonder

result: some AIs built it as well

and then i did:

1: gave myself a tech for a wonder
2: put some hammers into it
3: then gave the AIs the same tech
4: continued working on the wonder

result: they didn't go for it immediately. I made sure that they couldn't beat my city to it. That might be a factor the AI takes into account. If you stop working on the wonder the AI then decides at some point(20-30 turns into the game) to start the wonder itself. If you then work on the wonder again, the respective AI won't stop.

So basically the wonder is being built at some point. If you start building the wonder and the AIs haven't started on it yet, the wonder will go later. That's my result for now.

Edit 1:
@random:

There is no "random" in computers. Generators for randomness are programmed, so they are determined by definition. They are programmed in a way that their results look "random enough", but they never truly are, because they create patterns that can be backtracked and forecasted. Once you do that, the random effect goes out of the window. Since most of us can't do that, the random effect remains.
So if your worker farts, Mansa will start on a recycling center. If your worker builds a fort, he will start on an ICBM. If you take Mylene's save and change some things different paths will be taken by Mansa. It's a bit weird but Mansa's behaviour makes sense.
 
So what we found out is that the rng does silly things, or maybe there is some decimals maths doing stuff that only the rng gods understand ;)

But as above poster wrote, i know what i know.
And that is that they know :D when the player starts building a wonder, or else many many results on games i played would make no sense where wonders that i put hammers in did go later than they should + some.
I hope Absolute Zero will come in at some point and confirm this, it is "only" playing experience, but that doesn't make it weaker than science.
 
So what we found out is that the rng does silly things, or maybe there is some decimals maths doing stuff that only the rng gods understand ;)

Well, "silly things" describes some behaviour of the AI.

I gave every AI Philo after I put some hammers into Angkor Wat it. Around 10 turns later I started a world war (every AI against every AI). Guess what Hatty does during the war. She starts Hermitage in one of her cities, loses that city and 2-3 turns later she builds Hermitage in the next city.

The Angkor Wat went very late. Stalin built it, still being in a war with 3 people.

A systematic approach to abuse this AI behaviour would be to get a certain wonder tech first and then build it in multiple cities for double fail gold. This requires the resource. I have failed several wonders (mainly the Paya and Angkor Wat) for 800+ Gold in some games so my test results so far correspond with my experience.

Another approach might be beelining Alphabet on a commerce strong start, then try to hit priesthood first. That way you know when Priesthood is out and what you can oracle.

I still need to do some testing before i'm sure what the AI is doing here.a
 
It would be interesting to see what really changes the seed.

The option 'random seed on reload' is revealing in that it tells you that the seed is not changed simply by reloading the save... is it changed by reloading the game though? Or do you need to reboot the computer to get a new seed?! I remember reading the hitting explore on any unit changes the seed but that's it.

Concerning the so called rumor, it's not that the AI will not attempt the wonder if someone has put 1 hammer in it before, it's that the AI is less likely to attempt it.
 
Yip, so the AI knows you built into the wonder while they shouldn't.
That was basically the point, they can either see what you build at any time, or they just know when a wonder is being built. And ofc if we would want to call that cheat, it is one that benefits the player ;)
 
It would be interesting to see what really changes the seed.

The option 'random seed on reload' is revealing in that it tells you that the seed is not changed simply by reloading the save... is it changed by reloading the game though? Or do you need to reboot the computer to get a new seed?! I remember reading the hitting explore on any unit changes the seed but that's it.

It seems pretty obvious that the "seed value" used by the RNG is saved in the game save file, otherwise there would be no need for a "random seed on reload" option. A real-time random number generator would obtain a seed value from some hardware value that changes moment to moment - for example, the millisecond value of the clock register at the time the RNG subroutine was called. CIV obviously doesn't do this, otherwise you wouldn't have the repeatability that all of us have seen by duplicating previous actions. And this is obviously done to prevent combat cheating by reloading the save again and again until you get favorable results (unless you used the "random seed on reload" option when you start the game). So whether you reload the save, restart the game using that save, or reboot the computer and restart the game using that save, it will make no difference. AFAIK, the only way to get a different seed for a given turn is to load from any earlier save and change some actions. It doesn't matter which ones, they all have some effect on the seed that it saved at the end of that turn. I think it's also possible to change outcomes on the current turn by doing things in a different order, but I don't know this for sure.
 
The "new random seed on reload" doesn't seem to work.

I remember using it when I started a game one time.
During the course of the game I popped a GProphet at only 10% odds when I needed a GS badly.

So I reloaded ~40 times, even quit the game and reloaded entirely a couple of times.
Got the Great Prophet every single one of them.

If there really was a new seed at each reload, out of 40 tries, at 10% odds I should have had only 4 great prophets. Given that the sample is very small, one should expect great variability, so maybe 10-15 GP. But 40 out of 40 tries?

Of course I just had this one experience with this option, so it probably deserves more testing.


Also, @huerfanista, the problem of using a system time based seed is that there are probably still several RNG evaluations that occur every time step, and all of these would be based on the same seed, so that's probably not optimal either.
Better than the current situation though.
 
Honestly, I don't think your choice of tile assignments affects the RNG.

It doesn't (tested it in the example I talked about above) and it shouldn't : the most common use of a RNG is to use the previous result as the seed for the next roll.

So the only things that affect the RNG are RNG-based events : every combat, GP spawn, everytime an AI chooses a build, everytime an AI chooses a tech, barb movement (before they pick a target), plus probably a load of things hidden in game mechanics.

In a game like Civ IV, even a single turn involves probably hundreds of rolls, enough to give the illusion of randomness, but it doesn't the change the fact that if you take the exact same actions over the course of 2, 5 10 or even 100 turns (if you manage), the results will always be the same.

Hence, there are not so many ways in-game to change the outcome of a single event. Basically, you have to modify the number of RNG calls between your starting point and the event in question.
For instance, in my GP/Gs example above, what I did to finally get a GS is go fight a barb that was wandering around. I lost (that's why I hadn't attacked him in the first place), but I got my GS on the next turn because the fight against the barb used several dozens of RNG rolls in between.
 
I suspect the RNG sequence is being affected here when we stop working the mine. Working a mine for a turn requires a RNG roll to see if we discover gold/whatever.

Then there's a butterfly effect across the board. The Babylonian archer to our north wins his battle with a different amount of HP remaining. Babylon itself finishes a spearman and starts on the great lighthouse next instead of an axeman. And Djenne starts the oracle - no cheating need have been involved.

I'm still curious to hear the results if anybody goes code diving :)
 
There is a simple way to test weather the AI cheats or not (at least with a very very high probability) but it would be very very very tedious. There are 18 workable tiles in your city (since water tiles are not workable so far) and there is also a possibility to run citizens. With population 4, this means 4048 possible choises of what tiles to work (easy math :lol:). You can try all of them and then see if the IA's decision of building Oracle depends on a) your current production, b) something else. Good luck!
 
Moving a unit effects the RNG for sure. I've reloaded and played many times making different moves with my starting unit and find different outcomes ( different barb spawns for instance ).

Other then that attacking certainly effects the RNG.

Reloading doesn't effect it unless you have "reload seed" or whatever that option is. That effects the RNG for battling at least, I know for sure because I used to play with that option on and reloaded whenever I lost a good unit.

About the AI knowing your building a wonder, this is something I read several places on this forum. I assumed it's true and that someone had looked at the code or something. From experience it seems to be true, but not a total guarantee. You start working on a wonder really early and it seems you can get away with building it later. I have no solid proof of this but it seems to be how it is.
 
Moving a unit effects the RNG for sure. I've reloaded and played many times making different moves with my starting unit and find different outcomes ( different barb spawns for instance ).

Moving units in the fog will effect the RNG because of barb spawns which are random. However moving a unit within your own territory shouldn't. Although this is based on the assumption that the RNG in Civ IV is "standard".

Reloading doesn't effect it unless you have "reload seed" or whatever that option is. That effects the RNG for battling at least

Well I had a different experience with this option, so I don't know what to think of it. Maybe there is a specific RNG for combat, and another for other events?
In any case, I'm gonna have a hard time believing that my spawning 30 GProph in a row at 10% prob was shear bad luck, though it is in theory possible.
 
We have two hypotheses here.

1.
The most credible-sounding one from half-remembered reports of earlier code dives is that hammers into a wonder reduces the attraction of the associated wonder tech by a bit.

2.
The hypothesis this thread is toying with is that some aspect of the hammers input into a wonder actually deters AIs from starting the wonder itself.

I think people may be trying to make themselves believe in number 2 because it's a more direct effect and gives you something concrete you could actually use. Number 1 is rather subtle and hard to see exploits for.
 
^^

While I agree that delving into the code and/or running a game in debug mode should definitely provide an answer to this debate, I do believe that the expertise of Mylene, Az and others very experienced players has to be heard.

That's why I can't help highlighting that both hypothesis are coherent with their in game experience that putting early hammers into a wonder tends to delay its completion.
Whether the AIs actually spy on you or just lose interest in the tech, like they do when religions are founded, becomes less important then.


Still awaiting Dirk experimentations with a debugger on Mylene's saves. It should put the final nail on this to see exactly what lines of code are executed.
 
The "put 1 hammer into wonder, so AI will postpone it" strategy worked for me so many times and been discussed so many times.

Now where are code diggers when you need them?

Would be nice to have this one finally approved or rejected.
 
Back
Top Bottom