About the Project

MemorAI_zer is more than just another flashcard app it’s the culmination of cognitive science research, AI engineering, and full-stack development. Here’s our journey…

🌱 Inspiration

  • The Forgetting Curve
    Two weeks before my own exams, I’d cram all night only to forget 90% of it. I dove into Ebbinghaus’s forgetting curve and realized that without strategic review, our brains rapidly discard new knowledge.
  • Science of Learning
    Reading Meyer (2024) on memory retention and Kosslyn (2017) on active recall and dual coding, I saw an opportunity to build something smarter than static “Anki‐style” decks.
  • AI’s Promise
    Papers like Tabibian et al. (2019) showed AI-optimized spaced repetition outperforms fixed intervals. I wanted to harness Transformers, Deep Reinforcement Learning, and Bayesian Knowledge Tracing to create a truly adaptive learning companion.

🛠️ How I Built It

  1. Backend (Flask + AI)
    • Question Generation: Leveraged Hugging Face’s T5 (t5-small-e2e-qg) for end-to-end QG, wrapping it in a Flask API.
    • Spaced-Repetition Scheduler:
      • SM-2 Fallback: Integrated supermemo2 for proven interval calculations.
      • Bayesian Knowledge Tracing: Used pyBKT to model mastery probabilities, dynamically updating after each recall.
  2. Frontend (React + PWA)
  3. Added User Accounts to sync progress across devices via a lightweight database (e.g., Firebase or PostgreSQL).
    • Clean UI: Adopted a clean, responsive design with React, React-Bootstrap, and Framer Motion for smooth transitions.
    • Service Worker & IndexedDB: Enabled offline functionality and local progress saving via a custom sw.js and idb.
    • CORS & Proxy Setup: Configured the React dev server proxy and Flask-CORS to seamlessly bridge ports 3000↔5000.
  4. Project Structure & Tooling
    • Version Control: Organized into /backend (Python) and /frontend (React) folders, each with its own dependencies.
    • Automated Debugging: Pinpointed errors—Hugging Face tokenizer conversions, pyBKT column mismatches, service worker 404s—using detailed logs and Google/StackOverflow research.

📚 What I Learned

  • Integrating Transformers Offline: Tackled fast vs. slow tokenizer issues by forcing SentencePiece with use_fast=False and handling tiktoken/blobfile dependencies.
  • Spaced Repetition Theory in Code: Merged classic SM-2, Bayesian models, and a DRL scaffold to compare and eventually blend multiple scheduling strategies.
  • PWA Nuances: Learned that service workers must live in the public/ folder, and how to correctly scope and unregister them during development.
  • Cross-Origin Workflows: Mastered CORS configuration in Flask and proxying in Create-React-App to avoid “Failed to fetch” errors.
  • Debugging Legacy Warnings: Updated deprecated Pandas .append() calls to pd.concat() and adapted to pyBKT’s expected column names (order_id, skill_name, etc.).

⚔️ Challenges Faced

  • Tokenizer Conversion Errors: Transformers’ slow→fast tokenization often broke on Windows; the workaround required deep dives into Hugging Face’s caching and conversion code.
  • pyBKT Data Formatting: Ensuring pandas DataFrames matched pyBKT’s strict column naming and non-empty schema took multiple iterations.
  • Service Worker 404s: Initially served sw.js from the wrong directory, leading to confusing “bad HTTP response code” logs.
  • CORS & Proxy: Balancing local development convenience (CRA proxy) against production readiness taught me the importance of environment-specific configuration.
  • Balancing Complexity: Integrating advanced AI models without over-engineering—keeping the code maintainable and hackathon-ready.

🎯 Next Steps

  • DRL Stub: Built a custom Gym environment and a Stable-Baselines DQN agent scaffold for future training.
  • Offline Imagery: Add a Stable Diffusion pipeline to auto-generate mnemonic images for each flashcard.
  • Train the DRL Scheduler on real recall data to compare against SM-2.
  • Enhance Dual Coding by automatically pairing generated images with flashcards.

Building MemorAI_zer was a deep dive into both the science of how we learn and the art of engineering robust, user-friendly systems. It challenged me to merge research papers with production code—and the result is a foundation for smarter, more personalized learning tools!

Built With

Share this project:

Updates