Inspiration

Instead of spending my weekend studying for my two midterm exams, I made a tool to help me study -- in particular, to help me memorize things. Flashcard apps are based on quizzing the user on each term and definition pair. However, existing flashcard apps are limited because 1) they seem to display flashcards in a random order, and 2) they assume you have "mastered" a flashcard based on seemingly arbitrary rules e.g. the user has answered correctly twice in a row.

What it does

  • Quizzes users on their flashcards and gives instantaneous feedback.
  • Orders the flashcards in the quiz based on an algorithm adapted from reinforcement learning.
  • User-friendly interface for inputting flashcards. Can be done manually, or delimited text can be copy/pasted.
  • Displays all flashcard sets created by the community. And displays all flashcards for a given set.
  • Shows user stats for each flashcard.

How I built it

I built the whole thing from scratch using PHP, Javascript, Tensorflow.js, HTML, SQL, Material Design Lite. Machine learning is done client-side in Javascript with Tensorflow.js. Flashcards, sets, and features are stored in a SQL database.

Challenges I ran into

  • Coming up with a good learning model. I had a diverse set of features including integer counts of correct/incorrect, booleans of correct/incorrect, and datetimes. So it was challenging to make them all compatible with each other during training.
  • Tensorflow.js has less functionality than what I am used to. For example, I don't think it has intuitive tensor indexing, so I had to write workarounds involving (possibly) less efficient for loops.

Accomplishments that I'm proud of

Putting together something that actually works! I am especially happy to see that my algorithm's predicted "Q-values" often make intuitive sense.

What I learned

I am used to doing this kind of data processing and analysis locally on my computer e.g. MATLAB, Python. I am glad that I got a chance to learn Tensorflow.js.

What's next for Smart Flashcards

  • Save a global set of model weights for all users. Also save another global set of model weights for each user.
  • More feature engineering.
  • User account functionality.

Built With

Share this project:
×

Updates