I am wondering how to modify and generalize exploded repetition software. In particular, I am wondering how to change the number of cards displayed, the range of cards and the ability to specify a specific deck of cards.
I worked on reuse software for a while and found the following issues:
It is difficult to make sure that the number of cards that will be displayed on a specific date remains within a certain range
Instead of telling me which cards I need to study today, I would like to pick up a deck when I want and go through a couple of cards, depending on how much time I have
I understand that the last point is somewhat contrary to the logic of spaced repetition, but it may be possible to find a compromise.
The problem that the program should solve will be "Given that I am now asked to display a card, which card to choose, based on each history of learning cards, importance, etc."
This approach can easily generalize to incremental reading and to-do list management, I think.
Since I am a beginner programmer, any help on how to implement such an algorithm would be greatly appreciated.
Below you will find my main attempt to address the problem; the most obvious problem here is that the code does not account for the growth of the card file over time.
#! /usr/bin/env python import random box = [] class flashcard(object): def __init__(self, quest, answ, score): self.question = quest self.answer = answ self.score = score # ------------------------------------------------------------------------------ f = open('list.txt','r') for line in f: parts = line.split('\t') box.append(flashcard(parts[0],parts[1],int(parts[2]))) f.close() # ------------------------------------------------------------------------------ keepgoing=True while keepgoing: card = random.choice(box) if random.uniform(0,1) * card.score < 1: a = raw_input(str(card.score) + ' ' + card.question + ' ') if a == card.answer: card.score *= 3 elif a == 'q': keepgoing = False else: card.score = 1 print 'WRONG -->' + card.answer else: pass # ------------------------------------------------------------------------------ f = open('list.txt','w') for card in box: f.write("%s\t%s\t%s\n" % (card.question, card.answer, card.score)) f.close()
Best, j
Well thank you! Although your points are absolutely correct, only now I understand that the motivation for my question was broader, and therefore some points remain open to me.
1st I would be interested to have sthg. for a command line that is as simple as possible Secondly, I would like to avoid date-based logic, even if this contrasts slightly with SRS 3rd I would like to have a simple script that I can hack into many different applications such as list management affairs, management of reading lists, management of a playlist (as in http://imms.luminal.org/ ), etc.
So, I would like to have a common script that can represent elements randomly, but weighted by importance, lightness, urgency, interest, etc.