Created
November 23, 2020 03:53
-
-
Save mattmazzola/51bfb030eb656a1bdb50095fd9541ee1 to your computer and use it in GitHub Desktop.
Compute player outcome
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const [playerProbability, questionProbability] = ratingSystem.getPlayerProbabilities(player.rating, question.rating) | |
const expectedOutcome = playerProbability > 0.5 ? 1 : 0 | |
const playerOutcome = Math.random() < playerProbability ? 1 : 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment