- Fight results are calculated per round
- Variables to account for (f1 is fighter 1, f2 is fighter 2), named different in program
- x1, x2 -> KO chance for f1 & f2
- y1, y2 -> SUB chance for f1 & f2
- z1, z2 -> round win chance for f1 & f2
- 100% = (x1 + x2) + (y1 + y2) + (z1 + z2)
- w is a random num 1 - 100 | the value of w determines the result of the round. It can be thought of on a number line 1-100
- EXAMPLE: 50/50 chance for either fighter to win (x1 + y1 + z1 = 50%)
- x1 = 2%, x2 = 4%
- y1 = 4%, y2 = 5%
- z1 = 44%, z2 = 41%
- number line for w -> x1 = [1, 2] | x2 = [3, 6] | y1 = [7, 10] | y2 = [11, 15] | z1 = [16, 59] | z2 = [60, 100]
- if w = 16 for R1, f1 wins R1 because it falls in the range of z1
- if w = 1 for R2, f1 wins by R2 KO because w falls in range of x1
- Example 25/75 chance of win favoring f2 (x2 + y2 + z2 = 75%)
- x1 = 5%, x2 = 10%
- y1 = 5%, y2 = 10%
- z1 = 15%, z2 = 55%
- number line for w -> x1 = [1, 5] | x2 = [6, 15] | y1 = [16, 20] | y2 = [21, 30] | z1 = [31, 45] | z2 = [46, 100]
- if w = 49 for R1, f2 up 10-9
- if w = 35 for R2, tied 19-19
- if w = 65 for R3, f2 wins by 29-28 decision
These variables & win chance are decided by the FighterAbility class Base KO, SUB rates +/- ability weight for each fighter Win chance is 50/50 base, and then weighted depending on the total ability of fighter
Win chance calculation:
- fighter weight grade = ((strikingAbility + grapplingAbility) * .6) + ((strikingDefense + grapplingDefense) * .4)
- total weighted grade = fighter1 weight grade + fighter2 weight grade
- fighter1 win prob = fighter1 weight grade / total weighted grade
To run locally, follow these commands
- git clone https://github.com/Jackson-Wozniak/SimCombat-MMA-League.git
- cd (to the location of cloned repo)
- docker-compose up
to shut down the application, run:
- docker-compose down
to restart the app after making local changes (to rebuild the jar file), run:
-docker-compose up --build