Skip to content

Commit

Permalink
Merge pull request #80 from qsona/min_sigma
Browse files Browse the repository at this point in the history
Set min sigma
  • Loading branch information
qsona authored Jan 3, 2024
2 parents ad6b2b4 + f565780 commit bdc80f3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/operations/reportMatching.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { rate } from 'openskill'
import { prisma } from '../prismaClient'

const BETA = 200
const MINIMUM_SIGMA = 120

export type RatingResult = {
ratingId: string
Expand Down Expand Up @@ -53,6 +54,7 @@ export const reportMatching = async (userId: string, discordChannelId: string, i
const isWinner = teamIndex === 0
return await Aigle.map(teamRatings, async (rating, ratingIndex) => {
const newRating = newTeamsRatings[teamIndex][ratingIndex]
newRating.sigma = Math.max(newRating.sigma, MINIMUM_SIGMA)
const updateData = {
mu: newRating.mu,
sigma: newRating.sigma,
Expand Down

0 comments on commit bdc80f3

Please sign in to comment.