How the AI knows the progress of your Wonder building

Oh yip, how could i overlook you. Iam sure with 4 posts you already showed that you are qualified to spot nonsense in Deity games :D



Just because you play Deity or have more posts doesn't mean that you're more qualified to know how the game works. If post count meant anything, your relatively small number surely wouldn't qualify you to dispute the opinion of TMiT and Dirk, would it?

Regardless of how many posts he has, he's right. All the actual demonstrable evidence points against the AI knowing what's in the human build queue. Lording your Deity-ness over people with fewer posts (which is irrelevant here) is not an excuse to overlook what's been pointed out and try to search for evidence to back your superior-player ego. And putting a :D at the end doesn't cover that up either.
 
Respect for Mylene as a Civ player: High
Respect for Mylene as anything else: Dropping fast
 
I think my post count and my play level allow me to say stuff on this ... not mentioning actual code knowledge and more than half decade playing this game :p

In this area of the code the AI has no acess to more intel than the human, as stated by other posters before ( there are other areas where it actually has, like TMIT will kindly inform you if you ask him :D ) and there is very little stuff that actually has diferent behaviour as the levels change ( and you can find all of it in the handicaps XML ). Besides that, all the testing around made by you and other posters points clearly to the fact that the results on the OP are consequence of the diferent usage of the RNG in game as you work the mine or not ( btw, try this in the OP example: work the mines but put the warrior in auto-explore for one turn. I'm 99.9999% sure that Mansa will start the walls ... I actually saved one poster game of a bug regarding events by saying to him to skip a problematic RNG result by putting a unit in autoexplore in the turn before the event, and this is a similar situation ... )

BTW, brushing your playing level in the face of someone only makes some sense if you are discussing something influenced by the game dificulty ... and even then . One of the biggest contributers for the Unofficial patch was Dresden, that was a noble player , if you want a example of what I'm talking about ;)
 
You guys are just weird folks, he replied to something where i made a general thought that i wouldn't be surprised with it being "nonsense"...using a similiar tone obviously, something that would be considered normal on all other forums i use.
That's enough to jump on me, lol if it makes you happy..you're just weird.
 
You've discounted multiple responses with "but what about Deity where I'm talking about this," not just in that post. I know that's how the Internet works, but it doesn't really hold water ever, never mind when everyone you're discounting has given actual evidence against your conjecture.

If pushing away stupid Internet biases like post-count = intelligence makes me weird, so be it.
 
So this is somewhat tangential to the OP, but what happens if the AI has enough EP on you to see inside your cities? Does it take into consideration any wonders you are building before it decides to try competing for the same wonder?

I realize this probably involves something from the hideous mountain of code that Dirk mentioned but I'm kind of curious now.
 
More on the OP:

I've had confirmation from the rumor starter that it was from testing and not code reading that the so-called rumor was formed...

So yea... unless you get the tech early and the AI decides not to start researching it as a result, that looks like the most likely from what we know. Not that I'll change my habit just in case it's hidden deeper in the code ;)
 
Woo, go away for a few days and look what happens...who would have thought that this seemingly innocuous discussion in Vicawoo´s thread could turn into such a drama! :lol:

For all of that, it doesn´t look like we have really got anywhere. We have no proof that this cheat exists, but plenty of players including me have been playing like this for a long time and it seems to have worked for us. Oh well.

In an effort to add something useful to the discussion (although it´s not really useful, to be honest) we do know that although the AI may not be able to see wonders being built, the human sure can if he has a Great Engineer handy...Relevant? No. Interesting? Possibly. :p
 
^I think we did get anywhere. As i said earlier it's easier to prove that something exists than that it doesn't. When i tested a specific sample for this cheat there was nothing that suggested that the AI would look at the amount of hammers the human has put in the wonder. I'm 100% sure of that.

As i said that is not conclusive as the decision to build a wonder may be taken later or earlier in the code in other samples.However if the cheat existed you would expect that the AI would always look at those hammers, not occasionally. Since this definitely didn't happen in the sample i tested it is extremely unlikely that it would happen in other places in the program. For me it's 99.99% certain that the cheat doesn't exist.

@Kossin, who started the rumor :)?
 
I'm 100% sure of that.


For me it's 99.99% certain...

I can't begin to tell you how many times I regretted making statements like that when I was a programmer. Unless you are the one who wrote the code... but even then. :lol: CIV is a hugely complex game, written by a team (teams?) of coders, so I don't think you're going to find certainty without a huge amount of effort.

Having said that, I'm leaning against there being some deliberate AI spying on player wonder builds. And I say that as someone who often does try to use this exploit. My experience in this regard has led me to believe that it was unreliable anyway. Sometimes wonders just go late. ;) But I'll probably continue trying it occasionally. :lol:

The other question, which is still unanswered IMO, is one that Kossin alluded to: will beelining the wonder-enabling tech keep the AIs from researching it and thereby having the same effect of delaying the wonder. I know that this works in some cases (i.e., lit, music), but I'm not sure what other factors may be influencing AI behavior in deciding whether to research a tech or not based on what the player does.


@Kossin, who started the rumor :)?

I think I first saw mention of it in one of Shyuhe's games sometime in the last year, but it may have been around before that.
 
Switching gears to the "AI devaluing techs when the bonus has been taken" thread, has anyone actually found the code that elicits this behavior? And if so, is the devaluing due to general tech-known ratios, the freebies themselves, or something else?
 
^^That is surely in the AI tech value function. Will try to give a look ( as soon as I reinstall Visual Studio :D ). it is most likely in CvPlayerAI, I guess ...
 
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 has proved Mylene wrong.

The AI in Deity does not spy on whether you're building a wonder, because if it did, why would it try to build one when it sees you're already so close to building it.

That, plus the RNG discussion, shows that the AI's behaviour is due to the pseudorandomness of the Linear Congruential Generators.
 
Switching gears to the "AI devaluing techs when the bonus has been taken" thread, has anyone actually found the code that elicits this behavior? And if so, is the devaluing due to general tech-known ratios, the freebies themselves, or something else?

Spoiler :
Code:
if (kLoopBuilding.getPrereqAndTech() == iI)
{
    if (iPathLength <= 1)
    {
        if (getTotalPopulation() > 5)
        {
            if (isWorldWonderClass((BuildingClassTypes)iJ))
            {
                if (!(GC.getGameINLINE().isBuildingClassMaxedOut((BuildingClassTypes)iJ)))
                {
                     bEnablesWonder = true;
This is the part where it decides whether to add weight to the tech for wonder reasons. Here it's looking at all buildings to see if the tech enables the building. For it to be valuable for wonder reasons it must be, as per above

1. The tech that enables the wonder
2. A tech immediately researchable (the AI is otherwise looking 3 techs deep for other reasons like military)
3. The AI has reached a pop 5 empire :)
4. The building is a world wonder (hmm, so it will not research a tech just for national wonder purposes)
5. The wonder has still not been taken.

Note that if there are useful worker or military techs available these are given a lot more weight than purely wonder techs. Also freebie or religion enabling techs are very highly weighted. It's a complicated function although only 1400 lines, not like the 20000 lines Dirk mentioned for that other one:lol:

Edit: as r_rolo said cvPlayerAI.cpp::AI_bestTech()
 
The AI's tech choice algorithm basically is an absurdly long series of conditions under which it will add value to a tech (e.g., techs that enable map trading get a boost; techs that let you build improvements get a boost... unless I miscounted, there are 78 such conditions). However, there is only one point in the entire function where it actually checks how many other civs already know the tech. That's when deciding whether to add value to a tech because it could found a religion - e.g., the AI will prioritize Theology if nobody else has discovered it yet. And it's actually remarkably clearly written - it's very easy to see what every other condition is doing. And none of the other conditions care how many others already know a tech. It'd be fairly easy to add in if a modder wanted to though - just change those 78 conditions to 79 conditions, and suddenly AIs would start caring about getting trade-bait techs!

So... there is no point in researching Priesthood before you're ready to work on Oracle. There is no point putting hammers into Oracle to try and discourage the AI. Kinda a disappointment, but it is what it is.
 
For it to be valuable for wonder reasons it must be, as per above

1. The tech that enables the wonder
2. A tech immediately researchable (the AI is otherwise looking 3 techs deep for other reasons like military)
3. The AI has reached a pop 5 empire :)
4. The building is a world wonder (hmm, so it will not research a tech just for national wonder purposes)
5. The wonder has still not been taken.
Thanks! :thanx:

For someone not familiar at all with SDK as myself (and likely some other others I guess) spending your time reading the code and writing a post to point out this is very welcome! :)

So, if I got it right, before reaching a total population of 5 the AIs won't even bother start researching mysticism, masonry, priesthood, ... just for wonder purposes.

And, if I got it right, the AI doesn't care if education will allow the building of Oxford University or literature will allow National/Heroic Epic.

As some others already pointed out, very interesting thread: many interesting (and unknown to me) things on AIs behaviors are being cleared up. :goodjob:
 
You know, you´re beginning to convince me. Although, the weird thing is, I can´t see myself changing my play style in this particular facet of the game, regardless of how irrational that clearly is. :undecide:
That's quite another thing of course :lol:. It doesn't hurt that much either, you'll get your hammers returned in gold.
 
The pop 5 empire condition is interesting. Doesn't that put a definite limit on the earliest an AI can start one of the early wonders? The difficulty level (i.e. the speed at which a Worker can be produced), the AI (i.e. Industrious, wonder-whore, starts with Myst for Stonehenge, Mining to shoot for easy Masonry, etc.), and the start (wet corn vs. plains cow, stone in the BFC, etc.) would all affect this, but would that ever be helpful to guess at and try to know?
 
Back
Top Bottom