I'm developing a basic baseball application where I'm going to match a pitcher vs. a hitter and the only answer I want to know is if the result of the matchup is a hit, a walk, a strikeout or a fly out/ground out. Basically I want to take the sum of the pitchers attributes, compare it to the sum of the hitters attributes and establish a probability of a hit, walk, etc occurring.
i.e. in a very basic sense if the sum of the pitchers attributes is 90 and the sum of the hitters attributes is 80 I want to give the hitter a 25% chance of getting a HIT and a 75% chance of making an OUT.
Is this possible with PHP?
I have a few books on PHP but none cover this type of thing.
Probabilities in PHP
Moderator: General Moderators
Re: Probabilities in PHP
It's just maths, so yeah, it's entirely possible with PHP.