PDA

View Full Version : Close Please.



WrstDmEvr
2007-11-10, 08:38 PM
Close please, thread pointless.

MCerberus
2007-11-10, 09:27 PM
Hmm.. if you don't mind me attempting to break it (I am a CS major so I know that breaking it is the best way to get something fixed).

Attacker Bonus: +30
2nd Attacker Bonus: +0
Target AC: 25
Number of Hits: 100000

How much more likely (%) Will attacker 1 hit compared to attacker 2?


If it works the result should be 90% because attacker 1 will always have a 5% miss chance and attacker 2 will always have a 5% hit chance.

WrstDmEvr
2007-11-10, 09:29 PM
yeah. forgot to put in the natural one :smallfurious:

EDIT: just added it. 95% chance for first, 4.3 for second.

I feel strangely confident.

EDIT#2: confirmed with a second test of 1 million hits

MCerberus
2007-11-10, 09:30 PM
yeah. forgot to put in the natural one :smallfurious:

well that isn't too hard to fix if you're using a recursive method it's another base case and another if/switch if you're iterative.

WrstDmEvr
2007-11-10, 09:35 PM
actually, i use QBasic. i just added a clause that deleted one hit opportunity when the result was a natural one.

MCerberus
2007-11-10, 09:38 PM
Hmmm that should be a 5% for the second one (natural 20)

WrstDmEvr
2007-11-10, 10:05 PM
well yes. I'm trying to figure that out as well.

EDIT: it will work if you round up. just want to put that in.

EDIT#2: they are stabilized as well. just did a 10 million test, same ratios.

OneWinged4ngel
2007-11-10, 11:12 PM
...Wow, what is the point of this?

It takes grade school math to figure out hit percentages, and it definitely doesn't take a million trials to determine it. On top of that, we have to actually submit data to a person to get back belated results. And as if that weren't bad enough, you even warned that errors can be expected.

So... this uses an overtly overcomplicated algorithm (as a programmer, I can tell you that that's seen as a very *bad* thing for a programmer to do) to accomplish an overtly simplistic problem (you don't need a calculator for grade school math with small numbers, and even if you did you could use the world's cheapest pocket calculator) and... it has errors.

Also, I've been an amateur programmer since I was ten, and I've never created a program that did grade school math that made an ERROR arriving at the answer of a problem that required grade school math. Seriously. That's really, really horrible. If you can't make a program do grade school math (most programming languages will let you do that just by typing in the equation) then I don't even know how you get to call yourself a programmer, amateur or not. We're talking about a zero effort program that takes 30 seconds to write.

Soniku
2007-11-10, 11:18 PM
I'm afraid I have to agree.

To get the percentage chance of a hit, simply take the total attack bonus from the AC and multiply the remaining number by five, minimum final result being 5 and maximum being 95.

MCerberus
2007-11-10, 11:33 PM
It's a DnD themed learning project. The first website someone made wasn't something that people would consider "professional" is it? My first C program only printed stuff towards screens. The point is to take that grade school math and make a computer do it so he knows how to make it happen, not to make a useful end program.

OneWinged4ngel
2007-11-10, 11:34 PM
It's a DnD themed learning project. The first website someone made wasn't something that people would consider "professional" is it? My first C program only printed stuff towards screens. The point is to take that grade school math and make a computer do it so he knows how to make it happen, not to make a useful end program.

Then why waste OUR time by talking about it on GiantITP? Go on a forum that teaches people to use C! And don't PRESENT the post as if you're TRYING to offer a useful end program to the community (which was exactly what he did).

If you are correct about motives, this doesn't belong in this forum. This is practically spam, and should promptly be reported to the moderators.

WrstDmEvr
2007-11-11, 09:55 AM
...Wow, what is the point of this?

It takes grade school math to figure out hit percentages, and it definitely doesn't take a million trials to determine it. On top of that, we have to actually submit data to a person to get back belated results. And as if that weren't bad enough, you even warned that errors can be expected.

So... this uses an overtly overcomplicated algorithm (as a programmer, I can tell you that that's seen as a very *bad* thing for a programmer to do) to accomplish an overtly simplistic problem (you don't need a calculator for grade school math with small numbers, and even if you did you could use the world's cheapest pocket calculator) and... it has errors.

Also, I've been an amateur programmer since I was ten, and I've never created a program that did grade school math that made an ERROR arriving at the answer of a problem that required grade school math. Seriously. That's really, really horrible. If you can't make a program do grade school math (most programming languages will let you do that just by typing in the equation) then I don't even know how you get to call yourself a programmer, amateur or not. We're talking about a zero effort program that takes 30 seconds to write.

You're right about most of this.

Yes, it uses grade school math
Yes, it doesn't require a calculator to do this
Yes, there might be errors.
Yes, it probably is overcomplicated. I did say I was an amatuer.
However,
This calculator is more efficient faster.

Lets say the average person can find the percentage of both attackers and the ratio of hitting in 5 seconds.

It takes me around 3 seconds to type something in. Then 1/2 of a second for the answer to come up on a screen. It's faster for finding out the averages for a single person.

I'm posting this here because some people want to do other things instead of figuring out percentages. If they want to do it themselves, good for them. I fail to see any problem with this.


Also, nobody made you answer. You didn't have to "waste" your time on this if you didn't think it was good.

If fact, you appear to keep on posting and "wasting" your own time on this.

KillianHawkeye
2007-11-11, 10:22 AM
I think he was just saying that it was pointless. Anyone can look and see "If my attack bonus is +5 and his AC is 12, then I need to roll a 7 or higher to hit. On a d20 there are 14 numbers equal to or greater than 7 (7, 8, 9, and 10, plus 10 more is 14), so there is a 14 * 5% = 70% chance of hitting."

Anyone who can't do this in their head should just stick to board games. And like OneWinged4ngel said, if this is about you learning how to do programming, this is not the right place for getting help or showing off.

And your first post DID seem like it was offering a utility for people to use. I actually reread the post TWICE looking for the link to the program and was confused when I realized there wasn't one. If you wanted help testing your program, you should have said so more clearly, but again this is not the proper forum for such activities.

Also, saving 1.5 seconds of time is pretty insignificant for some information that you'll never actually NEED for anything, ever.

WrstDmEvr
2007-11-11, 12:03 PM
Point taken.

This is pointless now, though. It's just going to degenerate into a discussion of if it is good/bad etc. I'll just close it.