Coder Social home page Coder Social logo

jackson-wozniak / simcombat-mma-league Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 546 KB

An MMA league simulation. Holds weekly events with an autogenerated roster of ranked fighters

License: MIT License

Java 99.64% Dockerfile 0.36%
api java mma rest rest-api spring-boot student-project tournament docker docker-compose learning-by-doing side-project sports ufc

simcombat-mma-league's Introduction

📚 Table of Contents

  1. Features
  2. MMA League Overview
  3. Fight Results & Statistical Model
  4. Local Deployment

📓 Features & Overview


📁 SimCombat League Overview


📊 Fight Results & Statistical Model

  • 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

🔌 Local Deployment

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

simcombat-mma-league's People

Contributors

jackson-wozniak avatar

Stargazers

 avatar Dipayan Paul avatar

Watchers

 avatar

simcombat-mma-league's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.