<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Iftekhar Pranto</title>
    <description>The latest articles on DEV Community by Iftekhar Pranto (@prantopi).</description>
    <link>https://dev.to/prantopi</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4267981%2F0c4e1c60-f560-4792-90f2-90c8cf932770.png</url>
      <title>DEV Community: Iftekhar Pranto</title>
      <link>https://dev.to/prantopi</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/prantopi"/>
    <language>en</language>
    <item>
      <title>Everyone's building AI to think for us. I built something to make my brain work again.</title>
      <dc:creator>Iftekhar Pranto</dc:creator>
      <pubDate>Fri, 27 Nov 2026 02:58:24 +0000</pubDate>
      <link>https://dev.to/prantopi/how-a-flashcard-app-can-tell-you-got-it-right-from-youve-learned-it-5368</link>
      <guid>https://dev.to/prantopi/how-a-flashcard-app-can-tell-you-got-it-right-from-youve-learned-it-5368</guid>
      <description>&lt;p&gt;Look at what people are building right now. Most of it is one of three things: a subscription, a way to make money off AI, or a tool to make AI better. Another workflow. Another MCP server. Another agent that does the job for you.&lt;/p&gt;

&lt;p&gt;I get it. I use these tools too. But somewhere along the way we stopped thinking.&lt;/p&gt;

&lt;p&gt;A few years ago, getting stuck on a problem meant hours, sometimes days. You'd read the docs, dig through Stack Overflow threads from 2014, try something, break it, try again. It was slow and frustrating, and it was also how you actually learned. The struggle was the point. Now you paste the error into a chat box and get an answer in five seconds. The problem's solved, but you didn't solve it, and a week later you couldn't do it again.&lt;/p&gt;

&lt;p&gt;I noticed it in myself. I'd "know" something on Monday and have nothing by Friday. So I wanted to understand what was going on with my own memory: what I forget, how fast, and what actually makes something stick.&lt;/p&gt;

&lt;p&gt;That turned into a small open-source project. It doesn't do anything for you. It trains you.&lt;/p&gt;

&lt;h2&gt;
  
  
  Your memory has a shape
&lt;/h2&gt;

&lt;p&gt;Memory fades in a fairly predictable way. Right after you learn something you'd almost certainly recall it. A day later, less likely. A week later, much less. That's the forgetting curve, and it's been studied since the 1880s.&lt;/p&gt;

&lt;p&gt;The useful part: every time you successfully pull something back out of memory, the curve gets flatter. You forget it more slowly. So the best time to review something is right before you'd forget it. Not every day, which wastes time, and not once a month, by which point it's gone.&lt;/p&gt;

&lt;h2&gt;
  
  
  But whose curve?
&lt;/h2&gt;

&lt;p&gt;Most flashcard apps use one formula for everyone. People aren't the same, though. Some of us forget faster. Some get more out of each review.&lt;/p&gt;

&lt;p&gt;So the engine learns two numbers about you from your own answers: how fast you forget, and how much each review strengthens your memory. Over time it stops guessing about "an average person" and starts scheduling for you. And you get to see the numbers, which is the part I find interesting. It's a small mirror held up to your own memory.&lt;/p&gt;

&lt;h2&gt;
  
  
  Getting it right isn't the same as knowing it
&lt;/h2&gt;

&lt;p&gt;One right answer doesn't mean you know something. You might have guessed. You might have known it yesterday and be about to lose it. So the engine keeps a probability instead of a tick or a cross. Answer right once and it's around a coin flip. String a few together and it climbs. Slip once and it drops, but doesn't reset. An item only counts as learned at 95% plus three right in a row.&lt;/p&gt;

&lt;p&gt;It also notices how long you took. A right answer that took three times as long as usual is weaker evidence than a quick one, because you were reaching for it. That hesitation is information about your memory too.&lt;/p&gt;

&lt;h2&gt;
  
  
  Under the hood
&lt;/h2&gt;

&lt;p&gt;For anyone who wants the technical side, here's how it fits together. It's a Python library with numpy as the only dependency, and every stage is a module of plain functions you can use on its own.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Your answers         right or wrong, how long you took, which wrong option you picked
      ↓
Knowledge state      Bayesian Knowledge Tracing, response time, related items
      ↓
Memory prediction    forgetting curve, fitted to you
      ↓
Difficulty           Elo-style item and learner ratings
      ↓
Daily load           lighter days when you look likely to quit
      ↓
Time budget          most recall per second you have
      ↓
NEXT THING TO STUDY
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Knowledge tracing
&lt;/h3&gt;

&lt;p&gt;Each item has P(learned). After every answer it's updated with Bayes' rule, allowing for a &lt;strong&gt;guess&lt;/strong&gt; (right without knowing it: 25% on a 4-option question, about 2% when typing) and a &lt;strong&gt;slip&lt;/strong&gt; (wrong despite knowing it). Then it adds a small chance you learned it during that attempt.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="n"&gt;adaptive_learning_engine&lt;/span&gt; &lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;bkt&lt;/span&gt;

&lt;span class="n"&gt;params&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;bkt&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;params_for&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Beginner"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;p&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;params&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;p_init&lt;/span&gt;                     &lt;span class="c1"&gt;# 0.15&lt;/span&gt;
&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;correct&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="kc"&gt;True&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kc"&gt;True&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kc"&gt;False&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kc"&gt;True&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;p&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;bkt&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;update&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;correct&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;correct&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;params&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;params&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;p_guess&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mf"&gt;0.25&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="c1"&gt;# 0.51, 0.83, 0.52, 0.84&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  The forgetting curve, fitted to you
&lt;/h3&gt;

&lt;p&gt;Each item has a stability S in days, and recall after t days is modelled as&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;P(recall) = 0.9 ^ (t / S)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;so at t = S you're at 90%, which is when it's scheduled again. Right answers after a gap grow S; misses shrink it.&lt;/p&gt;

&lt;p&gt;The personal part is two numbers per learner: &lt;strong&gt;k&lt;/strong&gt; (how fast you forget) and &lt;strong&gt;g&lt;/strong&gt; (how much each successful review strengthens memory). Your next review is in &lt;code&gt;k · gⁿ · S&lt;/code&gt; days, where n is your number of successful reviews. They're fitted on a 2-D Bayesian grid: every (k, g) pair is scored by how well it predicts the reviews you've actually done, weighted by a prior centred on the default model. With no data you get the default; as evidence comes in, it moves towards you. No optimiser, and you get an 80% range for each number for free.&lt;/p&gt;

&lt;h3&gt;
  
  
  Response time
&lt;/h3&gt;

&lt;p&gt;Past 1.5 times your own usual time, a right answer starts counting as weaker evidence and grows stability less, with the full penalty at 4 times. It's a bit like Anki's "hard" button, except you don't have to press anything.&lt;/p&gt;

&lt;h3&gt;
  
  
  Difficulty
&lt;/h3&gt;

&lt;p&gt;Items and learners get Elo / one-parameter IRT style ratings:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;P(correct) = guess + (1 − guess) · σ(ability − difficulty)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Hard items start with lower confidence and come back sooner.&lt;/p&gt;

&lt;h3&gt;
  
  
  Short on time
&lt;/h3&gt;

&lt;p&gt;Each due review is scored by how much it raises your recall a week from now, per second it takes. A greedy knapsack fills whatever time you've got with the most valuable ones.&lt;/p&gt;

&lt;h3&gt;
  
  
  Quit risk
&lt;/h3&gt;

&lt;p&gt;A logistic regression on study gaps, recent activity and accuracy trend, fitted as a Bayesian (MAP) model. When quitting looks likely, the day gets lighter instead of piling on reviews.&lt;/p&gt;

&lt;h3&gt;
  
  
  Using it
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="n"&gt;adaptive_learning_engine&lt;/span&gt; &lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nc"&gt;AdaptiveLearner&lt;/span&gt;

&lt;span class="n"&gt;learner&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;AdaptiveLearner&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;learner&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;add_items&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"spanish_001"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"spanish_002"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"spanish_003"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;learner&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;record_answer&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"spanish_001"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;correct&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="kc"&gt;True&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;response_time&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mf"&gt;2.4&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;plan&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;learner&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;recommend&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;available_time&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;900&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;   &lt;span class="c1"&gt;# 15 minutes&lt;/span&gt;
&lt;span class="n"&gt;plan&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nb"&gt;next&lt;/span&gt;        &lt;span class="c1"&gt;# the single best thing to do now&lt;/span&gt;
&lt;span class="n"&gt;learner&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;memory&lt;/span&gt;   &lt;span class="c1"&gt;# your fitted k and g, with their ranges&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Does it work?
&lt;/h2&gt;

&lt;p&gt;I simulated 300 learners, each with their own hidden memory, learning 10 items a day for 30 days, then measured recall at day 60.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Schedule&lt;/th&gt;
&lt;th&gt;Recall at day 60&lt;/th&gt;
&lt;th&gt;Reviews&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Personal (k and g)&lt;/td&gt;
&lt;td&gt;91.7%&lt;/td&gt;
&lt;td&gt;2,380&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;One shared model for everyone&lt;/td&gt;
&lt;td&gt;93.5%&lt;/td&gt;
&lt;td&gt;2,663&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Default, not personalised&lt;/td&gt;
&lt;td&gt;70.1%&lt;/td&gt;
&lt;td&gt;1,698&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Review every 7 days&lt;/td&gt;
&lt;td&gt;68.5%&lt;/td&gt;
&lt;td&gt;1,780&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The shared model gets slightly more recall overall, but only by over-reviewing strong learners. Personalising kept every group, weakest to strongest, at 90.7 to 92.1% with 11% fewer reviews.&lt;/p&gt;

&lt;p&gt;The limits, honestly: I wrote the simulator, so this shows the maths works, not that it changes real people's lives. The fitted k tracks each simulated learner's true memory closely (correlation 0.87), but g mostly doesn't (0.19); with this little data per person, g mostly corrects the default for everyone. There are 102 tests on Python 3.10 to 3.13, but the real test is real learners.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;p&gt;It's a free Python library. No subscription, no account, nothing to sell.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip install adaptive-learning-engine
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Code: &lt;a href="https://github.com/prantopi/adaptive-learning-engine" rel="noopener noreferrer"&gt;github.com/prantopi/adaptive-learning-engine&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When did you last spend a whole day stuck on a problem? Do you miss it?&lt;/p&gt;

</description>
      <category>python</category>
      <category>machinelearning</category>
      <category>opensource</category>
      <category>learning</category>
    </item>
  </channel>
</rss>
