Skip to content
This repository has been archived by the owner on May 11, 2021. It is now read-only.

Commit

Permalink
Modified the array of possible jump lengths for moving through questi…
Browse files Browse the repository at this point in the history
…ons so that all of them are coprime with the number of question bins. This guarantees that users will not repeat a question until they have seen 'bins' questions. Reference Ben Alpert

Reviewers: alpert

CC: eater, jace

Differential Revision: http://phabricator.khanacademy.org/D548
  • Loading branch information
Sohl-Dickstein committed Aug 8, 2012
1 parent 9e4a4b9 commit 1293c32
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions khan-exercise.js
Expand Up @@ -75,8 +75,9 @@ var Khan = (function() {
});
}

// Prime numbers used for jumping through exercises
var primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43,
// Numbers which are coprime to the number of bins, used for jumping through
// exercises
var primes = [3, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43,
47, 53, 59, 61, 67, 71, 73, 79, 83],

/*
Expand Down Expand Up @@ -163,7 +164,9 @@ var Khan = (function() {
exerciseName = deslugify(exerciseId),

// Bin users into a certain number of realms so that
// there is some level of reproducability in their questions
// there is some level of reproducability in their questions.
// If you change this, make sure all entries in the array "primes"
// set above are coprime to the new value.
bins = 200,

// Number of past problems to consider when avoiding duplicates
Expand Down

0 comments on commit 1293c32

Please sign in to comment.