Jump to content
Qark

Probability Calculator

Recommended Posts

Hi everyone. I have written a probability calculator for legion using C#

You put in the attacking and defending unit info, then the program simulates the attack steps thousands of times to determine the probability of each outcome. It will output the probability of each number of hits, the probability of getting at least a number of hits, the average, the median, the mode, and the standard deviation.

The code is available on GitHub:

https://github.com/andrew-s-hart/SW-Legion-Probability-Calculator

or if you don't care about the code and just want to run the exe you can get that here:

https://github.com/andrew-s-hart/SW-Legion-Probability-Calculator/raw/master/LegionCalculator.exe

I am using 64bit windows 10 and haven't tested the program on anything else. I am not a professional programmer and haven't used GitHub before so any suggestions are welcome.

 

 

Capture.PNG

Edited by Qark
Updated software

Share this post


Link to post
Share on other sites
37 minutes ago, Rumar said:

Is simulating easier than calculating?

To program,  yes. Computationally,  probably not. It was the simplest way I could think of to cover every  possible combination of dice and abilities. 

Share this post


Link to post
Share on other sites
On 4/10/2018 at 6:37 PM, Qark said:

Hi everyone. I have written a probability calculator for legion using C#

You put in the attacking and defending unit info, then the program simulates the attack steps thousands of times to determine the probability of each outcome. It will output the probability of each number of hits, the probability of getting at least a number of hits, the average, the median, the mode, and the standard deviation.

The code is available on GitHub:

https://github.com/andrew-s-hart/SW-Legion-Probability-Calculator

or if you don't care about the code and just want to run the exe you can get that here:

https://github.com/andrew-s-hart/SW-Legion-Probability-Calculator/raw/master/LegionCalculator.exe

I am using 64bit windows 10 and haven't tested the program on anything else. I am not a professional programmer and haven't used GitHub before so any suggestions are welcome.

 

Untitled.png

Any chance of an update for danger sense? Love the tool (so does discord!)

Share this post


Link to post
Share on other sites
4 hours ago, DwightE1 said:

Any chance of an update for danger sense? Love the tool (so does discord!)

Yeah I can do that. Should also put in Armour X. Any thing else I have missed? It'll take a few days. I had no idea anyone was actually still using this thing.

Edited by Qark

Share this post


Link to post
Share on other sites
1 hour ago, Qark said:

Yeah I can do that. Should also put in Armour X. Any thing else I have missed? It'll take a few days. I had no idea anyone was actually still using this thing.

Phht! At least once after every game to see if my stupid decision was the right move!  Someone did a huge breakdown on the discord today with pathfinders vs everything. 

Share this post


Link to post
Share on other sites
14 hours ago, Qark said:

Yeah I can do that. Should also put in Armour X. Any thing else I have missed? It'll take a few days. I had no idea anyone was actually still using this thing.

uncanny luck i think is the only other thing [for han]

 

Edited by Matt3412

Share this post


Link to post
Share on other sites
On 2/19/2019 at 6:05 AM, DwightE1 said:

Any chance of an update for danger sense? Love the tool (so does discord!)

I think all the new things are working. Didn't get much of a chance to test so if you notice something wrong let me know. Links above should still work.

Share this post


Link to post
Share on other sites

Above links updated with a few changes.

  • Max damage now at 25 to account for Fire Support
  • Surge tokens included
  • Critical keyword included
  • Shield tokens included
  • Changed layout slightly

Links above should still work but here is the .exe link again just in case: https://github.com/andrew-s-hart/SW-Legion-Probability-Calculator/raw/master/LegionCalculator.exe

If I have missed any new keywords or you find a bug let me know!

Share this post


Link to post
Share on other sites
7 hours ago, XR8rGREAT said:

doesn't this sap all the excitement from the game if you know what is going to happen most if not all the time?

No, because dice will be random. Red dice will fail. However this does give you good stats to base a strategy or a tactic on. I started mine because i wanted to know if mathematically 1 red and 3 white attack dice is better or worse than 2 red. Now I know in practice the white dice will fail me every time. At least that's what i think. But as it turns out they are actually better. So now I can base my choice on math instead of gut feeling. However in practice they will indeed fail me every time

Edited by sigidi

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...