Switch Theme:

MathHammer Results  [RSS] Share on facebook Share on Twitter Submit to Reddit
»
Author Message
Advert


Forum adverts like this one are shown to any user who is not logged in. Join us by filling out a tiny 3 field form and you will get your own, free, dakka user account which gives a good range of benefits to you:
  • No adverts like this in the forums anymore.
  • Times and dates in your local timezone.
  • Full tracking of what you have read so you can skip to your first unread post, easily see what has changed since you last logged in, and easily see what is new at a glance.
  • Email notifications for threads you want to watch closely.
  • Being a part of the oldest wargaming community on the net.
If you are already a member then feel free to login now.




Made in us
Dark Angels Librarian with Book of Secrets






Connecticut

I wrote a program that runs 100,000 shots from various weapons vs. various armor types.

* Edit : You can access this at http://uma-musado.com/cgi-bin/mathHammer.cgi

This message was edited 2 times. Last update was at 2010/06/29 22:21:50


 
   
Made in us
Blood Angel Terminator with Lightning Claws




Montgomery, AL

Double post.

This message was edited 1 time. Last update was at 2010/06/24 17:30:44


On Dakka he was Eldanar. In our area, he was Lee. R.I.P., Lee Guthrie.  
   
Made in us
Blood Angel Terminator with Lightning Claws




Montgomery, AL

Why did the Pulse laser
Times fired : 100000
Total Shots : 194422

Should it not have been total shots :200000

Just wondering

On Dakka he was Eldanar. In our area, he was Lee. R.I.P., Lee Guthrie.  
   
Made in us
Dark Angels Librarian with Book of Secrets






Connecticut

jbunny wrote:Why did the Pulse laser
Times fired : 100000
Total Shots : 194422

Should it not have been total shots :200000

Just wondering
If the pulse laser destroyed its target on the 1st shot, the 2nd shot is not fired.
That is done to prevent overkill from skewing the numbers and showing more deaths than it should. Imagine if both shots from the pulse laser destroyed the target, you would only want to count one kill. Not rolling the 2nd shot duplicates this effect
That is why multi-shot weapons roll less dice than one would think at first.

This message was edited 2 times. Last update was at 2010/06/24 17:31:09


 
   
Made in us
Blood Angel Terminator with Lightning Claws




Montgomery, AL

Alright i was just confused when I first saw it.

On Dakka he was Eldanar. In our area, he was Lee. R.I.P., Lee Guthrie.  
   
Made in us
Sure Space Wolves Land Raider Pilot






I am very interested to see how weapons stack up against living metal. Only suggestion I can make is the final numbers output should be to adjust percentages to an easier to read number. Remembering how many decimal places to move is difficult on occassion. But good work here as I see it.

Sleep is for the weak, the dead, and the simple minded. One day I will be strong!
2000 pts-ish Space Wolves 
   
Made in us
Blood Angel Terminator with Lightning Claws




Montgomery, AL

Living metal only effects Melta's at half range, Bright Lances, and Assault cannons. All other weapons are uneffected.

Bright lances and Melta's would be treated as a Missle launcher for results (with the +1 to damage result exception for the AP1)

On Dakka he was Eldanar. In our area, he was Lee. R.I.P., Lee Guthrie.  
   
Made in us
Frothing Warhound of Chaos




Utah

How come damage results 5 & 6 happen less than 4 & 5?

Shouldn't they be equal?

2000
3000
2000  
   
Made in us
Decrepit Dakkanaut





Vallejo, CA

Furthermore, the computer program is flawed in that when you entered in BS3 at the beginning, it hit as if the shooter was BS4.

I'm a little curious as to why this is necessary. The math can be done without a finite number of individual trials. I don't really see what's being gained.

Your one-stop website for batreps, articles, and assorted goodies about the men of Folera: Foleran First Imperial Archives. Read Dakka's favorite narrative battle report series The Hand of the King. Also, check out my commission work, and my terrain.

Abstract Principles of 40k: Why game imbalance and list tailoring is good, and why tournaments are an absurd farce.

Read "The Geomides Affair", now on sale! No bolter porn. Not another inquisitor story. A book written by a dakkanought for dakkanoughts!
 
   
Made in us
Dark Angels Librarian with Book of Secrets






Connecticut

bonekrusher wrote:How come damage results 5 & 6 happen less than 4 & 5?
There will be more results for 1-4, save for melta weapons. That is because glances do 1-4 on the chart.

Ailaros wrote:Furthermore, the computer program is flawed in that when you entered in BS3 at the beginning, it hit as if the shooter was BS4.
I know there is a lot of data there, check again. You will find the time the shooter was hitting closer to BS 4 was when they were using a twin-linked gun. What I find odd is that I always thought a twin linked gun at BS 3 gave a 75% average hit roll, but for some reason its less.

Ailaros wrote:The math can be done without a finite number of individual trials. I don't really see what's being gained.
To test multiple scenarios without needing to run new math. Once you have built an engine that lets you run tests, you can just plug in any numbers you like and get the results. Once you have an engine built you can expand it to test squad vs. squad results.
   
Made in us
Slaanesh Havoc with Blastmaster



Orklando

But you can create a spreasheet to calculate the exact percentages, so you can also create a modifyable program to also calculate the exact percentages.

Furthermore, if you do that, you can also calculate the exact percentage to Wreck a vehicle no matter what the results are (i.e. taking into account cumulative Damaged results.) Perhaps a configurable number of times you are allowed to shoot at the same vehicle and have the Damaged results still stack.
   
Made in us
Been Around the Block




Hooray for the Law of Large Numbers!

Not a bad beginner's programming exercise, though, since you can validate the results against the Mathhammer [or vice versa].

LMoE
   
Made in us
Horrific Horror





labmouse42 wrote:What I find odd is that I always thought a twin linked gun at BS 3 gave a 75% average hit roll, but for some reason its less.

It is precisely 75%. BS3 means you hit 50% of the time. Re-rolling misses, you hit on 50% of the remaining 50% (50% of 50% being 25%). You therefore hit 75% of the time with TL BS3. So the program is faulty - my guess is that it may be calculating the rerolls using a different BS (a BS 3 original shot with a BS 2 reroll would give your results).
Alternatively, it may not be rerolling all of the misses.

This message was edited 1 time. Last update was at 2010/06/25 00:47:04


wins: 9 trillion losses: 2 ties: 3.14 
   
Made in us
Preacher of the Emperor




Boston, MA

DaveL wrote:
labmouse42 wrote:What I find odd is that I always thought a twin linked gun at BS 3 gave a 75% average hit roll, but for some reason its less.

It is precisely 75%. BS3 means you hit 50% of the time. Re-rolling misses, you hit on 50% of the remaining 50% (50% of 50% being 25%). You therefore hit 75% of the time with TL BS3. So the program is faulty - my guess is that it may be calculating the rerolls using a different BS (a BS 3 original shot with a BS 2 reroll would give your results).
Alternatively, it may not be rerolling all of the misses.


It is 75% chance to hit total for the weapon per shot but it is really two independent 50% chances that average to a 75% total. Labmouse' results look off because it is not rerolling if the shot hit on the first attempt. For example, if the computer rolls a 4, 5, or 6 on the first attempt the reroll does not occur. The program itself is accurate.
   
Made in us
Horrific Horror





PanzerLeader wrote:
DaveL wrote:
labmouse42 wrote:What I find odd is that I always thought a twin linked gun at BS 3 gave a 75% average hit roll, but for some reason its less.

It is precisely 75%. BS3 means you hit 50% of the time. Re-rolling misses, you hit on 50% of the remaining 50% (50% of 50% being 25%). You therefore hit 75% of the time with TL BS3. So the program is faulty - my guess is that it may be calculating the rerolls using a different BS (a BS 3 original shot with a BS 2 reroll would give your results).
Alternatively, it may not be rerolling all of the misses.


It is 75% chance to hit total for the weapon per shot but it is really two independent 50% chances that average to a 75% total. Labmouse' results look off because it is not rerolling if the shot hit on the first attempt. For example, if the computer rolls a 4, 5, or 6 on the first attempt the reroll does not occur. The program itself is accurate.

Sorry, no. The way you're saying it should work gives a 75% chance of hitting in the end. I'll go into detail, and list each first roll hit with a "reroll" so that it adds up more easily for the kind of math you were trying to do. (Note, of course, that the actual value of the reroll doesn't matter if the first roll was a hit.)

First roll: Reroll: Hit?
1 1 N
1 2 N
1 3 N
1 4 Y
1 5 Y
1 6 Y

2 1 N
2 2 N
2 3 N
2 4 Y
2 5 Y
2 6 Y

3 1 N
3 2 N
3 3 N
3 4 Y
3 5 Y
3 6 Y

4 1 Y
4 2 Y
4 3 Y
4 4 Y
4 5 Y
4 6 Y

5 1 Y
5 2 Y
5 3 Y
5 4 Y
5 5 Y
5 6 Y

6 1 Y
6 2 Y
6 3 Y
6 4 Y
6 5 Y
6 6 Y

Number of hits: 3+3+3+6+6+6=27
Number of total possibilities: 6+6+6+6+6+6=36
27/36=.75 (75%)


Automatically Appended Next Post:
Rereading his post, though, I suspect that the actual problem with the program may be that he has the rerolls set up as if the firer had the default BS (4) instead of by misses, meaning that only 2/3 of the misses actually got rerolled.

This message was edited 1 time. Last update was at 2010/06/29 16:40:51


wins: 9 trillion losses: 2 ties: 3.14 
   
Made in us
Dark Angels Librarian with Book of Secrets






Connecticut

DaveL wrote:Sorry, no. The way you're saying it should work gives a 75% chance of hitting in the end. I'll go into detail, and list each first roll hit with a "reroll" so that it adds up more easily for the kind of math you were trying to do. (Note, of course, that the actual value of the reroll doesn't matter if the first roll was a hit.)
DaveL is correct. BS 3 twin linked has a 75% of hitting.
In the program, this was being used to determine a reroll. if (($hitRoll > $neededRoll) && ($twinLinked)) { -- Reroll -- }.
The > should have been a >=

This has been corrected as shown in this thread
http://www.dakkadakka.com/dakkaforum/posts/list/302069.page

Or you can access the web version of this program directly
http://www.uma-musado.com/cgi-bin/mathHammer.cgi
   
Made in us
Homicidal Veteran Blood Angel Assault Marine





Sharjah

Just wanted to say that I love this. Yes, you can in theory set up an Excel spreadsheet to do these calculations exactly, but due to the Law of Large Numbers the results will be almost identical. In fact, if you want greater precision, just increase the number of draws. This sort of procedure (called a Monte Carlo) gets used a lot in fields like Economics and Finance because it is often much easier to set up a simulation than, for example, calculate a probability because the exact calculation will require an integral, which may not have a closed form solution anyway.

Labmouse, if you were to add the ability to specify infantry targets as well as more than one weapon shooting (ie allow the comparison of 5 Fire Dragons to 5 Dark Reapers), this would be the only Mathhammer tool I think anyone would need.
   
Made in us
Sure Space Wolves Land Raider Pilot






I hereby 2nd the greatness of the tool. And, am anxious for the infantry page to be up and running, oh and gauss weapons, for us lowly necron players around here. Thanks!

This message was edited 1 time. Last update was at 2010/06/29 20:19:56


Sleep is for the weak, the dead, and the simple minded. One day I will be strong!
2000 pts-ish Space Wolves 
   
Made in us
Sybarite Swinging an Agonizer






Can you please fix your percentages? I don't like looking at 10,000 shots fired and seeing that 7000% of those shots we're Shaken results. That makes no sense to me.


Playing chess doesn't require skill, it just requires you to be good at chess...

...that would be a skill 
   
 
Forum Index » 40K General Discussion
Go to: