Joan Lindsay Orr

Randomized Algorithmic Questions

Randomized Graph Question #1open_in_new

One key pedagogical requirement in many STEM courses is that students need the opportunity for a lot of practice with sample questions. College STEM text books are full of end-of-section and end-of-chapter question sets, and often many of these are variants of the same question, with only different numbers or names substituted. Repeated practice with similar questions which illustrate the same technique or concept is viewed as invaluable by many instructors in math and the sciences, and as being akin to a musician practising scales.

Randomized Graph Question #2open_in_new

EDU enhaced its range of question types by providing a powerful language to write rules for randomizing parameters and content within a single question. When a student encountered one of these randomized algorithmic questions in an assignment, EDU would generate a fresh set of values for the randomized parameters. These would stay fixed for the duration of that assigment, of course, but when the student saw the same question in a retake or in a different assignment, new values of the parameters would be used. This meant that a single well-crafted question could generate a potentially vast range of variants for practice.

At the simplest level, randomization involved inserting variables, such as $width or $height in to the text of a question and then setting rules for how the variables should be chosen (e.g., "a whole number between 10 and 20").

The following code snippet and the animation below it illustrates one such example; a single parameter in a calulus question is randomly set to be a whole number between 2 and 25.

mode=Formula@
algorithm=
  $n = rint(2, 25);
@
question=
  What is the derivative of <math><msup><mi>x</mi><mn>$n</mn></msup></math>
  with respect to <math><mi>x</mi></math>?
@
answer=
  $n x^($n - 1)
@

EDU's Domain-Specific Language

Algorithm Designeropen_in_new

As illustrated in the example above, EDU provided a domain-specific scripting language (DSL) for content-creators to write their randomization algorithms. Although the language was built around just a couple of functions to generate random numbers in a specified range (above), the needs of high-quality content production necessitated a suite of about 30 functions which provided logic and formatting tools to insert well-structured dynamic content into questions. The richness of the DSL in turn led to the need for a UI for algorithm creation.

Editing the DSLopen_in_new

EDU provided the form-based "algorithm designer" (shown) which assisted content creators to construct simple randomization algorithms involving a limited subset of the full DSL. Content creators with more sophisticated needs readily moved on to the text-based scripting language. The Refresh button in the algorithm designer UI provided the ability to view sample randomized values obtained from the algorithm, and the question editor preview enabled content creators to view the result of the algorithm as the question was rendered.

EDU's rich randomization DSL enabled content creators to write questions which included features such as:

Gallery

The following gallery of screenshots illustrates some of the range of application of randomized question generation. Each sample question is shown in two different versions - although in practice many dozens or hundreds of differenmt combinations of parameter values may be possible.

Integration of a polynomial #1
Integration of a polynomial #2
An interactive slider widget in physics #1
An interactive slider widget in physics #2
Labelling a diagram from a physics text #1
Labelling a diagram from a physics text #2
Labelling a diagram from a physics text #1
Labelling a diagram from a physics text #2
Labelling a diagram from an economics text #1
Labelling a diagram from an economics text #2
Matching terms and definitions #1
Matching terms and definitions #2
Linear algebra #1
Linear algebra #2
Numeric with units #1
Numeric with units #2
Numeric #1
Numeric #2
Finding quadratic equations #1
Finding quadratic equations #2
Solving quadratic equations #1
Solving quadratic equations #2
Solving quadratic equations - note the condition to ensure the problem is solvable
Key word #1
Key word #2