Self regulating learning

The important stuff is on lines 77 - 96, as that is where the conditions for changing the variables live, and the way that the variable gets changed lives.  What I've done, is added a couple docstrings(the stuff in triple quotes immediately under functions/methods/classes) , as well as some comments.  My goal is to use this really simple example to use software that will build python documentation directly from docstrings, which will be fun, and also, simply to add some more clarification of the code.