1. We have added the ability to collapse/expand forum categories and widgets on forum home.
    Dismiss Notice
  2. All Civ avatars are brought back and available for selection in the Avatar Gallery! There are 945 avatars total.
    Dismiss Notice
  3. To make the site more secure, we have installed SSL certificates and enabled HTTPS for both the main site and forums.
    Dismiss Notice
  4. Civ6 is released! Order now! (Amazon US | Amazon UK | Amazon CA | Amazon DE | Amazon FR)
    Dismiss Notice
  5. Dismiss Notice
  6. Forum account upgrades are available for ad-free browsing.
    Dismiss Notice

A study of espionage mission

Discussion in 'Civ3 Strategy Articles' started by Oystein, Aug 15, 2004.

  1. thefusilier

    thefusilier Chieftain

    Joined:
    Oct 7, 2003
    Messages:
    92
    Location:
    Bangkok, Thailand (formerly Canada)
    Does the AI actually use spies for sure?
     
  2. TimBentley

    TimBentley Chieftain

    Joined:
    Apr 26, 2004
    Messages:
    2,898
    Location:
    Troy, MI
  3. AutomatedTeller

    AutomatedTeller Frequent poster

    Joined:
    Jan 25, 2006
    Messages:
    7,536
    Location:
    Medford, MA
    I have caught spies in my capitol before.
     
  4. stalin83

    stalin83 Chieftain

    Joined:
    Jan 26, 2008
    Messages:
    24
    Nice article.Tho I was wondering if there were any counter-intel methods a republic could use to guard against commie spies?the old civ2 had spy-units guard freindly cities against enemy spies. :)
     
  5. soujourner

    soujourner Chieftain

    Joined:
    Jul 6, 2007
    Messages:
    47
    Very useful information and well deserving of the star rating.

    Being relatively new to this game, I fear that if my spy is unsuccessful and it caught by a rival that this will trigger a war that I am not prepared to fight.

    Does anyone have any information regarding this?
     
  6. Aabraxan

    Aabraxan Mid-level Micromanager

    Joined:
    Jun 29, 2006
    Messages:
    5,106
    Location:
    Arkansas
    Yes, if spying is unsuccessful, it can trigger a war.
     
  7. woodandearth

    woodandearth Chieftain

    Joined:
    Feb 1, 2009
    Messages:
    48
    Location:
    Canton, P.R. China
    I have some question. Why a 4n-size city is easier to flip than a (4n-1)-size one? According to the "at least 3/4 citizens persuaded" condition, to flip both a 4n-size city and a (4n-1)-size city, we need to persuade at least n citizens. It is not easier, just the same.

    I do not understand the last example that size 4 easier than size 2, either. For size 4, we need to persuade 3 citizens while for size 2 need 2. Isn't it more difficult to persuade 3 than to persuade 2?
     
  8. CKS

    CKS Chieftain

    Joined:
    Feb 9, 2004
    Messages:
    2,021
    To flip a city of size 4 you need to persuade 3 citizens. To flip a city of size 3 you also need to persuade 3 citizens. However, you have more tries at persuading citizens when the city is size 4. Suppose the chance of persuading a citizen was 25%. Then the chance of persuading all 3 citizens in a pop 3 city is .25^3 = 1.56%. To flip a size 4 city of citizens A,B,C, and D we need to persuade one of these combinations: ABC, ABD, ACD, BCD, or ABCD. The chances of each of the first 4 possibilities are .25^3 * .75 = 1.17% and the chance of the last is .25^4 = 0.39%, so the total chance is 3.9%.

    For the pop 4 vs pop 2 case, assume the chance of persuading is 50% (it must be more than 1/3, as stated above, and 50% is easy). Then for two citizens the chance of a flip is .5^2 = 25%. For 4 citizens we have .5^4 = 6.25% for every possibility, and 5 possibilities, giving a 31.25% chance of flipping.
     
  9. Spoonwood

    Spoonwood Grand Philosopher

    Joined:
    Apr 30, 2008
    Messages:
    4,809
    Location:
    Ohio
    But when will they declare war if you fail at some espionage mission? What's the probability of them doing so?
     
  10. Spoonwood

    Spoonwood Grand Philosopher

    Joined:
    Apr 30, 2008
    Messages:
    4,809
    Location:
    Ohio
    What I think this article and the comments lack is when it makes sense to attempt an immediate steal, a careful steal, or a safe steal.

    If you check out the cost of steals, you'll find that safe steal attempts cost exactly twice of an immediate steal attempt and careful steal attempts cost 1.5 the amount of immediate steal attempts. So, 2 immediate steals cost the same as one safe steal, and 3 immediate steals cost the same as 2 careful steals.

    So, we might compare the probability of making the same number of steals for the same amount of cash. Of course, there's more to it, because you might want to steal right away to sell the tech/do an 2-fer or better. And you risk a war declaration. But, let's do that comparison supposing everything else the same.

    With just an embassy the probability of at least one of two immediate steals succeeding is (1 - (.68 * .68)) = 53.76%. One safe steal has a probability of 52% of succeeding. So, with just an embassy, immediate steals work out better over the course of enough steals than a safe steal.

    With just an embassy, the probability of at least one of three immediate steals succeeding is (1 - (.68 ^ 3)) = 68.56%. The probability of at least one of two careful steals succeeding is (1 - (.56 ^2)) = 68.64%. Thus, over enough steals, careful steals work out better.

    With a regular spy, two immediate steals (1 - (.52 ^ 2)) = 72.96%. This is again better than a safe steal at 68%.

    With a regular two, three immediate steals (1 - (.52 ^ 3)) = 85.94%. Two careful steals (1 - (.4 ^ 2)) = 84%. Thus, over enough steals, immediate steals work out as less costly.

    With a veteran spy, two immediate steals (1 - (.44 ^ 2)) = 80.64 %. This again is better than a safe steal at 76%.

    With a veteran spy, three immediate steals (1 - (.44 ^ 3)) = 91.48%. Two careful steals (1 - (.32 ^ 2)) = 89.76%. Thus, over enough steals with a veteran spy, immediate steals work out as less costly.

    To summarize, careful steals with just an embassy work out as less costly. Immediate steals work out as less costly with a spy.

    Though again, the above ignores the timing of the steal, angering other tribes if you fail at a steal (their attitude towards you gets worse if they catch your representative in the act of trying to steal), or them declaring war.
     
  11. justanick

    justanick Chieftain

    Joined:
    Oct 6, 2010
    Messages:
    844
    Location:
    Germany
    Also losing a spy has some costs associated within. Planting a spy takes time and money. Due the failed spy plantation flag it can take many turns in which you will not have a spy. Having a spy however grants you some valuable information with no further costs attached to it. That might outweight the seemingly marginal savings from the cheaper attempt versions.
     
    Spoonwood likes this.
  12. tmn

    tmn Chieftain

    Joined:
    Feb 21, 2017
    Messages:
    11
    I suspect it isn't random and works the same as asking their troops to leave.

    The savings aren't marginal.

    An average cost of stealing a tech with probability p would be [price / p]. Here are the multipliers to immediate price:
    Code:
                 Immediately  Carefully  Safely
    Embassy      3.1          3.4        3.8
    Regular spy  2.1          2.5        2.9
    Veteran spy  1.8          2.2        2.6
    
    Now lets account for the spy costs. Assuming you will try to plant a spy every turn, it'll have a success chance of q on the first turn and [q / 3] later. So you will pay once with probability q, twice with probability [(1 - q) * (q / 3)], 3 times with probability [(1 - q) * (1 - q / 3) * (q / 3)] and so on. The average cost will be [price * q + (1 - q) * (q / 3) * SUM[(1 - q / 3) ^ (n - 1) * (n + 1) * price]] = [price * (3 / q - 2)]. That's [4 * price] for regular spy and [3 * price] for veteran.

    The probability of a spy not being caught is r = [p / 0.8]. You'll have to make [1 / p] steal attempts per tech on average, so you'll get caught [(1 - r) * (1 / p)] = [1 / p - 1.25] times and will have to replant a spy every time.

    This results in the following additional costs per tech (multiplier to a price of one spy):
    Code:
                 Immediately  Carefully  Safely
    Embassy      0            0          0
    Regular spy  3.3          1.7        0.9
    Veteran spy  1.6          0.7        0.2
    
    Here's an example for a veteran spy. Compared to a safe steal, immediate steal saves you 0.8 of an immediate price for 1.4 of a spy price. If a spy costs 70 gold and a steal — 1000 gold, then immediate stealing of a tech will cost you [(1.8 * 1000 + 1.6 * 70) / (2.6 * 1000 + 0.2 * 70)] ~ 73% of gold it would take safely.

    The downside is that you are more likely to get caught. And when you do:
    - AI might declare a war;
    - you have to wait turns to replant the spy;
    - catching a spy decreases attitude towards you.

    None of those should be a big problem. Weak and peaceful civs won't declare a war even if they catch you. And you can continue espionage missions even if you are at war with that civ.

    Because of the lower average cost and lower attempt prices, you get techs faster with immediate steals. Which in turn can get you more money.
     
    Last edited: Sep 16, 2018
    Spoonwood likes this.
  13. Spoonwood

    Spoonwood Grand Philosopher

    Joined:
    Apr 30, 2008
    Messages:
    4,809
    Location:
    Ohio
    I don't know why you say that, have you tested it? If it ends up based on reputation, which sounds plausible, this suggests to me that with least aggressive opponents, the probability of them declaring on you ends up the lowest. And with maximum aggressiveness the probability ends up the highest.

    Oh... duh! Nice. Thank you!

    I ran a quick test, and maybe I missed it above, that you can't attempt a steal if you're a war with a tribe without a spy. But, if you have a spy planted, then you can attempt to steal tech during a war.
     
  14. tmn

    tmn Chieftain

    Joined:
    Feb 21, 2017
    Messages:
    11
    I haven't tested it, but from my limited experience if AI doesn't declare on eviction they don't declare on any spy fails either. And vice versa.
     
  15. tmn

    tmn Chieftain

    Joined:
    Feb 21, 2017
    Messages:
    11
    I've corrected my previous post to account for the failed attempts which do not result in spy being caught. That makes spy costs even lower (2.7 -> 1.8).
     
    Spoonwood likes this.
  16. tmn

    tmn Chieftain

    Joined:
    Feb 21, 2017
    Messages:
    11
    I've found and corrected a mistake in my spy cost calculations (4.5 -> 4 , 3.4 -> 3) and in the "additional costs" table (3.8 -> 3.3, 1.9 -> 1.7, 1.0 -> 0.9, 1.8 -> 1.6). :blush:
     

Share This Page

Ebates: Get Paid to Shop