I'm programming a learning software. It works with question-/answercards. I´m searching for a algorithm that gives me a higher probability for cards that the user has answered wrong.
My actual idea (edit: Inverse transform sampling) is that each card has an integer which indicates how often the user has answerd the question wrong. Count all integer-values, creating a random integer between 0 and the counted integer-values and use this integer to go through my cards and count their integers until I reached the random integer. Then I reach the integer I choose this card :-)
But there must be a better solution ;-)
Edit: Rejection Sampling
N = number of cards M = score of the highest card c = random (1 - N) x = random (1 - M) if (x <= (score of card-nr: c)) accept card! else create new c & x and goto if-querry
That means that cards with a higher score will choosen more often.