Calculating % chance to win against something.

Basically i want to enter in certain values (in my case k/d ratio, and accuracy are 2 examples) for player a and player b. The values entered for player a will determine the chance he has to win against player b. Then it would run 100 times to test. How should i go about doing this? What im trying not to do is to create a value and if player a's value > player b's, then player a will always win.
Anyone?
Let's say you have four variables: a number of kills and a number of deaths for each player. We'll call them k1, d1, k2, and d2.

From player 1's perspective, the number of times they win includes the number of times the other player loses. Let w1 be k1 + d2. Similarly, let w2 be k2 + d1.

Then, you have a ratio of w1 to w2 - simple math.
this isn't what im talking about, i understand how to program simple math into c++, im trying to create something that finds probability based on detailed statistics.
It very much depends on the game - what does accuracy mean?
i have a feeling that this will be way too complicated and almost impossible to create :\

there are 2 variables for accuracy:
1.) how many shots a player hits (usually something low like 16-20%)
2.) headshot % (usually greater than 45% for most of the stats i have so far.)
It's not going to be impossible, it will just be really annoying to fine-tune the formulas so that the numbers are reasonable. The more variables you add, the harder it is to conceptualize what the end result actually means. It is better to simply show the players all the info instead of trying to sum it up in a way they won't understand.
Again, i'm creating this to figure out a probability more than anything. say this team with players that have these stats play this team with players that have different stats. now lets say someone says "i predict team a will win because this and this". im trying to create a program to run through a game 100 times to predict a probability based on the overall skill of a team with 5 players.
i believe the only way for something like this to work is to create some sort of artificial intelligence, but that is beyond my understanding.
No, the math is still trivial, it's just that you can only represent so much with a number. If the chance of me winning is 47.93%, does that mean they're a good shot? Do they miss a lot but are really good at dodging? The number is meaningless to an end-user.
Okay, but what if 2 people are shooting at you at once? 3 people? 4 people? etc.

Some kind of algorithm or ai is needed to determine if teamates can and will help during a specific gunfight.
You could let players rate the fairness of other players. The issue is that you seem to have a specific case in mind but you're asking for a general solution - there is no general solution.
Topic archived. No new replies allowed.