govariantsteam / govariants

A place to play Go variants
https://www.govariants.com
GNU Affero General Public License v3.0
5 stars 1 forks source link

Rating system #332

Open SameerDalal opened 1 week ago

SameerDalal commented 1 week ago

Created the first version of the rating system.

Currently, the user ratings are updated after every match, which is not ideal according to the glicko2 library. Instead, after a match, I want to add the result to the matches array and then store the array somewhere in the database. Then when the matches array has 10 elements, we can update the ratings and clear the array. So my question is where in the database should I store the matches array?

SameerDalal commented 6 days ago

All the algorithm code is completed. Edit: There is a quick bug that I caught -fixed

Also could you add some information about how you are testing this?

Currently I am using MongoDB compass to see the ranking, match history being updated. Would this be a good way of testing or is there a better way?

merowin commented 6 days ago

We've discussed that it should be configurable whether a game is ranked or unranked (starting with this comment: https://github.com/govariantsteam/govariants/issues/279#issuecomment-2212370784)

I just want to remind about that, and ask if we want to add this here or in a later pull request. Steps to achieve that:

benjaminpjones commented 5 days ago

Also could you add some information about how you are testing this?

Currently I am using MongoDB compass to see the ranking, match history being updated. Would this be a good way of testing or is there a better way?

That's great, as long as there is some way to know it's working as intended

is there a better way?

Of course, some automated (unit) tests would be great too - let me know if you'd like to try adding them and if any guidance is needed.

Some examples of tests in server/ code: server/src/time-control/__tests__

SameerDalal commented 5 days ago

Will do!