How the AI knows the progress of your Wonder building

Mylene

Deity
Joined
Jan 30, 2011
Messages
4,000
Location
Pangea
Didn't want to derail Vicawoos thread further, right ;)

Using a game i played after exchanging some interesting views with Yamps in his "another Deity game" thread. I went for the Oracle fairly early, BW and then towards Priesthood.
Hammers pre-choped to fill up the oracle build quick.

Screen for 1640 BC, i need 5 hammers more for the Oracle.

Spoiler :


If i click next turn now with slow-building it like shown in the screen, aka it would take 5 more turns this way, this happens over there in Djenne:

Spoiler :


He tries to go for it, seeing i need some turns still.
Now i reload, and set it to completed in 2 turns...

Spoiler :


..and this happens in Djenne:

Spoiler :


He doesn't try it anymore. Repeatable countless times, check it out if you want with the save :)
 

Attachments

  • Gandhi BC-1640.CivBeyondSwordSave
    124.4 KB · Views: 49
Really interesting...so might the one hammer investment into a wonder leading an AI to think the wonder race is lost be also true. :think:
 
Good job starting this one :goodjob:, vranasm suggested that already in the other thread. Seems to be a good save to run Mylene, i'll give it a try.
 
Good demo, My. Those cheating AI bahstahds!!!
 
Iam not sure if 1 hammer stops them from going for a wonder, some weeks ago i tried an Immortal game from the forum.
It was deGaulle in paradise city ;) i built the GW in one of my new cities for fail gold.

Took something like 25 turns cos it was a size 1 city, but noone would build it...i even got to the point where i had it completed by 1 turn and removed it from the city queue, starting in another one lol :D
GW finally was built by someone on turn 60 or even later, very suspicious even for IMM ^^
Possible that they went for it once i removed it from the city that almost had finished it, the time spawn would fit.
 
Soo.. If you get the Oracle started early, but leave it at one turn until later, you could oracle something truly amazing perhaps? This is... interesting.
 
when we're at it... I too experienced ridiculously late ToA dates... Like I built it in almost 3 cities before it finally went away!
 
Hanging Gardens, 1530 AD. This is on monarch. Sometimes AI gets into early wars so they don't bother with wonders.
 
Good job starting this one :goodjob:, vranasm suggested that already in the other thread. Seems to be a good save to run Mylene, i'll give it a try.
I agree! :goodjob: And look forward for the results! :)
(whenever you have some time to it would be just fine, of course).
 
I'm not saying that I'm doubting you, but this needs to be tested out more extensively. You need to be able to show that the AI isn't simply rolling a different RGN which in this instance led to it not building the Oracle. So, in other words, is it random or is the AI intentionally changing its behaviour.
 
I'm not saying that I'm doubting you, but this needs to be tested out more extensively. You need to be able to show that the AI isn't simply rolling a different RGN which in this instance led to it not building the Oracle. So, in other words, is it random or is the AI intentionally changing its behaviour.

Agreed. AFAIK the RNG will change if you do different things so try sending units out to different spots etc.

If the AI always follows the pattern you demonstrated but randomly changes other things, it'll be safe to assume that the AI cheats WRT wonder building.
 
Not really, all that changes is the amount of turns he does see for how long it takes me to complete the Oracle. I loaded it around 10x with either 2 or 5 turns left, Mansa always switched betweem Walls or Oracle.
What else could make him change his mind, every time you reload? I don't see it, surely good enough for me ;)
 
What we're saying here is that the RNG is not a true RNG but is based on something in game and if you take the exact same actions then the exact same things will happen next turn.

For example, in my Frederick game I forgot to save, so loaded from an autosave. I tried to duplicate my moves but made a mistake - when I altered the path of one warrior, it caused Alex to demand pigs on the next turn. When I went back and fixed my error, Alex no longer demanded pigs.

I've noticed this type of 'randomness' before, in civ4 as well as other games. For example, in the Final Fantasy series, you run into random enemy encounters when walking around in the field. Try playing one of those using an emulator and use the 'save state' feature when walking around, then 'load state' after you get into a fight. Take the same path each time, and your next 'random' encounter will always occur on the same tile, against the same group of enemies. Change your path or go into the menu to heal your party, change equips etc, and the position/enemy group will change. Repeat that sequence of events, and the new enemy encounter will repeat as well.

If you doubt this, try doing something totally arbitrary, like whipping a unit out or moving a unit to a random tile, far from your enemy's vision. See what moves the enemy makes, load/repeat your move, and see if the enemy repeats itself. Change your move and see if the enemy changes his as well.

Djenne changing builds may be only the result of the 'Random' Number Generator being affected by you doing something differently, and not because the AI is cheating. That's why you need to change many things when you test, and see what happens.
 
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 :)
 
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 :)

You can make thoughtless posts like that, or you can spend two minutes to test the concept I'm explaining to you. Your call.
 
Go ahead, the save is right there.
Iam not getting into any arguments at this forum anymore, if you think what i post is not as enlightening aka thoughtless as what you post, fine so be it.
 
Mylene, they are correct.

An RNG uses a 'seed', a starting point to determine which actions to do. Any modifications to that starting point will have random, but consistent differences.

For example, if you work a mine instead of a farm, and your city is size 5 instead of 6 because of it, the 'seed' for the AI will maybe cause it to build the Oracle. Otherwise it builds walls.

There is no logical reason the AI will change what they do, it is just random... but consistently random so long as the seed is the same.
 
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.
 
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 :)
But it is indeed so. Have you ever tried to play 20 turns exactly the same way making exactly the same moves from 4000 BC onwards? You'll notice that you will find exact the same lion on turn 10 and exactly the same barb archer on turn 20. Stray a little from this path and you probably won't see that lion on turn 10 and that barb archer on turn 20. It's how random seed seems to work. A friend (fjordan here) explained it to me late at night in the pub one time.He understands and can explain it better than i can i think. i'll pm him to shed some light on it.

It occurred to me that this might be the case in your save, without any debugging your save could be reloaded and now we change more than just the hammers in oracle and we might get yet another result altogether in Djenne, no Oracle, no walls but a worker for instance. Then again we might not. If you reload a 1000 times with just oracle in 5 or 2 turns without other changes you will always see oracle/walls respectively. Still it's a good testcase as it is possible to walk through the code from here and see what happens there.
 
Stray a little from this path and you probably won't see that lion on turn 10 and that barb archer on turn 20. It's how random seed seems to work.
Uhm... as for:
Does the flap of a butterfly’s wings in Brazil set off a tornado in Texas? - Butterfly Effect
or in Civ terms:
Does the presence of a missionary seeping in Thebes set up the Oracle in Cuzco?
This is becoming a really interesting discussion, your micro (and every other apparently minor move) might affect your success in the game in an unpredictable and huge way: let's say missing to do some positive minor tile switching in a city, you end up getting a better seed on something a lot more crucial, as an AI skipping a wonder you will later get yourself instead, or the next GP you'll get in your GP farm city is the one you wish, or another AI declaring war on your enemy, ... :eek:
So, even more interest from me in your test results now! :)
 
Top Bottom