Friday, November 19, 2010

Reviews About Dr Arvind Poswal

Algorithms and boxer

The algorithm
in the previous post was very interesting and I wanted to find an application.

Parts of this color are curious then you can skip them.

I simulated a boxing championship which will be played in random encounters between boxer. You can also imagine the chess players who take a fight if you prefer to leave a link with the algorithm in the previous post ELO .

Each boxer has four characteristics: strength, stamina, endurance, speed.
  • force (F) determines the strength of the blows inflicted.
  • stamina (S) is the energy available.
  • resistance (R): determines what fraction of a stroke suffered is recessed.
  • speed (V) is the frequency with which hits the opponent.
Moreover, for each boxer must hold F + S + R + V = M, where M is a fixed number that indicates the amount of skill, that is, every boxer decides how to distribute the number of M points in his ability (those familiar with various oblivion, sims, so this should have the methodology).

The algorithm of a match between two boxers is simple. For every shot you

S1-S1 = F2 * (M-R1) / M (Equation 1)

that a boxer's stamina has decreased by a score of the strength of the opponent's resistance multiplied by the fraction of a boxer.
The expression (M-R1) / M is done in order to have the strength that grows with the growth of M1. I two limiting cases to clarify. If a boxer has chosen R1 = 0 I do not expect any resistance to impact, in fact the equation for R1 = 0 (1) becomes S1 = S1-F2, or F2 is completely encased. However, for R1 = M I expect a very efficient resistance, in fact the equation for R1 = M (1) becomes S1 = S1-0, or the S1 does not decrease.
For the other boxer you like

S2 = S2-F1 * (M-R2) / M. (Equation 1a)

continue with the algorithm. The probability (Percentage) that a boxer has to strike an opponent is given by

P = V1 / (V1 + V2) * 100 (Equation 2)

ie faster you're more likely to hit first.
Again, if V1 = 0, the probability goes to zero and then equation (2) becomes P = 0, V1 = V2 if the probability is 50% P = 50 and then, finally, if V1 and V2 = 0 nonzero we have that P = 100. In terms of the classical test program is heuristic, or a boxer hits the first, if RAND (0,100) is less than P, where RAND (0,100) is a random number between 0 and 100, otherwise it is the second boxer to strike first. This is repeated

as long as the stamina of a boxer is negative (S <0). Facts & Figures practical
The total number of meetings is N * 100 where N is the number of participants.
Each boxer has 12 points, and each feature must have at least one value.
Each boxer also has an algorithm for the initial score of ELO 1500, and K = 16 (see previous post).
It gives a zero point to who wins and who loses, and there is no balance.
The bunting is available in the algorithm S * 100 in order to make the meetings last more than one punch.
The stamina is reset at each encounter (in the sense that the next meeting returns to the initial one).

And now the question :
selecting the N * 100 meetings in a casual way, in your opinion, what is the boxer who has a better chance of winning the tournament?
Or even, who is certainly one that will win?
one with (F, S, R, V) = (3,3,3,3)? Or a very strong (9,1,1,1)? and why not the fastest (1,1,1,9)?

To answer this question, I have made a very simple genetic algorithm, but I leave it to the next post in anticipation of your ideas on the winner. A practical example

with (F, S, R, V) are the random-generated here.

Congratulations to those who came to the end of the post without dying of boredom.

good weekend!

0 comments:

Post a Comment