Interactive Plot Quizzes

Jeremy Stratton-Smith, Wolfram|Alpha Math Content
AnneMarie Torresen, Wolfram|Alpha Math Content

Wolfram Technology Conference 2021

Outline

1. What are Interactive Plot Quizzes?

2. Scope

3. Features

Random Problem Generation

Automatic Grading & Feedback

Usable Data Output

4. Future Work

5. Questions & Feedback

1. What are Interactive Plot Quizzes?

Extending Wolfram|Alpha (W|A) interactive content through Wolfram|Alpha Notebook Edition (WANE)

ResourceFunction["CurveAnalysis"][Sin[x],x]

ResourceFunction["ManipulatePlot"][Sin[x+a],{x,0,2Pi},{a, -Pi,Pi}]

ResourceFunction["LinearDescriptionPlotQuiz"][]

Where can you find them?

In WANE directly:

NaturalLanguageInput cells (WANE parsing):

Through Wolfram Function Repository directly:

ResourceFunction["QuadraticTransformationQuiz"][]

2. Scope

High school to early college

Algebra I & II, Geometry, PreCalculus, Calculus I

Plotting/transforming linear, quadratic, cubic and sinusoidal functions

Connecting function representations (graph/table/equation)

Data regression & curve fitting

Mean Value Theorem, slope fields

3. Features

Random Problem Generation

Similar to the Wolfram Problem Generator (WPG), but with closer to free-form input

ResourceFunction["QuadraticDescriptionPlotQuiz"][]

Automatic Grading & Feedback

Similar to the Wolfram Problem Generator (WPG), but with closer to free-form input

ResourceFunction["SlopeFieldQuiz"][]

ResourceFunction["SinusoidPlotQuiz"][]

Usable Data Output

Teachers can see and analyze student results

ResourceFunctionHelpers`GeometricTransformationQuiz[]

data = \[LeftAssociation]"Problem 1"->\[LeftAssociation]"Description"->\[LeftAssociation]"GivenPoints"->{{-2,0},{7,0},{7,9},{-2,9}},"Shape"->"Square","Transformation"->"Translate horizontally by 2 and translate vertically by -7"\[RightAssociation],"Guesses"->{},"SubmittedAnswer"->,"Correct"->True\[RightAssociation],"Problem 2"->\[LeftAssociation]"Description"->\[LeftAssociation]"GivenPoints"->{{3,1},{2,-1},{-2,3}},"Shape"->"Triangle","Transformation"->"Rotate 180 degrees counterclockwise about the origin."\[RightAssociation],"Guesses"->{,},"SubmittedAnswer"->,"Correct"->False\[RightAssociation],"Problem 3"->\[LeftAssociation]"Description"->\[LeftAssociation]"GivenPoints"->{{7,6},{-6,6},{-6,2},{7,2}},"Shape"->"Rectangle","Transformation"->"Rotate 180 degrees counterclockwise about the origin."\[RightAssociation],"Guesses"->{},"SubmittedAnswer"->,"Correct"->False\[RightAssociation],"Problem 4"->\[LeftAssociation]"Description"->\[LeftAssociation]"GivenPoints"->{{-4,-4},{-8,4},{0,-2}},"Shape"->"Triangle","Transformation"->"Translate horizontally by 0 and translate vertically by -3"\[RightAssociation],"Guesses"->{},"SubmittedAnswer"->,"Correct"->True\[RightAssociation],"Problem 5"->\[LeftAssociation]"Description"->\[LeftAssociation]"GivenPoints"->{{-3,3},{-7,3},{-7,-1},{-3,-1}},"Shape"->"Square","Transformation"->"Translate horizontally by 2 and translate vertically by 4"\[RightAssociation],"Guesses"->{},"SubmittedAnswer"->,"Correct"->True\[RightAssociation],"Problem 6"->\[LeftAssociation]"Description"->\[LeftAssociation]"GivenPoints"->{{1,8},{-4,8},{-4,3},{1,3}},"Shape"->"Square","Transformation"->"Rotate 180 degrees counterclockwise about the origin."\[RightAssociation],"Guesses"->{},"SubmittedAnswer"->{},"Correct"->False\[RightAssociation],"Problem 7"->\[LeftAssociation]"Description"->\[LeftAssociation]"GivenPoints"->{{7,3},{-5,3},{-5,-1},{7,-1}},"Shape"->"Rectangle","Transformation"->"Reflect about the x-axis."\[RightAssociation],"Guesses"->{,},"SubmittedAnswer"->,"Correct"->True\[RightAssociation],"Problem 8"->\[LeftAssociation]"Description"->\[LeftAssociation]"GivenPoints"->{{4,-5},{6,-5},{6,-1},{4,-1}},"Shape"->"Rectangle","Transformation"->"Translate horizontally by 7 and translate vertically by -7"\[RightAssociation],"Guesses"->{},"SubmittedAnswer"->,"Correct"->True\[RightAssociation]\[RightAssociation];

Dataset[GroupBy[data, #Correct&]]

4. Future Work

New content coverage

Given set of data, find curve with specified goodness of fit parameters

Rigid transformations of geometric figures (in progress)

Plotting based on description of derivative

New functionalities

Submitting results to a Databin by Wolfram ID

Options to limit number of guesses

Creating a superfunction "InteractiveQuiz" or similar to be able to track across multiple quizzes

Interoperability with Wolfram Problem Generator (WPG)

Making the interfaces themselves computable objects

Integration into a Learning Management System (LMS) or other cloud-based applications

5. Questions & Feedback

Additional thanks to Jordan H., Nick B., Brad J., Lou D., Paco J., Steven L., Eila S., Michael T. and the ResourceFunction review team for contributions to this project!

6. Supplementary Details

ResourceFunctionHelpers Paclet

Our Wolfram|Alpha Math Content team has published close to 150 functions over the past 2 years.

These live in a paclet to enable us to release new content more frequently than the Mathematica version release cycle as well as test across versions as the Wolfram Language grows and evolves.

These are accessible via the ResourceFunctionHelpers` context, for example:

Names["ResourceFunctionHelpers`*"][[6]]

ResourceObject["ArcLengthIntegral"]

ResourceFunction["ArcLengthIntegral"][Sin[x], {x, 0,Pi}]

Or alternatively, we can call the function directly:

ResourceFunctionHelpers`ArcLengthIntegral[Sin[x], {x, 0,Pi}]

Building Dynamic Interfaces

We can examine the underlying cell expressions of dynamic outputs by highlighting the cell and using the “Cell” ⊳ “Show Expression” menu. Notice that despite the many complex forms that Manipulate can take, the cell expression is still relatively short due to the call to Manipulate`ManipulateBoxes.

Manipulate[Plot[Sin[x+phase],{x,0,2Pi}],{phase, 0,Pi}]

When it comes to building our own custom interfaces, many times Manipulate will suffice, but sometimes we have to build our own tools using DynamicModule as in the example below. While the interface itself is fairly small, we can see all of the innards of the code in the cell expression. To build larger, more involved interfaces, this causes memory bloat by having more code baked into the notebook’s cells.

DynamicModule[
	{x=0, check = Null},
	Panel[Dynamic[Column[{
		"Move the slider close to .5.",
		Slider[Dynamic[x], {0, 1}, Appearance -> "Labeled"],
		Button["Check answer", check = Abs[x-.5] < .1],
		Switch[check,
			Null,
				Sequence @@ {},
			True,
				Style["Good job!", Darker[Green]],
			False,
				Style["Try again.", Darker[Red]]
		]
	}]]]
]

Managing notebook bloat and loading

To avoid memory bloat and to be able to load the code necessary, we have implemented a set of underlying code such that even in a fresh kernel or for someone who has never run one of our functions, they will “just work” upon enabling dynamic updating.

ResourceFunction["LinearFunctionQuiz"][]

Resources on Dynamic Functionality

For more information on creating your own dynamic functionalities and interfaces, please see the following resources:

Introduction to Dynamic

Advanced Dynamic Functionality

Building Maintainable Dynamic Interfaces (Lou D’Andria)

DynamicUtilities (ResourceFunctionHelpers repo)