1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

A "real" AI cheat

Discussion in 'Civ4 - General Discussions' started by The Snug, Jul 4, 2008.

  1. DanF5771

    DanF5771 Emperor

    Joined:
    Feb 21, 2008
    Messages:
    1,194
    If only Sisiutil would roll such starts for his ALC ;).
     
  2. MrCynical

    MrCynical Deity

    Joined:
    Oct 30, 2005
    Messages:
    4,510
    Location:
    The Dreaming Spires
    Assuming you're referring to the screenshot you've uploaded but not attached, Alex can trade in the situation you've shown. Not strictly a one tile island, but with a peak adjacent to the city blocking off all land access. Coastal tiles will act as a trade connection, so he could easily be trading iron from another civ. If you look at the score panel in your screenshot, you can see that he has a trade connection to you, and probably to all the other civs as well.

    Out of interest, what map script are you running? The generator is set up not to put tundra or mountains in the radius of a civ's starting tile, and Alex has somehow ended up with both.
     
  3. Psyringe

    Psyringe Scout

    Joined:
    Dec 7, 2001
    Messages:
    3,394
    Location:
    Berlin, Germany
    MrCynical is correct.

    The screenshot that OP was referring to can be seen here. You can clearly see that Alex is able to trade along the coast:



    You can also see an AI country to the NW of Alexander, with which he probably has trade connections.
     
  4. Jet

    Jet No, no, please. Please.

    Joined:
    Mar 16, 2006
    Messages:
    2,364
    Good luck with that.
     
  5. Woody1

    Woody1 Prince

    Joined:
    Feb 19, 2002
    Messages:
    468
    Location:
    Texas
    Well, sirsnothead could easily save a turn where the odds go against him, and claim it as "proof" even though he ignores the other 99 times things happen as expected.

    I've lost battles where the odds were over 99% in my favor. Yup, it happens. Less than 1 out of a hundreds times, but it happens, as it should.
     
  6. Psyringe

    Psyringe Scout

    Joined:
    Dec 7, 2001
    Messages:
    3,394
    Location:
    Berlin, Germany
    No, his claim is not that something unlikely happens more often than it should. His claim is that the AI is doing something that is clearly illegal by the game's rules (i.e., repeatedly withdrawing and attacking with the same unit in the same turn without the blitz promotion). In such a case, he really only needs to give us one reproducable example to prove his point. That doesn't mean that I expect that to happen though.
     
  7. Woody1

    Woody1 Prince

    Joined:
    Feb 19, 2002
    Messages:
    468
    Location:
    Texas
    Oh, okay I see. Yeah, he'll never post the result. I have a feeling he'll continue to claim it to be true, though.
     
  8. The Snug

    The Snug The Civ Heretic

    Joined:
    Dec 5, 2003
    Messages:
    954
    Location:
    Seattle
    It's quite possible that a mod is acting up, and the next I see it happen, I will post the save.

    I remember a time when a stack of four units is sitting outside my city, and I got attacked six times (with two withdrawals). I've seen this sort of thing happen enough times that I'd figured others would have noticed it by now too, and so I didn't think to "prove" what I already know to be true. Apparently, my civ is doing something different that other ppls.
     
  9. The Snug

    The Snug The Civ Heretic

    Joined:
    Dec 5, 2003
    Messages:
    954
    Location:
    Seattle
    I appreciate your efforts to reproduce this singular phenomenon, but yes ppl were being condescending with ppl basically saying, "oh look, another idiot who's seeing things that don't exist." I don't appreciate that, especially when I am absolutely certain that this has happened. Why it is happening I don't know, but I do know that it is happening.

    Just a mathematical note to your (C) in the first paragraph, a sub with an 80% withdrawal rate would not "most likely die in a subsequent attack"; to the contrary, that same sub would possess an 80% chance of withdrawing from a losing battle--which would account for the reason that that withdrawing sub can attack 4 or 5 times before finally dying (simple math dictates this mechanic).

    If you were being attacked 4 or 5 times by the same sub, I'm certain that you'd notice the inescapable conclusion that this is really happening too. I have indeed noticed being attacked 10 times by the same 3 subs before too.

    The question now simply remains, why is this happening in my games and no one else's.

    Yes, as I have promised, the next time I notice it, I'll post a save. And, it the save will come after it happens, bcz the combat log will provide the conclusive proof. Obviously if a full strength sub takes a certain amount of damage (which the log would indicate) and then withdraws, and then a second combat is listed in which the starting attack value of the subsequent attack matches the end value of the previous attack, this would provide sufficient burden of proof that this phenomena is indeed occuring.

    Posting a save before hand wouldn't be helpful for three reasons:
    1) If my civ files possess a unique anomaly, another user wouldn't be able to reproduce the occurrence
    2) In my observation, fast attack units do not perform this action everytime, they are unpredictable with it, sometimes they simply retreat.
    3) I cannot predict when the AI will behave in this manner, and I'm not going to save every turn just in hopes of catching this act again.

    The combat log should provide sufficient proof.

    Really, this occurrence is so obvious in my games that I did not anticipate others not experiencing this same anomaly.

    So lay off the "quit smoking that sh!t" attitude.

    But Psyringe, I do appreciate your research; I assume you will still want to see the proof later, so I'll post that for you. It might be a week or so though, bcz I notice it more on archi maps, and I've been doing a series on pangaea maps lately, and like I said, it's neither a consistent nor constant AI behavior.

    Yet, I might go back to one of my old games and just goof around until I see it happen.
     
  10. DanF5771

    DanF5771 Emperor

    Joined:
    Feb 21, 2008
    Messages:
    1,194
    You can set the autosave interval to 1 in your ini, so you don't have to save manually every turn but will always have a valid save should these mysteries occur again.
    My guess: crack in your civ space time continuum lets the attacker travel back in time and repeat its attack :scan:.
     
  11. JujuLautre

    JujuLautre Deity

    Joined:
    Apr 9, 2007
    Messages:
    3,112
    Location:
    Kansai, Japan
    If I'm included in these "ppl", then I'm really sorry. I definitely did not see you as stupid or anything like that. But there is a fact which is that some people are sometimes confused by what they see or understand in CIV and, even if they are sure about what they think/see, there is an obvious explanation. If, as I think, it is the case for you, you would not be the first, and certainly not the last. If indeed there is a problem, then a save is even more welcome.

    As for the latter, a save *before* would ALSO be helpful. Because if, as you claim, there is a problem, people will need to reproduce it so that they can fix it. If they can't, it will at least show that your installation of civ has a problem.
     
  12. PieceOfMind

    PieceOfMind Drill IV Defender Retired Moderator

    Joined:
    Jan 15, 2006
    Messages:
    9,312
    Location:
    Australia
    sirsnuggles, actually a screenshot or savegame immediately after the combat will not be anywhere near sufficient proof that your observations are explained by what you believe is happening. Since the results of combat are highly discretized (hopefully that's a word), the results of battles are far too often not unique. For most typical battles there are no more than about 10-20 or so possible outcomes. If a sub withdraws with 10HP for example, then it's probably not uncommon for subs to withdraw with that number. So to save you the inevitable disagreements if you do observe and save such a situation again, please do bother to include the save before the combat. For the reasons from Juju as well, it would be a good idea.

    A unit cannot be confirmed to fight two battles in one turn from the combat log.
     
  13. Psyringe

    Psyringe Scout

    Joined:
    Dec 7, 2001
    Messages:
    3,394
    Location:
    Berlin, Germany
    You're correct, I hadn't realized that a very high withdrawal rate would most likely prevent the unit from being killed. However, the unit still shouldn't be able to do much harm, since it has very low health and will probably either be killed *or withdraw again* on the first combat round it loses.

    Not really, since a) there is no way to doubt-free discern single units in the combat log, and b) it won't help us reproduce your observations. (There might also be a possibility that combat logs can be faked and that the validity of the save is questioned, but I don't about this, so I may be wrong here.)

    So, a save from befor the retreat/re-attack happens is more important, but nobody will stop you from providing both - especially because you have a point with your first remark here:

    However, the second remark is very unlikely to be a problem. As long as you play with preserved random seed, all your finding should be reproducible even when "random" behavior is concerned, because the random seed is stored in the savegame. And regarding your third remark, as DanF already said, you can use autosaves for that.
     
  14. pumpkin

    pumpkin Chieftain

    Joined:
    Nov 3, 2006
    Messages:
    39
    One thing I often see horse units do is to come out of the fog and attack and then withdraw back into the fog again so you can't see it the next turn. Nothing wrong with that, I just lack the line of sight to be able to track them as they withdraw into the fog. Sometimes they arrive 'through' a stack so when they attack it looks like they are part of the stack, but actually they were stationed further away inside the fog.
     
  15. MyOtherName

    MyOtherName Emperor

    Joined:
    Dec 7, 2004
    Messages:
    1,526
    As I have stated before, it's well-known casual observation is an unreliable evidence-gathering technique -- so people are (rightfully!) suspicious when you, for example, claim absolute certainty in your conclusion.

    Incidentally, it might be helpful (both for you and for us!) if you separate your observations from your conclusions -- explain without interpretation just what precisely it is you observed, and then afterwords explain why you interpret that as a single unit attacking.

    -------------------------------------------------------

    As for the combat log -- one thing we should be able to look for is the health of the units when they withdraw versus the health of attacking units. When a unit withdraws, it should be very weak. If we see incredibly weak attackers (with strengths that match those of withdrawn units), that adds some weight to the existence of this glitch. However, if all of the attackers are full health, that nearly disproves the hypothesis that we had a repeated attack in this battle.

    Sirsnuggles gave us another piece of information in his exposition -- the claim that the withdrawn units that continue to attack are able to do noticable damage. I've been interpreting this as a proxy for proof the former case doesn't happen -- that none of the attacks come from a weak unit. Therefore, the only way the same unit could be attacking repeatedly after withdrawing is if it also got a health boost in-between attacks.
     
  16. pumpkin

    pumpkin Chieftain

    Joined:
    Nov 3, 2006
    Messages:
    39
    By the way, snuggles, have you even tried reinstalling?
     
  17. The Snug

    The Snug The Civ Heretic

    Joined:
    Dec 5, 2003
    Messages:
    954
    Location:
    Seattle
    Actually, I probably should reinstall. I've installed patches over patches and have noticed some instability. At any rate, I believe that I have solved the problem of how the AI initiates these multiple combats, and thus, have indeed found a genuine AI exploit.

    Before I get to my "solution," let me respond to the following quote from another poster.

    "Sirsnuggles gave us another piece of information in his exposition -- the claim that the withdrawn units that continue to attack are able to do noticable damage. I've been interpreting this as a proxy for proof the former case doesn't happen -- that none of the attacks come from a weak unit. Therefore, the only way the same unit could be attacking repeatedly after withdrawing is if it also got a health boost in-between attacks."

    Actually, I never did assert this; it's quite the opposite actually. And that's how I first noticed this anomaly. I had an attack sub on patrol duty protecting a fish resource when it got attacked five different times by other attack "subs". It won all 5 battles. I thought to myself. "Wow. That's incredible. I gotta rename that unit to Hero Of The Republic, and I'm certain that it must be at like 1 health or something after all of those battles."

    Well, actually it didn't have any damage. I'd imagine that the odds of a sub accomplishing the feat of winning five consecutive battles against other attack subs while sustaining no damage would approach a mathematical impossiblity.

    It was that occurence that first clued me in into the AI exploit. After a great deal of incredulity (very much like the same incredulity so many of you are expressing to me), I came to the realization that the attack subs were attacking, withdrawing and attacking again. I didn't want to believe it, and I postulated some of the very same explanations that some of you have put forward, but after time, I could no longer deny what I kept seeing.

    As I said, I believe I have uncovered how the AI gets away with this exploit. Let me explain now. And oh, Psyringe, are you ready to try some new tests?

    I used to only play archi maps; where I saw this tactic ad nauseum in my naval combats. It may very well be that my accustimization to this tactic in naval warfare has colored both my perception concerning the behavior of mounted units on land and to other general types of naval combat. What I'm trying to say is that since I observed this behavior so often in a very specific condition, that perhaps I've permitted this conditioned occurence to influence my perception of what happens in other combat.

    At any rate, here's my postulization: As I think about it, I clearly notice this behavior occuring in a very specific situation, and there is no doubt that it is happening. When I have a unit on sea patrol (guarding a sea resource) and an attack sub comes to pillage that resource, a game mechanism prevents the attacking sub from actually pillaging that resource and instead initiates a battle between that foraging sub and my "on-call" defensive naval unit. Of course, for this exploit, the attacking sub loses and withdraws, and still possesses movement points. It then immediately attempts to pillage that very same resource again (or another next to it) and the game mechanism again takes over to prevent the pillaging and re-initiates combat. Hence, a second combat. Now, in this scenario, it should be clearly understood that the attack sub is not directly attacking my defensive naval unit but is instead attempting to pillage a resource that my naval unit is "on patrol" to protect; it is the multiple attempts at pillaging the same resource that initiates what appears to be multiple instances of attack, withdraw, attack, withdraw, attack...

    Understand me?

    With my particular game-play style, I attempt to monopolize fish resources for my sushido. It's not uncommon for me to amass over 40 or 50 (in one game over 100) fish resources. I use sushido to make very large cities that depend upon the continued sustenance provided by this corp.

    Naturally, when an AI attacks me they attempt to pillage all of my fish. If they are successful, then my giant cities begin to starve and I lose production. Thus, my problem is then to create a massive navy that protects each of these resources. I typically have each resource protected by several naval units that employ the "patrol" feature, hence the majority of my naval combat is watching enemy attack subs "sneak" in and attempt to pillage me (repeatedly). I will typically stack several mixed units in each of these defensive patrols, i.e., missile cruisers, battleships, destroyers and other subs. When an enemy attack sub approaches they often won't dare to attack my stack of superior units, but will instead simply attempt to pillage the resource. Sometimes, however, they do attack first and only after withdrawing from the combat, do they then attempt to pillage the resource (which initiates a second combat).

    I hope you followed that explanation.

    This AI exploit does give a substantial mathematical advantage to the AI. Visualize. Two subs fight, both are reduced down to their death threshold, on the next hit one of the two subs will die. The defending sub wins the hit, thereby killing the attacking sub. The AI sub, however, simply withdraws and attempts to pillage a second time, thus initiating this second battle. Remember, both subs are at death's door and will be killed by the next hit; for if I understand combat mechanics accurately there is a 50/50 chance of which unit is actually hit. So, back to our scenario, on the second combat the AI sub therefore has a 50/50 chance of hitting our poor human defender, but if it misses, it has an 80% chance of withdrawing from losing conflicts. Thus, in simple mathematical terms the AI sub possesses a 90% chance of surviving this second combat (50% chance of winning plus 40% chance of withdrawing (0.8 x 0.5= 0.4)). In theory, then, an AI attack sub in this situation could attack 9 times with impunity. And yes, in practice, I've been severly hurt by this AI exploit.
     
  18. DanF5771

    DanF5771 Emperor

    Joined:
    Feb 21, 2008
    Messages:
    1,194
    I understand and think it can really happen that way (although I have never seen it myself) because the game allows a unit to pillage after it has won or withdrawn from a battle and movement points left. So it basically is free Blitz vs patrolling defenders via pillage. Another unfair AI exploit is that the unit gains 1 XP every time it manages to withdraw.

    I don't think a reinstall will change this. Nice find.
     
  19. r_rolo1

    r_rolo1 King of myself

    Joined:
    May 19, 2006
    Messages:
    13,818
    Location:
    Lisbon, Portugal
    Best way to prove/disprove this is getting a game situation where this is supposed to happen ( Sushiland, war with a sub-able AI ) and label the AI units via WB. Then check the logs.

    About your explanation: looks possible, in spite of I never saw it in my games ( I tend to actively chase subs before they can hit my sushies anyway ;) )
     
  20. Refar

    Refar Deity

    Joined:
    Apr 10, 2005
    Messages:
    4,608
    However, if it works this way, it would not be just a AI exploit - a human player could use it as well (Except i nver seen a AI naval unit actually on partol....)

    It could also be tested out in a MP game (best non simultaneous, through it shouldnt make a diffrence).
     

Share This Page