STACK with state

Matti Harjula, Jarmo Malinen, Antti Rasila


The question model of STACK provides an easy way for building automatically assessable questions with mathematical content, but it requires that the questions and their assessment logic depend only on the current input, given by the student at a single instant. However, the present STACK question model already has just the right form to be extended with state variables that would remove this limitation. In this article, we report our recent work on the state-variable extension for STACK, and we also discuss combining the use of state variables with our previous work on conditional output processing. As an outcome, we propose an expansion to the STACK question model, allowing the questions to act as state machines instead of pure functions of a single input event from the student

We present a model question using the state variable extension of STACK that demonstrates some of the new possibilities that open up for the question author. This question is based on a finite state machine in its assessment logic, and it demonstrates aspects of strategic planning to solve problems of recursive nature. The model question also demonstrates how the state machine can interpret the solution path taken by the student, so as to dynamically modify the question behaviour and progress by, e.g., asking additional questions relevant to the path. We further explore the future possibilities from the point of view of learning strategic competencies in mathematics (Kilpatrick et al., 2001; Rasila et al., 2015).


STACK; state machine; interactive question

Full Text:



Crawford, C., 2012. Chris Crawford on Interactive Storytelling. New Riders.

Devlin, K., 2011. Mathematics Education for a New Era: Video Games As a Medium for Learning, 1st Edition. A. K. Peters, Ltd., Natick, MA, USA.

Harjula, M., 2016. Stateful extension, frozen proof of concept code version. Available at: stack/tree/EAMS-frozen-state [Accessed 12 December 2016].

Kilpatrick, J., Swafford, J., Findell, B., 2001. Adding It Up: Helping Children Learn Mathematics. Mathematics Learning Study Committee, Center for Education, Division of Behavioral and Social Sciences and Education, National Research Council. Washington, DC: National Academy Press.

Porteous, J., Cavazza, M., 2009. Controlling narrative generation with planning trajectories: the role of constraints. In: Joint International Conference on Interactive Digital Storytelling. Springer Berlin Heidelberg, pp.234–245.

Rasila, A., Malinen, J., Tiitu, H., 2015. On automatic assessment and conceptual understanding. Teaching Mathematics and its Applications, 34 (3), pp.149–159.

Sangwin, C., 2013. Computer Aided Assessment of Mathematics. Oxford University Press.

Sangwin, C. J., Hunt, T., Harjula, M., et al., 2016. STACK, code of the master version. Available at: stack [Accessed 12 December 2016].



  • There are currently no refbacks.