For decades, NBA fans have hoped to see the league's best players compete to see who is the better player. However, teams and players have expressed injury concerns, so this is unlikely to happen anytime soon. That's why we came up with King of the Court. People can use our program to predict who will win in a hypothetical 1v1 first to 21 scenario based on their real-time statistics.

What it does

Our program has four modes: one that puts players against each other in a one-on-one game, another that puts players against each other in a NBA-style three-point contest, a 1v1 bracket style competition, and one that allows you to compare players’ stats, and a one player 3 Point Contest. The one on one simulation predicts who will win using real-time statistics (height, 3PT percentage, 2PT percentage, DRTG, ORTG, 3PT Tendencies, and 2PT Tendencies), but it also considers that statistics are not the only factor that influences who will win in a matchup. It adds some unpredictability to the games and allows the underdog to squeeze out a potential win. Our 3PT contest simulation employs the NBA 3PT format, which is based on 40 points, and while the 3PT percentage obviously influences who wins, there is still some degree of randomness that will determine who will be crowned the king of the 3PT contest.

How we built it

We began by brainstorming ideas for how we could create an effective algorithm that would utilize these statistics to find which player would win in a real life scenario. We continued to implement similar strategies for the 3 point competition. All of this was done using Java in the Eclipse IDE.

Challenges we ran into

Most of the challenges that we ran into were simply getting the code to work. However, one challenge that stood out was making the matchup predictor a bit more consistent rather than being basically a flip of the coin to see who would win while still preserving an amount of luck, similar to real life. Another challenge that we had was figuring out how to implement a bracket style 1v1 tournament that would show who was the best player in that specific round out of the whole player pool. We also had a difficulty where the last 2 players out of the 32 player pool would not be put in a matchup which did not allow us to complete the bracket mode.

Accomplishments that we're proud of

The accomplishment that we are most proud of was creating a system that would create a random seeding from the 1st seed all the way to the 32nd seed, but we needed to make sure that each player’s seeding was different each time to change the matchups, and therefore the outcomes of the games. Creating a completely random seeding that is different every time is very difficult to do, so we are very proud of that accomplishment.

What we learned

Condensing the engineering design process into a very small timeframe while still making sure that our project was able to do all the things we wanted was something that was new. Normally the EDP takes a while with a large team of people to help develop and refine ideas, however, due to time constraints, that is impossible for us to do. Therefore, we had to first find a problem that we wanted to solve, brainstorm a fix, research the statistics and necessary coding, then we could reach the prototyping phase. All of this was done in a 7 hour time frame, and we learned how to manage our time wisely and what each of our strengths and weaknesses were.

What's next for King of the Court

Due to some difficulties, we were unable to finish the previously mentioned bracket style tournament, so we also hope to continue working on that part of the project as well. We also hope to add a more user friendly GUI that will make the program easier to use rather than using the console to input choices.

Built With

Share this project: