You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current randomness testing assumes a deterministic sequence of calls to random, which is not a reliable assumption. It also can't support arbitrary mappings from random numbers to outcomes.
A better option is to invoke the function several times, and test that the resulting distribution is close to the expected distribution.
We'll want a special test class (say, RandomTest that inherits EvalTest in inspector/testClasses.py) to do this.
@dkreimer Can you try to look into this when you get the chance? There's no hurry since we're using random functions in the next couple of problem sets, but it is a nice feature to have in case we need it later in the term, or for future semesters of rock-paper-scissors. The implementation should be fairly straightforward.
The text was updated successfully, but these errors were encountered:
The current randomness testing assumes a deterministic sequence of calls to
random
, which is not a reliable assumption. It also can't support arbitrary mappings from random numbers to outcomes.A better option is to invoke the function several times, and test that the resulting distribution is close to the expected distribution.
We'll want a special test class (say,
RandomTest
that inheritsEvalTest
ininspector/testClasses.py
) to do this.@dkreimer Can you try to look into this when you get the chance? There's no hurry since we're using random functions in the next couple of problem sets, but it is a nice feature to have in case we need it later in the term, or for future semesters of rock-paper-scissors. The implementation should be fairly straightforward.
The text was updated successfully, but these errors were encountered: