Giter Club home page Giter Club logo

game_matchmaking's Introduction

COMPILATION
Please unzip the package and use maven and Java 8 to compile it.
You can also use Intellij to open the project if you have Intellij installed.

DESCRIPTION
To solve the general matchmaking problem for online games, two steps are introduced:
1) Pick the first player in the queue, and find the similar players of him/her. This is handled by the PlayerFinder interface. I implemented two subclasses of PlayerFinder.
2) Split the players found in the above step into two teams and put them into a match. This is handled by the TeamBuilder interface. I also implemented two subclasses of TeamBuilder.
All classes are fully covered by unit tests.

A simple rating system is introduced to the each Player and it is based on the winning ratio. Most of the sorting of the players are based on their ratings.

A simulator is also developed to simulate each of the match result and a console app is developed as a proof of concept. It is configured by Spring, we can use the Spring XML configuration file "matchmaking.xml" to achieve different combinations of strategies as well as their parameters. By using the simulator, back-testing can be conducted easily. In the future if new implementation of PlayerFinder and TeamBuilder interfaces are introduced, they can be added into the current framework seamlessly by just updating the XML configuration. 

FUTURE ENHANCEMENT
The below enhancement can be done in the future to provide more robust matchmaking strategy:
1) Multi-threading can be supported by using reader/writer lock.
2) A more sophisticated simulator can be developed based on historical matching result. 
3) Tune the configurations of each PlayerPicker and TeamBuilder to find the best parameters to fit the model.
4) Add retry and waiting logic in matchmaker to achieve better user experiences (i.e. players waiting longer should be matched more easily).
5) More robust rating methodology can be used, like the Glicko rating system: http://en.wikipedia.org/wiki/Glicko_rating_system.

game_matchmaking's People

Stargazers

Nico Zandomeneghi avatar Mateusz Filipczak avatar LeekingWeng avatar Thomas avatar Lukas Altmann avatar Jibay Mcs avatar

Watchers

Rui avatar

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.