Utility script: Combat calculator - alpha

« Back to Developers

2401 days, 21 hours, 44 minutes ago
Profile Image
kosmonymous
Utility script: Combat calculator - alphaWrite Reply
Goto:


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


Are you afraid to send your troops to certain death? Are you hesitant to ruin that shiny duranium plating for no gain? Still can't understand how that Virgo took out your Biocide from the right? With Kosmonymous' Combat Calculator you know the exact (estimated) odds of the upcoming battle. No more will your troops die in vain, but meet their makers in calculated gambles of their commanders. What are you waiting for! Your opponents are already 
(soon) using it.


This is alpha release of a combat calculator. The idea is to simulate quickly multiple results to get a better idea of how a fight will end. Currently does just that without any bells and whistles. Its rough, I know.

0.1 alpha - Simulate one fight multiple times and get a results shown  
  * If left side is not dead or captured then its a win.  
  * List shows damage of the ships when battle ends

Known issues / warnings:  
  * If you click "Calc sim" again before last one finished, it will run in background and populate list.  
  * Might mess the normal simulator although it shouldn't and doesn't seem to.  
  * UI is designed for robots.

Upcoming features/ideas:  
  * Better result browser  
  * Fleet battles  
  * Battle values  
  * PBP and lost resources counters  
  * Fleet handling tools (clone, edit etc ships in fleet)  
  * Adding ships to fleet from starmap and/or ships list

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

All comments are welcome. This is a first version I got running so it is rough, but serves a purpose. Already I know more about odds than before what I learned from experience and brilliant Master at Arms document by Jan Klingele.

The development will be most likely sporadic, so don't expect it to be finished soon. Although I want to see fleet simulations in the future.

As this is alpha release I can't give any guarantees, but it does work on two computers using chrome. If not working please comment and I'll look into it.

Br, Kosmo
2401 days, 10 hours, 58 minutes ago
View emork the lizard king's profile
emork the lizard king
RE: Utility script: Combat calculator - alphaWrite Reply
Hi Kosmonymous,

how do you do the simulations? Run the nu-combat simulator several times or use (partly) your own combat code?
2401 days, 8 hours, 24 minutes ago
Profile Image
kedalion
RE: Utility script: Combat calculator - alphaWrite Reply
Subscribe :)
2401 days, 8 hours, 23 minutes ago
Profile Image
kosmonymous
RE: Utility script: Combat calculator - alphaWrite Reply

Hi emork,

its a stripped down version of nu-combat simulator. Then I run it several times. It seems it can still be modified to be a lot more faster. Currently it uses the asynchronous approach which is required by the graphical simulator, but as this doesn't need that I'll test later how fast it is without the recursive calls etc.

2401 days, 5 hours, 45 minutes ago
View emork the lizard king's profile
emork the lizard king
RE: Utility script: Combat calculator - alphaWrite Reply
Thx for the answer. I asked because even tiny differences e.g. in fighter timing can lead to very different results. For reliable results it would also be neccesary that the nu-simulater uses exaclty the same cdse as the the nu-host. I'm not absolutly sure about this because of some indication that training games use another code base than real games (tow-drop-chunnel enabled / disabled). Do you have information about the identity of simulater/host-code?

The best VGAP combat simulator I know is PlayVCR, part of PCC2 from Stefan Reuther. It has also a nu-mode. Maybe you want to take a look at it: http://www.phost.de/~stefan/pcc2.html
Especially the statistics (shields, damage, fighters launched/lost, torps fired/hit ) are great.

Best regards and much success with your project. I'll try it out the next day.
2401 days, 5 hours, 0 minutes ago
Profile Image
kosmonymous
RE: Utility script: Combat calculator - alphaWrite Reply
Hi,

thanks for the info. It will come very handy as I can probably check the source against the NuHost code. Maybe Joshua can tell about the bsim compatibility more, as it is a devious problem if the current bsim differs from the actual host implementation. For many players (myself included) that is the main tool for battle simulations. My main target for the Combat Calculator is to enable testing efficient fleet designs against enemy ships/fleets and giving good enough estimations for managing risks during game-play combat.

Anyway, the validity of the simulations is of highest importance and will check it.
2401 days, 2 hours, 49 minutes ago
Profile Image
kwesy
RE: Utility script: Combat calculator - alphaWrite Reply

2400 days, 21 hours, 7 minutes ago
View nakor's profile
nakor
RE: Utility script: Combat calculator - alphaWrite Reply
subscribe
2395 days, 14 hours, 42 minutes ago
Profile Image
kosmonymous
RE: Utility script: Combat calculator - alphaWrite Reply
Hi, I'm pretty sure the combat code in vcr is correct as that is the one we see in the recordings during the games, so it must be implemented the same as the host. Only the ship stats and the random seed are recorded from the host run.

The Combat Calculator is soon getting ready for 0.2 version and currently I have it simulating fleet battles already. As an addition I threw in visual fleet simulator, so you can actually watch fleet battles. There are some missing necessities (fleet clear etc) and a couple visual issues and at least one battle result changing bug, but when those are corrected you will get a new version to play with. 
2395 days, 0 hours, 54 minutes ago
View emork the lizard king's profile
emork the lizard king
RE: Utility script: Combat calculator - alphaWrite Reply
Hi Kosmony,

I'll start testing when version 0.2 is released. I have a lot of simulation results from PCC2 and I'm eager zu compare these with nu-host.
2395 days, 0 hours, 46 minutes ago
Profile Image
kosmonymous
RE: Utility script: Combat calculator - alphaWrite Reply
New version 0.2 is available -> http://userscripts.org/scripts/show/156417

The UI is even worse if possible but has the necessary minimal buttons. The battlevalue is an imitation so that smaller gets the left side and if equal the left side fleet gets the left side. Fleets are ordered in order of addition NOT BY BATTLEVALUE.

Check to new "Run fleet" button at top. Its awesome.

Ships need to be added to both fleet before the Run calc or Run fleet work.

Br, Kosmonymous

Changelog:

0.2 alpha 2 - Simulate fleet battles visually and calculate odds 
 What's new: 
 * Fleets 
 * Battlevalues 
 * Fixed right side vs carrier mass addition 
 * Correct handling of fed shield bonus 
 * "Run fleet" - visual combat

 Known issues: 
 * Planets do not work
2394 days, 21 hours, 49 minutes ago
Profile Image
kedalion
RE: Utility script: Combat calculator - alphaWrite Reply
Ok, just installed and tried it. 

I really like the 'Run calc' feature. Though I don't know how to interpret the results... The result window is relatively small and some text seems to be hidden. It is also dark gray on top of black. More contrast would be nice. The part of the entries that I see (Biocide against Gorbie) is either "0 vs. 100" or "100 vs. 0"... As I said, no idea how to interpret that.
2394 days, 21 hours, 41 minutes ago
Profile Image
sdeha
RE: Utility script: Combat calculator - alphaWrite Reply
0 vs. 100 means that left side lost, and right side had 100 hull left.
2394 days, 21 hours, 39 minutes ago
Profile Image
kosmonymous
RE: Utility script: Combat calculator - alphaWrite Reply
The version 0.1 had the damage output, but as in this version I added fleets the results don't actually mean anything apart from the "left side wins 3 out of 10" etc. (0vs100 means a left side victory and 100vs0 means a right side victory to be exact). You can add many ships to the combat and I don't have a result browser so it is just having some placeholder data in the list atm. 
2394 days, 21 hours, 35 minutes ago
Profile Image
sdeha
RE: Utility script: Combat calculator - alphaWrite Reply
Found out exactly how it bugs now.

It only can run fleet battles now. Adding ships to fleets do not show anywhere, and only one ship per side can be added to fleet. After running one fleet battle, run calc just simulates that. Run Calc does not work on it's own anymore.

So

When first loading Battle Simulator - Run Calc does nothing.
Can add ships to fleet, but no list updates. 
Only one ship is added to each side, after that it does not work anymore.
After adding one ship to fleets, you can run fleet battle, but after ship is destroyed it freezes.
Run calc works after running fleet battle, but it calculates fleet battle results instead of chosen ships.

This is what I get with Chrome.
2394 days, 21 hours, 33 minutes ago
Profile Image
kedalion
RE: Utility script: Combat calculator - alphaWrite Reply
Ah, ok. I was about to answer to sdeha. 

Could you put single ships 'calc' back in with an additional button? I never saw the earlier version in which it existed, but it seems very important by itself. Something where one can see the damage, shields, and fighters (maybe figthers lost) after the battle would be great.
2394 days, 21 hours, 30 minutes ago
Profile Image
kedalion
RE: Utility script: Combat calculator - alphaWrite Reply
sdeha, I tried Gorbie vs. Biocide and I get mixed wins.
2392 days, 17 hours, 2 minutes ago
View ecatoncheires's profile
ecatoncheires
RE: Utility script: Combat calculator - alphaWrite Reply
subcribe
2382 days, 22 hours, 24 minutes ago
View tom n's profile
tom n
RE: Utility script: Combat calculator - alphaWrite Reply
subscribe
2335 days, 9 hours, 12 minutes ago
View rahim77's profile
rahim77
RE: Utility script: Combat calculator - alphaWrite Reply
Can not figure out how to start calculator.

script installed successfully, but how to start it?
2334 days, 17 hours, 46 minutes ago
Profile Image
kosmonymous
RE: Utility script: Combat calculator - alphaWrite Reply
If you don't see the extra buttons shown in the picture, the game client might have changed and the script is not anymore working. The development has been on hold as I don't have any interesting games going on atm. 
2334 days, 13 hours, 27 minutes ago
View regicide's profile
regicide
RE: Utility script: Combat calculator - alphaWrite Reply
Have not set up yet but this will be great.
Thanks kosmonymous.
2330 days, 7 hours, 42 minutes ago
View rahim77's profile
rahim77
RE: Utility script: Combat calculator - alphaWrite Reply
Where should be this button?
screen looks unfamiliar.
2330 days, 6 hours, 13 minutes ago
Profile Image
kosmonymous
RE: Utility script: Combat calculator - alphaWrite Reply

If it works correctly the extra fields and buttons are located in the original battle simulator view top pane. You can see the location in the screenshots: http://userscripts.org/scripts/show/156417

if you don't see the buttons although the script installed correctly and is enabled and you are using the planets.nu (don't know if works with play.planets.nu), then I am afraid that some change might have broken the script.

2330 days, 5 hours, 7 minutes ago
View thin lizzy's profile
thin lizzy
RE: Utility script: Combat calculator - alphaWrite Reply
subscribe
2099 days, 6 hours, 39 minutes ago
Profile Image
purebloodprince
RE: Utility script: Combat calculator - alphaWrite Reply
Does it work with the new client? 
2099 days, 4 hours, 27 minutes ago
Profile Image
kosmonymous
RE: Utility script: Combat calculator - alphaWrite Reply
This is not under active development. I think bigbeefer had something similar and more current going on. Haven't been playing planet lately, so what you ask is untested.