Main Guide Introduction Basics Efficiency Buildings Citizens Military Hacking Spying Sciences Trade Fame Strategies Files

 
Spying Calculations (Advanced Math Involved)


This is meant for programmers or players who wish to program utilities, or have an advanced knowledge of the underlying calculations involved in Spying. It is not necessary to know for playing Ominix, and may only improve your game slightly. If you do not understand please do not worry, as some of the best players have not even read these calculations.
 
The algorithm:
 
my_rating = number of spies sent * (rating/100) (+ science bonus %)
their_rating = number of spies in country * (rating/100) (+ science bonus %)
 
ratio = multiplier*(my_rating/their_rating)
if ratio < 0.5, ratio = 0.5
if ratio > 2.0 ratio = 2.0
 
probability of success = (ratio-0.5)*66.7 %
 
 
Here is a walkthrough of the algorithm used:
 
You take the number of spies you send, and multiply it by your rating divided by 100. Then you multiply that by your science bonus for spying, if any, and add what you get to your value. So if you send out 100 spies, and have a science bonus of 15%, and a rating of 80%, then you take the 100 and multiply it by .8(80/100 = .8), and take the 80, and multiply it by your science bonus of .15(15%) to get 12. You then add the 12 to the 80 to get a my_rating of 92. Now you take the number of spies your target has, and multiply it by their rating divided by 100. Then you multiply that by their science bonus for spying, if any, and add what you get to your value. So if they have 70 spies with a bonus of 10% and a rating of 100%, then you take the 70, times it by 1, and take that, and times it by .1 to get 7, and add the 7 to the 70 to get a their_rating of 77. Each spying attack has a multiplier, and the easier the attack, the higher the multiplier. Now lets say you are doing a 'Rob Iron Depot' attack, which has a multiplier of 1. Now you take that multiplier and multiply it by my_rating divided by their_rating to get ratio. So if you have a my_rating of 92, and they have a their_rating of 77, then you divide the 92 by the 77 to get a ratio value of 1.19 and times that by the multiplier of 1. This yields(surprise!) 1.19. If the ratio is less than .5, it's counted as .5, and if it's higher than 2, it's counted as 2. Since 1.19 is neither below .5, nor above 2, it is left alone. Now to get the probability of success, subtract .5 from the ratio, and then multiply by 66.7 to get the chance of success. If you get a 10, then you have a 10% chance of success, if you get a 47, you have a 47% chance of success. If you get a 90%, you have a 90% chance of success. If you get a 100.05, then you have 100% chance of success. In the walkthrough example above, you subtract .5 from the 1.19 to get .69, and then you multiply the .69 by 66.7 to get 46%, which means you have a 46% chance of success. In actuality, you have closer to 48.94% chance of success, but I cut off several of the decimals in order to simplify the walkthrough a bit.
 
The multipliers for each attack are as follows:
 
Spy on Military -- 5.0
Industrial Sabotage -- 1.0
Farm Sabotage -- 1.5
Rob Granaries -- 1.0
Rob Iron Depots -- 1.0
Steal Technology -- 1.0
Citizen Kidnapping -- 1.0
Food Poisoning -- 1.0
Murder Spies -- 0.7
Murder Hackers -- 0.8

 
The algorithm for the rating decrease after an attack is:
 
20*(number of spies sent)/(total number of spies) if it's < 5, then rating decreases 5 points anyway
 
So, if you have 500 spies, and send 250, then you multiply the 20 by the 250 sent, then divide that by the total of 500 to get 10.
 

©1999 David Simal