Mathhammer & Stathammer tool

Discuss tactical and strategic development for 40K/Tau.
User avatar
n1md4
Shas'La
Shas'La
Posts: 159

Re: Mathhammer & Stathammer tool

Post#37 » Feb 14 2014 06:57

Would a Linux version be possible?
This is a sad day for the nobel profession of otter milking -- Knives
Onmyou's Motivation Service

User avatar
Kael'yn
Fio'Ui
Fio'Ui
Posts: 1092

Re: Mathhammer & Stathammer tool

Post#38 » Feb 15 2014 12:45

@n1md4

Since the tool is made in Python with wxWidgets, both available on MacOS and Linux (Python script language is already included in most MacOS and Linux builds), it is easy to release for these platforms too.
I've made an executable file from the script for the ease of use for windows users (python needs to be installed on Windows).
But if anyone has Python and wxWidgets on Windows, the executable is not needed.

I will release the naked scripts when I will be sure of the portability of the tool (some specific controls and tweaks are not tested at this time for these platforms, since finishing the core code is my priority)
PM me if you are ready to run the scripts on an untested platform (scripts cannot launch maybe)...

User avatar
Kael'yn
Fio'Ui
Fio'Ui
Posts: 1092

Re: Mathhammer & Stathammer tool

Post#39 » Mar 27 2014 02:45

New alpha version (Still in the work, some features missing, some are buggy)
Stat tool:
Image

Database editor:
Image

Included so far:
- statistics for gunners shooting at toughness/armored targets with multiple weapons (the main tool).
- edit and expand database with your own units.

Bonus tools:
- template deviation estimator
- generic statistics tool

Missing/buggy features:
- some special rules
- adding units to database from the stat tool
- editing unit stats in the roster
- loading/saving roster
- export to html/bbcode/image
- select the feature you want on the result view
- translation

Comments are welcome to improve UI, correct rule/compute errors, reporting bugs (I am aware of most but maybe some escaped).

Here the link to the file:
http://www.mediafire.com/download/p6qni7f1xg79w1d/StatPy_alpha002.zip
Extract and run "StatPy.exe"

No viruses may be in the file (I am sure of my code, if they are any, it's maybe came from exe compiler (I use cx_freeze)). Report if you've got a false positive.
Sources will be released when I will put the tool in beta version for wide testing and bugfixes.

User avatar
jade_angel
Shas
Posts: 185

Re: Mathhammer & Stathammer tool

Post#40 » Apr 10 2014 10:40

A feature I didn't see - is there a way in the spreadsheet to account for weapons that cause ID, like Eldar Wraithcannons?

User avatar
Kael'yn
Fio'Ui
Fio'Ui
Posts: 1092

Re: Mathhammer & Stathammer tool

Post#41 » Apr 10 2014 11:34

Distort (works like Rending: need a 6 to wound) is hard to implement on the spreadsheet (due to the overall method it employs).
It works well with rolls modifiers, not modifiers on roll results.
My tool was made when my opponents were IG, SM, Orks, Nids and Crons. Not Eldars (so no distort nor holofield rule).

I am working on the executable tool to take into account Rending. When it will works, the Distort rule can be taken into account in the same way.
I managed in my current version (not released) to take into account Tesla rule, and dice value for shots, S and AP (quite a pain) for stat analysis by dedicating a specific process for them
(a D6 shots on a D6 strenght , D6 AP weapon need to take into account the 6*6*6=216 possibilities of stats but I finally having some results !)

Thanks to make me aware of this kind of rule you want to be implemented.

User avatar
Kael'yn
Fio'Ui
Fio'Ui
Posts: 1092

Re: Mathhammer & Stathammer tool

Post#42 » May 04 2014 07:34

New alpha version 3 (minor improves: the most important are the full save/load and roster edition)
http://www.mediafire.com/download/q7ocrvvmbu8539h/StatPy_alpha003.zip

Most of the basic features works now:
Common
- App translation (set in the config.ini): I give the french partial translation as a sample

Roster tool
- adding and modify targets/gunners/weapons
- copy/paste a roster item
- loading/saving roster to files

Database editor
- full edit of the database (only Armies,Specials,Targets,Gunners and Weapons are used, the other are test I have build), even unsafe ones (if option is checked)

I am working on redoing the dice rolls process to include D6 stats for Shots, S and AP, adding the Tesla/Rending/Distort/... USR.
Since it takes a very different way to implement all, I kept the old roll process in this release.
I hope to include the new process in the next alpha, along with Titans damage management.

User avatar
Lyi'ot
Por'O
Por'O
Posts: 2730

Re: Mathhammer & Stathammer tool

Post#43 » Jul 22 2014 03:49

I saw one of your most recent posts, where you talked about plugging some numbers into your "stathammer program." That made me seek out this thread and post my congratulations -- I'm so excited for this project! I haven't had a chance to try the alpha, but I wanted to extend my thanks for your work on this project.

User avatar
Kael'yn
Fio'Ui
Fio'Ui
Posts: 1092

Re: Mathhammer & Stathammer tool

Post#44 » Jul 22 2014 04:09

Thanks

I have very little time to fully dive into code on these days (home moving, new students and school in september, ...).

And I have other ideas about the tool that need maybe deep modifications. So much to do...

I hope having some rest in late August to release a better polished version with v7 changes (vehicles tables)

User avatar
Kael'yn
Fio'Ui
Fio'Ui
Posts: 1092

Re: Mathhammer & Stathammer tool

Post#45 » Jan 18 2016 12:11

In answer to some people joking on my (old) signature (which is a math joke) there http://www.advancedtautactica.com/viewtopic.php?f=52&t=24229
Get a 6 with six dice?
Mathhammer: 100%
Stathammer: 67%


What I said is that when you do Mathhammer, a wrong way is to add individual success to get the global success and so may get erroneous result from wrong assumptions:

Basic: Probability to have a "6" result on one die = 1/6 = 0.1666_=17%

A wrong Mathhammer view will be: So when you have 6 dice, you have a probability to have a "6" by summing six probabilities results so 6x1/6=6x0.1666_=1=100% (and believe that throwing 6 dies you have a 100% probability to get a "6"). Probabilites does not works like that.

The good Mathhammer view (I tend to call it Stathammer) is to check the combination of all the dice results to get the probability of having (at least) one "6" on a die : binomial law with at least 1 success, 6 tries and 16.7% of chance, so 1-(5/6)6 = 0.665 = 67% (individually you have 40% to have one "6", 20% for two, 5% for three, 1% for four, ...)
If you then summarize the individual values with their chances: 1x.40 + 2x.20 + 3x.05 + 4x.01 + ... = 1, the value "simple" Mathhammer gives but that may be misinterpreted as explained before.

EDIT:
Oh, and work on the tool (and other 40k works) has been frozen due to IRL duties, butI have ideas to put that need to redefine the entire tool.
Maybe I will release the current version, polished, first (without tesla, intricated rerolls, ...) if I get time to clean it.

User avatar
Peregrim
Shas'La
Shas'La
Posts: 145

Re: Mathhammer & Stathammer tool

Post#46 » Jan 18 2016 01:29

Mathhammer is based on expected value rather than probability. The idea is you take the number of trials and multiply by the probability of success, and that tells you that the expected number of successes (in your example you expect one 6, but this does not mean that the probability of rolling a 6 is one). It's useful because it's simple to calculate even with mental arithmetic, whereas probabilities can often become quite complex.

User avatar
boomwolf
Shas'La
Shas'La
Posts: 1755

Re: Mathhammer & Stathammer tool

Post#47 » Jan 18 2016 04:29

Yep, you got a slightly flawed understanding of what mathhammer is.

Mathhammer says that getting a six in 6 dice, you'll probably get 1 six, not that you are 100% going to get one.

Now, its has limitations-for example small dice number (such as mere six rolls) tend to throw it off curve, but for higher number of rolls, its far more efficient.


You don't calculate the odds of doing something in mathhammer, you calculate what is likely to happen, so for example it tells you 8 "bolter boys" in rapid range will do an estimate of 0.66*0.5*0.33*16=1.77 wounds to other marines. you don't have fraction wounds in the game, but this give you an indication-one kill is rather likely, two is possible, three or none will be an anomaly.

User avatar
Peregrim
Shas'La
Shas'La
Posts: 145

Re: Mathhammer & Stathammer tool

Post#48 » Jan 18 2016 05:22

They're useful for different sorts of analysis too. Want to compare the how efficiently two units will deal wounds to a target? Mathhammer is your tool - points cost divided by average wounds dealt is a simple and effective way to compare Shooting efficiency. Want to know how reliably a marker unit will be able to provide Ignores Cover against an enemy target? You should use Stathammer for that - the probability of landing at least two markerlights will be more informative than the average number of markerlight hits.

Of the two, Mathhammer is more often used incorrectly - probably because anyone who can do Stathammer knows how to do Mathhammer, but you don't need to know how to calculate probabilities for Stathammer in order to do Mathhammer.

User avatar
Kael'yn
Fio'Ui
Fio'Ui
Posts: 1092

Re: Mathhammer & Stathammer tool

Post#49 » Jan 19 2016 12:08

Peregrim wrote:Want to compare the how efficiently two units will deal wounds to a target? Mathhammer is your tool - points cost divided by average wounds dealt is a simple and effective way to compare Shooting efficiency.


Problem is just checking the points per wounds or the average wounds can hide more efficient results hidden in statistics.
That discovery in rolling Mathhammer values was why I put my math hat and explore more deeper the Stathammer level.

Example: (exagerated values, but it's for the sake of explanation)
You shoot at a 5-men unit.
"A" has 4 average wounds , 5 shots, with 99% to deal >= 3 wounds, 50% to deal >= 4, 1% to deal >= 5
"B" has 3.5 average wounds , 20 shots, with 70% to deal >=2 wounds, 60% to deal >=3, 40% to deal >=4 (close to 50% of "A"), 30% to deal >=5
Which one you may want to choose:
"A" that can wipe out the opponent 1% of time but deals more average wounds ?
"B" that can wipe out 30% of time with lesser average wounds and more chance to not kill entirely the target ?
So:
"A" is sure to shoot twice to wipe out the target, but will maybe never kill it in one turn.
"B" already know that it will need most of time to shoot twice, but has more chance to wipe out in one turn.

Your choice is then based on what you have in your army that can handle the single remaining wound when "A" fires. Or if you don't care to shoot "A" twice.
Or If you want units that evolve less supported by other units and can afford two rounds of firing.
My tool provides the chance of wiping out or taking morale check to help with that.

Notes:
- Of course, when average wounds are equal, the unit that to shoot more has a clearer advantage, but when average is not equal, things get blurred
- I use an example of average wounds, but it is a same explanation for points per wounds.

Stathammer is not a magical "Win" button, just a way to choose better which unit fits a particular situation.

Peregrim wrote:Of the two, Mathhammer is more often used incorrectly - probably because anyone who can do Stathammer knows how to do Mathhammer, but you don't need to know how to calculate probabilities for Stathammer in order to do Mathhammer.

That's truely true. I wouldn't find a better way to tell it. :roll:

User avatar
boomwolf
Shas'La
Shas'La
Posts: 1755

Re: Mathhammer & Stathammer tool

Post#50 » Jan 19 2016 03:56

Without running any calculations and going by pure intuition, I'm pretty sure the example you gave is an impossible scenario outside the realm of "hail merry" attempts where the success percentage is too low to be a viable stratagy, or scenarios where special rule triggers are relevant-and then the entire math changes. (such as tank damage, rending attacks, weapons with variable strength values, etc.)

Return to “Tau Tactics”

Who is online

Users browsing this forum: No registered users and 2 guests