|
|
|
|
|
by skh
2849 days ago
|
|
I really like the interactive exercises. I teach math at a community college and would like to create interactive exercise sheets for some of my classes. I’m not familiar with Github and poked around a bit but I could not figure out how the answer checking was done. In one problem I did the answer was 6 and I was pleasantly surprised the answer 5+1 was counted as correct. Do you know how this is done? |
|
Expression equality is handled by https://github.com/kisonecat/math-expressions using a few heuristics, which is necessary because Richardson's theorem says this problem is undecidable. The main trick is to regard the expressions as complex-valued functions, find a point where the value is (nearly) equal, and then check for numerical equality in a neighborhood. (Doing this over the complex plane addresses the problem that many common expressions like sqrt(small number-x^2) have a restricted domain over the reals).
We rely on unit tests from Chris Sangwin (who wrote the textbook _Computer Aided Assessment of Mathematics_) to ensure that we're adjudicating expression equality mostly correctly.