IntroductionBehold Cogmind: a jumbled collection of scavenged parts, scarred by the fire of hundred battles, formidable and indomitable. Beleaguered by the relentless assault of enthralled drones, Cogmind must employ cunning and guile to prevail against its foes. Using the Volley Simulator, Cogmind can tap into the power of Statistics to optimize its weaponry, and inflict anguish and calamity to those who would interfere with its quest for freedom.
How does it work?The program simulates shooting a robot with a volley of weapons until it dies. This is done repeatedly, so you can find out which weapons and utilities are more effective on average against each type of enemy.
The simulator is a script written in Python. You modify the top of the script to provide the statistics of the weapons, volleys and enemy robots. A small example is shown below.
First, you specify the stats of each weapon, then you specify the weapons and utilities used for each type of volley. The enemy robots themselves are modelized as a list of parts (integrity + coverage) along with their resistances. See the script for the full documentation of all fields.
weapon_list = [
{
"name" : "Nova Cannon",
"type" : "TH",
"damage" : [37, 42],
"crit" : 2,
},
{
"name" : "Railgun",
"type" : "KI",
"damage" : [21, 30],
"recoil" : 2,
"crit" : 2,
}
]
volley_list = [
{
"name" : "Nova cannon and 2 Railguns",
"weapons" : [ "Nova Cannon", "Railgun", "Railgun" ],
"target" : 10,
"recoil_red" : 1,
"crit" : 20,
}
]
robot_list = [
{
"name" : "Enforcer (grunt)",
"res" : [ +25, 0, +25, 0 ],
"target" : 70,
"parts" : [ ("Core", 70, 40),
("Heavy Laser", 50, 14),
("Phase Gun", 50, 14),
("Light Quantum Reactor", 50, 8),
("Myomer Leg", 200, 10),
("Myomer Leg", 200, 10),
("Advanced Heat Sink", 40, 2),
("Advanced Heat Sink", 40, 2)]
}
]
LimitationsThe base hit chance must be specified in the enemy robot description. This is the catch-all to account for distance, movement, robot size, heat, cloaking devices, hack links and corruption. However, targeting computers, weapon-specific bonuses and recoil are fully modelized.
For launchers, the base hit chance is ignored and the distance-from-hit-center distribution is specified instead. The first value is the chance to hit point-blank, the last value is the chance to miss entirely.
The enemy parts have no intrinsic effect except armor. So, it's not possible to modelize shielding, force fields and dynamic insulation systems. Armor pieces are identified by having "armor" in their name.
The effects of heat, power, matter, range, penetration, EM spectrum are ignored. Melee is not modelized.
The rest of the mechanics should behave as in the game.
Running the scriptThe script requires a Python interpreter to run. On Windows, install ActivePython (
http://www.activestate.com/activepython). Then, open cmd.exe from the Start menu. In the console, type the full path to the script, minus the '.py' part. For example, "C:\Users\Decker\Desktop\sim". You should see the script running.
There are two supported modes. In verbose mode (aka debug mode), you can watch a fight as it unfolds (all defined volleys against all enemies). Example.
Volley simulator version 1.0
Weapon "Nova Cannon", damage 37-42 TH.
Modifiers: critical 2%.
Weapon "Railgun", damage 21-30 KI.
Modifiers: recoil 2, critical 2%.
Weapon "Fusion Bomb", damage 57-109 EX.
Launcher hit dist (0=20%, 1=10%, 2=10%, 3=10%, 4=10%, 5=10%, miss=30%), falloff 15.
Weapon "Heavy Proton Cannon", damage 30-34 EM.
Modifiers: critical 4%, disruption 6%.
Volley "Nova cannon and 2 Railguns", shoot time 325.
Weapons: Nova Cannon, Railgun, Railgun.
Targeting computer: 10%.
Target analyzer: 20%.
Volley "Fusion Bomb with Heavy Proton Cannon", shoot time 300.
Weapons: Fusion Bomb, Heavy Proton Cannon.
Core analyzer: 15%.
Particle charger: 35%.
Robot "Enforcer (grunt)".
Resistances: KI 25, TH 0, EM 25, EX 0.
Base hit chance: 70%.
Part list.
Core: integrity 70, coverage 40 (40%).
Heavy Laser: integrity 50, coverage 14 (14%).
Phase Gun: integrity 50, coverage 14 (14%).
Light Quantum Reactor: integrity 50, coverage 8 (8%).
Myomer Leg: integrity 200, coverage 10 (10%).
Myomer Leg: integrity 200, coverage 10 (10%).
Advanced Heat Sink: integrity 40, coverage 2 (2%).
Advanced Heat Sink: integrity 40, coverage 2 (2%).
Robot "Sage (programmer)".
Resistances: KI 25, TH 25, EM -75, EX -25.
Base hit chance: 65%.
Part list.
Core: integrity 50, coverage 30 (30%).
Gamma Rifle: integrity 50, coverage 12 (12%).
Gamma Rifle: integrity 50, coverage 12 (12%).
Advanced Remote Data Jack: integrity 50, coverage 10 (10%).
Micro Fission Core: integrity 50, coverage 3 (3%).
Light Particle Reactor: integrity 80, coverage 8 (8%).
Improved AntiGrav System: integrity 55, coverage 7 (7%).
Improved AntiGrav System: integrity 55, coverage 7 (7%).
Improved AntiGrav System: integrity 55, coverage 7 (7%).
Advanced Heat Sink: integrity 40, coverage 2 (2%).
Advanced Heat Sink: integrity 40, coverage 2 (2%).
FIGHT!! Volley "Nova cannon and 2 Railguns" vs robot "Enforcer (grunt)"!
Volley 1.
Shooting weapon "Nova Cannon".
Projectile 1 hits (hit chance=78.0%).
Rolled base damage 37.0, actual damage 37.0.
Core hit for 37.0 damage (hit chance=40.0%).
Core down to 33.0/70.
Shooting weapon "Railgun".
Projectile 1 hits (hit chance=79.0%).
Rolled base damage 27.0, actual damage 33.8.
Light Quantum Reactor hit for 33.8 damage (hit chance=8.0%).
Light Quantum Reactor down to 16.2/50.
Shooting weapon "Railgun".
Projectile 1 hits (hit chance=79.0%).
Rolled base damage 29.0, actual damage 36.2.
Phase Gun hit for 36.2 damage (hit chance=14.0%).
Phase Gun down to 13.8/50.
Volley 2.
Shooting weapon "Nova Cannon".
Projectile 1 hits (hit chance=78.0%).
Rolled base damage 42.0, actual damage 42.0.
Core hit for 42.0 damage (hit chance=40.0%).
Core busted!
FIGHT!! Volley "Nova cannon and 2 Railguns" vs robot "Sage (programmer)"!
Volley 1.
Shooting weapon "Nova Cannon".
Projectile 1 hits (hit chance=73.0%).
Rolled base damage 38.0, actual damage 47.5.
Improved AntiGrav System hit for 47.5 damage (hit chance=7.0%).
Critical hit, Improved AntiGrav System destroyed!
Shooting weapon "Railgun".
Projectile 1 hits (hit chance=74.0%).
Rolled base damage 25.0, actual damage 31.2.
Gamma Rifle hit for 31.2 damage (hit chance=12.9%).
Gamma Rifle down to 18.8/50.
Shooting weapon "Railgun".
Projectile 1 hits (hit chance=74.0%).
Rolled base damage 25.0, actual damage 31.2.
Gamma Rifle hit for 31.2 damage (hit chance=12.9%).
Gamma Rifle down to 18.8/50.
Volley 2.
Shooting weapon "Nova Cannon".
Projectile 1 hits (hit chance=73.0%).
Rolled base damage 42.0, actual damage 52.5.
Core hit for 52.5 damage (hit chance=32.3%).
Core busted!
FIGHT!! Volley "Fusion Bomb with Heavy Proton Cannon" vs robot "Enforcer (grunt)"!
Volley 1.
Shooting weapon "Fusion Bomb".
Hit at distance 3, falloff 45, 1 projectiles (chance=10.0%).
Projectile 1/1.
Rolled base damage 49.0, actual damage 49.0.
Advanced Heat Sink hit for 49.0 damage (hit chance=2.0%).
Advanced Heat Sink destroyed.
Shooting weapon "Heavy Proton Cannon".
Projectile 1 hits (hit chance=70.0%).
Rolled base damage 31.0, actual damage 52.3.
Phase Gun hit for 52.3 damage (hit chance=14.3%).
Phase Gun destroyed.
Dealing 48.7 EM damage.
Volley 2.
Shooting weapon "Fusion Bomb".
Miss (chance=30.0%).
Shooting weapon "Heavy Proton Cannon".
Projectile 1 misses (hit chance=70.0%).
Volley 3.
Shooting weapon "Fusion Bomb".
Hit at distance 4, falloff 60, 2 projectiles (chance=10.0%).
Projectile 1/2.
Rolled base damage 13.0, actual damage 13.0.
Myomer Leg hit for 13.0 damage (hit chance=11.9%).
Core analyzer transfers 6.5 damage to core.
Myomer Leg down to 193.5/200.
Core down to 63.5/70.
Projectile 2/2.
Rolled base damage 13.0, actual damage 13.0.
Myomer Leg hit for 13.0 damage (hit chance=11.9%).
Myomer Leg down to 180.5/200.
Shooting weapon "Heavy Proton Cannon".
Projectile 1 misses (hit chance=70.0%).
Volley 4.
Shooting weapon "Fusion Bomb".
Hit at distance 0, falloff 0, 1 projectiles (chance=20.0%).
Projectile 1/1.
Rolled base damage 89.0, actual damage 89.0.
Myomer Leg hit for 89.0 damage (hit chance=11.9%).
Myomer Leg down to 91.5/200.
Shooting weapon "Heavy Proton Cannon".
Projectile 1 hits (hit chance=70.0%).
Rolled base damage 32.0, actual damage 54.0.
Heavy Laser hit for 54.0 damage (hit chance=16.7%).
Core analyzer transfers 27.0 damage to core.
Heavy Laser down to 23.0/50.
Core down to 36.5/70.
Dealing 27.1 EM damage.
Volley 5.
Shooting weapon "Fusion Bomb".
Hit at distance 3, falloff 45, 2 projectiles (chance=10.0%).
Projectile 1/2.
Rolled base damage 22.0, actual damage 22.0.
Core hit for 22.0 damage (hit chance=47.6%).
Core down to 14.5/70.
Projectile 2/2.
Rolled base damage 22.0, actual damage 22.0.
Heavy Laser hit for 22.0 damage (hit chance=16.7%).
Core analyzer transfers 11.0 damage to core.
Heavy Laser down to 12.0/50.
Core down to 3.5/70.
Shooting weapon "Heavy Proton Cannon".
Projectile 1 hits (hit chance=70.0%).
Rolled base damage 31.0, actual damage 52.3.
Advanced Heat Sink hit for 52.3 damage (hit chance=2.4%).
Advanced Heat Sink destroyed.
Dealing 76.1 EM damage.
Robot terminally corrupted!
FIGHT!! Volley "Fusion Bomb with Heavy Proton Cannon" vs robot "Sage (programmer)"!
Volley 1.
Shooting weapon "Fusion Bomb".
Miss (chance=30.0%).
Shooting weapon "Heavy Proton Cannon".
Projectile 1 hits (hit chance=65.0%).
Rolled base damage 30.0, actual damage 10.1.
Light Particle Reactor hit for 10.1 damage (hit chance=8.0%).
Light Particle Reactor down to 69.9/80.
Dealing 7.9 EM damage.
Volley 2.
Shooting weapon "Fusion Bomb".
Hit at distance 0, falloff 0, 1 projectiles (chance=20.0%).
Projectile 1/1.
Rolled base damage 77.0, actual damage 57.8.
Advanced Remote Data Jack hit for 57.8 damage (hit chance=10.0%).
Advanced Remote Data Jack destroyed.
Shooting weapon "Heavy Proton Cannon".
Projectile 1 hits (hit chance=65.0%).
Rolled base damage 30.0, actual damage 10.1.
Gamma Rifle hit for 10.1 damage (hit chance=13.3%).
Gamma Rifle down to 39.9/50.
Dealing 10.0 EM damage.
Volley 3.
Shooting weapon "Fusion Bomb".
Hit at distance 2, falloff 30, 1 projectiles (chance=10.0%).
Projectile 1/1.
Rolled base damage 56.0, actual damage 42.0.
Core hit for 42.0 damage (hit chance=33.3%).
Core down to 8.0/50.
Shooting weapon "Heavy Proton Cannon".
Projectile 1 hits (hit chance=65.0%).
Rolled base damage 34.0, actual damage 11.5.
Improved AntiGrav System hit for 11.5 damage (hit chance=7.8%).
Improved AntiGrav System down to 43.5/55.
Dealing 5.8 EM damage.
Volley 4.
Shooting weapon "Fusion Bomb".
Miss (chance=30.0%).
Shooting weapon "Heavy Proton Cannon".
Projectile 1 hits (hit chance=65.0%).
Rolled base damage 32.0, actual damage 10.8.
Improved AntiGrav System hit for 10.8 damage (hit chance=7.8%).
Improved AntiGrav System down to 44.2/55.
Dealing 11.9 EM damage.
Volley 5.
Shooting weapon "Fusion Bomb".
Miss (chance=30.0%).
Shooting weapon "Heavy Proton Cannon".
Projectile 1 misses (hit chance=65.0%).
Volley 6.
Shooting weapon "Fusion Bomb".
Hit at distance 0, falloff 0, 2 projectiles (chance=20.0%).
Projectile 1/2.
Rolled base damage 41.0, actual damage 30.8.
Gamma Rifle hit for 30.8 damage (hit chance=13.3%).
Gamma Rifle down to 19.2/50.
Projectile 2/2.
Rolled base damage 41.0, actual damage 30.8.
Gamma Rifle hit for 30.8 damage (hit chance=13.3%).
Gamma Rifle down to 9.1/50.
Shooting weapon "Heavy Proton Cannon".
Projectile 1 hits (hit chance=65.0%).
Rolled base damage 34.0, actual damage 11.5.
Gamma Rifle hit for 11.5 damage (hit chance=13.3%).
Gamma Rifle destroyed.
Dealing 6.3 EM damage.
Volley 7.
Shooting weapon "Fusion Bomb".
Hit at distance 3, falloff 45, 2 projectiles (chance=10.0%).
Projectile 1/2.
Rolled base damage 17.0, actual damage 12.8.
Core hit for 12.8 damage (hit chance=38.5%).
Core busted!
In standard mode, you get the stats after simulating a large number of fights (I recommend simulating 100000 fights for better accuracy). Example.
<snip>
Simulating 100000 fights.
Fight statistics.
Volley "Nova cannon and 2 Railguns" vs robot "Enforcer (grunt)".
Mean number of volleys 2.40, standard deviation 1.23.
Mean time to kill 780.8, standard deviation 401.3.
Cause of death: critted 46.1%, busted 53.9%, corrupted 0.0%, disrupted 0.0%.
Volley "Nova cannon and 2 Railguns" vs robot "Sage (programmer)".
Mean number of volleys 2.59, standard deviation 1.45.
Mean time to kill 841.5, standard deviation 472.1.
Cause of death: critted 35.7%, busted 64.3%, corrupted 0.0%, disrupted 0.0%.
Volley "Fusion Bomb with Heavy Proton Cannon" vs robot "Enforcer (grunt)".
Mean number of volleys 2.52, standard deviation 1.13.
Mean time to kill 755.5, standard deviation 337.6.
Cause of death: critted 2.5%, busted 70.2%, corrupted 26.5%, disrupted 0.7%.
Volley "Fusion Bomb with Heavy Proton Cannon" vs robot "Sage (programmer)".
Mean number of volleys 5.33, standard deviation 2.87.
Mean time to kill 1600.4, standard deviation 860.2.
Cause of death: critted 3.8%, busted 93.3%, corrupted 0.7%, disrupted 2.3%.
Interpreting the results (in standard mode)The mean time to kill (MTTK) is the time it took to kill the robot on average (average number of volleys * volley time). In other words, this measures the average time spent shooting at the robot.
The time when the robot actually died is 'volley time' less than that (on average). For example, killing a robot with a large volley of 8 weapons (time 400) takes the same time as killing it with 2 volleys of 1 weapon (time 200 + 200). However, in the latter case the robot has 200 time to shoot back at you, whereas it dies immediately with the large volley.
Thus, the MTTK really tracks how long its buddies will shoot back at you, not how long your target will shoot back at you.
The standard deviation is also reported (this represents how much the MTTK vary on average).
Bugs, questions, analysisIf you have a question or find a bug, post in this thread and I'll get to it as time allows. If you get interesting results, then by all means share them with us!
Have fun!
Current version of the simulator: 1.1.
Changelog.
1.1: fixed launcher proccing core analyzer and armor integrity.