Expansive abuse: Oracle Code of Laws fast GM

Ever read how every AI unit sees through the fog of war for as many tiles in every direction that they can move? That's cheating in my book :)
It's argued that this is to compensate for their lack of memory. But, yes, you have a point.
 
A little sidetrack here.

Here's a video from youtube. Its a presentation by the head designer of Civ4, explaning how and why AI cheats. Its pretty insightful.

http://www.youtube.com/watch?v=IJcuQQ1eWWI


I did another game going Great Merchant as my first GP.

Spoiler :

It was so much better! Won both Music AND Liberalism by a huge margin. got 900 :gold: from mission. With Library and Academy in capital, it's equivalent to about 1500 beakers that you are able to spread across many techs (superior to bulb in a way). Cathy once again got to Philo first, no point bulbing it. A 2nd GS will make it just in time for a Edu bulb.

Got Demoracy 1350AD and stopped research. Managed to get Statue of Liberty built.

There was a slight road block along the way. Suvy decide to DoW me at 1630AD. Thankfully I had defensive pact with Hannibal and Cathy. Suvy still managed to drop a huge stack of Treb/Knights near Cheng Du. I need to revolt to Nationhood to draft a bunch of Macemans and rush-buy alot of Knights/Cho-no-ku . Kinda set back the Victory Date by alot.

Izzy joing the war against Suvy at 1715 AD. Peace treaty between Suvy and Hannibal due to AP resolution.

Shaka and Hunya join in and DoW against me (^%$#$!!!).Suvy got Cheng Du and Shaka got Tianjin :mad::mad:.

Signed peace treaty with Suvy for Democracy. Izzy took back Cheng Du from Suvy and gifted it back to me :D! Best ALLY EVER!

After a few turns Suvy went back into WHEOOHRN, I bribed Hannible to DoW against Suvy (for 2000 :gold: ), just in case. Got back TianJin from Shaka with my own force.

Managed to held all 3 of them off with huge help from Izzy and Cathy. Finally achieved Cultural Victory at 1870AD. Without war I'll probably be able to get victory around 1700AD + or maybe earlier.

I used to hate Izzy and Cathy alot but this game gave me a new perspective.


I have to say, the Oracle + CoL + GM is really great and a fresh perspective for me. I learned alot in this game. Kudos to Vicawoo! :goodjob:
 

Attachments

IMO, it's an old wives' tale. Soren was very adamant that the AI would not cheat.

The AIs certainly cheat in a few ways, that's not in doubt. In the present case, nobody seems to have at hand the relevant code snippet regarding AIs knowledge of wonder start dates, so we have to file it under "hearsay" for the time being (although I'm personally inclined to believe it).
 
A little sidetrack here.

Here's a video from youtube. Its a presentation by the head designer of Civ4, explaning how and why AI cheats. Its pretty insightful.

http://www.youtube.com/watch?v=IJcuQQ1eWWI
I've seen that before. As you say, it's pretty insightful. Soren is upfront about what he was doing. He says that all the cheats are specifically designed to compensate for deficiencies in the AI. Among others, he mentions the example that Kossin brought up and explains that the reason is exactly as I said - to compensate for the fact that the AI has no memory about enemy troop movements.

He mentions a cheat from Civ III where the AI would target your weakest city and how the player could exploit this, adding that he wouldn't make that mistake again. Interesting that this supposed tech/wonder cheat (whatever it is exactly) is in pretty much the same category. And what, BTW, what deficiency in the AI do you think this cheat is supposed to compensate for? That was Soren's rule, remember.

Also, there have been some members of the community who have spent a lot of time code-diving, Blake, Sorver and J-dog are just a few. Do you really believe that they never ran across this?

I don't. It's just another example of the human need to find patterns - even when none exist.
 
^That's my problem with this supposed cheat as well. It isn't necessary and programming it would either be difficult and/or easily exploitable.

The problem with code diving here is that you can't easily prove the cheat isn't there, the response would always be "you haven't looked deep enough". If it is there it would be easily provable of course.
 
I've seen that before. As you say, it's pretty insightful. Soren is upfront about what he was doing. He says that all the cheats are specifically designed to compensate for deficiencies in the AI. Among others, he mentions the example that Kossin brought up and explains that the reason is exactly as I said - to compensate for the fact that the AI has no memory about enemy troop movements.

He mentions a cheat from Civ III where the AI would target your weakest city and how the player could exploit this, adding that he wouldn't make that mistake again. Interesting that this supposed tech/wonder cheat (whatever it is exactly) is in pretty much the same category. And what, BTW, what deficiency in the AI do you think this cheat is supposed to compensate for? That was Soren's rule, remember.

Also, there have been some members of the community who have spent a lot of time code-diving, Blake, Sorver and J-dog are just a few. Do you really believe that they never ran across this?

I don't. It's just another example of the human need to find patterns - even when none exist.

Uhm... well, if you put it this way, I must agree, of course.
Without "in code" proves, it shouldn't be say true.

Actually I always thought I was pretty lucky (or pretty good?) to never miss my early wonder, but then, after being told twice, in two different threads, about this possible "AI cheat behavior", I started to guess that it _might_ be true, and reported my experience as an empirical contribution (as would be run a bunch of tests) to the discussion.

Now I wonder: "how much into the code a player with coding/modding experience can go"?
I mean, spending enough time and enough resources, all the game features might eventually be discovered from the code?, or part of them are not accessible except to the game coders/designers? And if the first one is true, it has be done?
Because if the latter is true, I believe that an empirical test (as I've seen to test the accuracy of battle odds for example) is the only instrument we have to discover.

So far I don't believe it is true, but don't exclude it is not. While I rationally tend to exclude that the battle odds cheats, since empirically proved correct many times already.

Any further input on the matter would be welcome. :)
 
^Almost every game feature is accessible through SDK (C++),python or xml. Not all, i'm almost certain the pathfinding code for instance is not in there. So yes you can discover almost everything from looking at this code. But is it useful?

Sometimes i think, best example imo is the war declaration routine. This one removed a lot of misunderstandings about the mechanics (and introduced some new ones as can be seen from my discussion with Mylene above). However the war declaration routine takes a lot of input and it isn't always easy to predict the outcome when actually playing a game.

There are other examples, i have seen instances where code divers came up with code samples that were definitely useful. Sometimes these samples shed new light on an issue or they proved or disproved certain suppositions.

It's perfectly possible to play very well on deity without knowing anything about the SDK etc. Experience is not useless, it just isn't always suitable to prove things like this cheating issue imo.
 
^Almost every game feature is in accessible through SDK (C++),python or xml. Not all, i'm almost certain the pathfinding code for instance is not in there. So yes you can discover almost everything from looking at this code. But is it useful?

Sometimes i think, best example imo is the war declaration routine. This one removed a lot of misunderstandings about the mechanics (and introduced some new ones as can be seen from my discussion with Mylene above). However the war declaration routine takes a lot of input and it isn't always easy to predict the outcome when actually playing a game.

There are other examples, i have seen instances where code divers came up with code samples that were definitely useful. Sometimes these samples shed new light on an issue or they proved or disproved certain suppositions.

It's perfectly possible to play very well on deity without knowing anything about the SDK etc. Experience is not useless, it just isn't always suitable to prove things like this cheating issue imo.
Thanks for the brief and precise explanation! :)
I played around with some .xml modding in the past, but I'm definitely not a coder and the SDK is (and will always be) to me something completely unknown. So your synthetic, generic and understandable explaining about such a complicate technical issue was really appreciated!
Very enlightening! :goodjob:
 
^You're welcome.

Hmm for anyone trying his/her hand at code diving, i think the relevant code is in here (not 100% sure before i have actually ran the game through it which i won't do now):

CvCityAI.cpp
void CvCityAI::AI_chooseProduction()

A long function of course with many sub functions. At a quick glance i can find nothing in the main function that would suggest the Ai looking at human tech/production. This is not conclusive as the many subfunctions must be visited as well. But i would expect a reference to this cheat probably with a comment if the cheat was there. It's not as if the coders hide things from us on purpose, there are not that many comments but there often is some comment about the general outline of a piece of code. Best would be to walk through this code with a debugger to see what actually happens.

At first glance i can see there's a random factor (but we knew that from experience already). Xml Leader characteristics are factored in of course. There also seems to be support for Snaaty's supposition that the AI is less inclined to build wonders when at war.

If anyone has a save where the AI has supposedly looked at Human tech/production to decide to go for a wonder itself it would be helpful. I'd need the save before the AI actually starts the wonder of course, several turns before would probably be ok as well.
 
If anyone has a save where the AI has supposedly looked at Human tech/production to decide to go for a wonder itself it would be helpful. I'd need the save before the AI actually starts the wonder of course, several turns before would probably be ok as well.
Well, IIRC in my second chapter of immortal minimalism I started the Pyramids very early, and finished them quite late. There is a save each 10 turns of so in that thread. All in a nice .zip file here
http://forums.civfanatics.com/attachment.php?attachmentid=293516&d=1308849930

Run the test just...
- if/when you have some free time you wish to spend that way,
- if you think this can be somehow useful,
of course. :)
 
^OK thx, i'll probably look into it in near the future. I'm getting really interested now if this cheat exists or not. If the cheat exists i should come across some code where the AI decides to delay Mids because you're building it while replaying your save.

This'll also give me a chance to look at another issue that has had me wondering for some time. In Xml there's a value for SB for the wonderbuilding parameter that says that SB never builds wonders, or at least DJ Anion's guide translates the xml value for SB as "He never builds wonders". But i'm sure i've seen him build wonders. I'll check what the code does exactly with this xml value.
 
I'd assume it's in the tech choosing function, with the AI putting less value for the tech if somebody already started the associated wonder.
 
btw guys Vicawoo was onto something and you totally ruined it... Always amazes me how civfanatics can get deep into something particular...just small point in big picture someone outlines and you discuss it for 3 pages now!

We should discuss more if first GM is better then first GS in obvious non-bureau capitals...
 
How could you possible make this game both challenging and enjoyable without rigging the AI a bit? The amount of time it would take to make a truly ingenious reactive AI with just ONE difficulty level is already impractical. The AI gets things the human player doesnt, but the human player does plenty of things the AI cannot. It comes together quite nicely, all things considered. If the AI were actually intelligent, any game where a nearby AI starts with bronze or horses and you dont would be a loss within the first 100 turns.
 
The problem with code diving here is that you can't easily prove the cheat isn't there, the response would always be "you haven't looked deep enough". If it is there it would be easily provable of course.
I have to disagree. Soren actually talks about the tech selection code in the video. He mentions that the real code is more complicated but I bet it has the same method name as his example and it can't be excessively intricate. Anything checking the actions of another player would stick out like a sore thumb. Reading code in not some obscure art, you know. It just takes a bit of patience.

The more we talk about this, the more I become certain that this is simply another example of human beings finding patterns which don't exist. We've been over this repeatedly with the RNG and still someone appears on this forum every few months and claims that it's rigged. Some things never change.
 
@vranasm, maybe. I'll put my findings if any in another thread. It is relevant though, in all these wonder stories the risk of not getting the wonder is often underestimated imo. If there are tricks to dissuade the AI from building a certain wonder i'd think that it would be very important to know about them.

A settled GM will not often be better than an academy i think.

@Yamps, i came across that code as well. Didn't look closely enough to conclude anything atm. Will do.

@Abegweit, i haven't seen the video yet, it looks very interesting. I agree that if the cheat was there i would probably have seen it already, at least in that production function.And with a bit (or a lot) of patience you can see exactly what happens if you debug the code.But to prove to the community that something isn't there will always be a lot more difficult than proving it is there as you can just post the relevant code with some comments in that case.
 
btw guys Vicawoo was onto something and you totally ruined it...

We should discuss more if first GM is better then first GS in obvious non-bureau capitals...

@vranasm,actually whats interested me more about this thread is the idea of taking a Great artist 1st and bulbing Music.Also culture flipping barb citys is pretty cool.

I think the advantage with a early GM rather than GS is you can REX with impunity early on without crashing your science slider.I reckon if you compared the +50% from an academy to running a 100% science slider the BPT would be about the same,I havnt looked at the maths though its just a hunch.EDIT-(assuming you use the GM for a trade mission rather than settle)
 
well those 900g early game and running 100% for extensive time is what catched my eyes...

I am not sure burning your first GA to get GA for free GA (even if I like the GA from music) even pays for itself ;-) (pick up hands who knows in the sentence what is golden age and great artist... golden age is there only 1x).

Granted I love the GA -> 2-3x GS trick and music is on path to my favorite break out unit, but still ;-).

In the current SG game (Lionified etc) we got to the Music Ga more conventional way :-), but kind of very late though :-(.
 
vranasm is correct.
This thread already has a definitely interesting subject as topic. :)
So I apologize with vicawoo for my off topic posts and advise everybody to read the OP, in case they missed it.
 
Back
Top Bottom