Designing Effective Animations
for Computer Science Instruction

Oliver Grillmeyer
School of Education
University of California
Berkeley, CA 94720

topramen@socrates.berkeley.edu

Abstract

Can animations be designed to effectively teach abstract computer science concepts? The theory of learning from animations is still in its infancy and as such, it does not offer a complete framework to aid in the construction of animations. Existing studies of animations yield mixed results. The guidelines that some studies offer are for the most part conjectures and lack substantial rigor in asserting their efficacy. Educational theory derived from constructivist approaches offers general principles to understand the learning process, but does not prescribe a method from which animations could be developed.

The goal of this research agenda is to empirically test animations that are crafted using a sound pedagogical framework. The animation design is informed by current educational theories of constructivism and cognitive apprenticeship along with information from pilot studies and prior research. The educational theories provide a framework to think about the learner and the instructional delivery. Design considerations and guidelines are presented to aid animation builders.

The Problem with Animations

Computer scientists have used animations (e.g., Baeker, Brown, and Stasko) to explain algorithms. An algorithm animation graphically presents abstract information to illustrate how an algorithm functions. These algorithms include sorting, AI techniques (bin packing), complex geometry algorithms (computational geometry and convex hull), and data structures (binomial heaps). The presentation of algorithm animations has advanced by adding more representations of the data and augmenting the animations with color and sound (Brown). But these advances have not always resulted in gains in learning performance. In the relatively short history of algorithm animations, hundreds have been developed and yet only a small percentage have been formally tested, and of those, few have been shown to be significantly better as learning devices compared against control groups (Hansen, et al. and Kehoe, et al.).

Looking at a concrete example, bubble sort, will give a better sense of how animations can be a difficult medium from which to learn. Bubble sort has been animated (Baeker) using a two-dimensional grid in which the x axis represents the placement of the item in some data structure (array or linked list) and the y axis denotes the value of the item. Unsorted data looks like a random scatter plot with points distributed somewhat uniformly over the entire graph. The viewer must determine what the axes represent and realize that the final outcome is to produce sorted data which would be represented as a straight diagonal line. The animation shows three levels of information to the viewer: the local comparisons, the iteration of one pass through the data set, and the entire "bubbling" of data to the final correct sorted position. The viewer must determine the causality between these different levels of information and figure out which levels are the most important.

Educational Theories

Constructivist methods of education view the learner in an active role building upon existing knowledge structures in an iterative process. To effectively build instructional material, one must have a model of a typical learner's knowledge structures including the common errors and incongruities that novices have. Material should be presented to the learner to reinforce correct beliefs and refine erroneous ones. These same techniques can be applied to computer science education (Ben-Ari). The techniques of modeling and scaffolding from cognitive apprenticeship (Collins, et al.) can be used in animations. Animations should model a means of understanding the algorithm. And in situations where the animations would be too complex, scaffolding devices should be used to reduce the demands on the learner.

Few studies have looked into ways of improving algorithm animations based on an educational framework. Hansen, et al. have created a system called HalVis that embeds animations (visualizations) in a hypermedia system. Their system is designed around six principles: specific learning objectives, scaffolding via real-world analogies, multiple representations of the algorithm to break it into chunks, two levels of granularity (low-level and large scale), interactive learning environment, and a built-in questioning system. HalVis has many sound educational ideas in its design and their studies have shown it to be significantly more effective than learning with text alone. However, the HalVis system does not give specific guidelines for the design of animations that could be transferred to other domains.

Considerations when Designing Animations

It is very difficult to design an effective animation. Merely building an animation because it seems like the right thing to do without thinking about what information needs to be conveyed will most likely not produce significant results. The result too often is an exciting series of actions that captivate the viewer but do not result in the desired learning. As Naps, et al. stated, you know you are doing something wrong when the feedback you get is, "That is nice, but what does it mean?"

The designer has a very deep understanding of the concepts that the animation is trying to convey and as such does not need the animation to understand the material. A useful animation for a designer is typically a terse (visually speaking) representation that may seem to be effective for novices. However the designer understands the causality, understands why each action is taking place, knows what each action and object represents, and understands the final outcome. No inferencing is necessary. Will a novice draw the same conclusions? The answer is probably no. The challenge for the animation designer is to develop a model of the learner and design an effective animation around this. An animation should augment or build on the learner's existing knowledge framework.

Designers of animations should consider the following when designing animations. Are the salient features of the system being modeled clearly presented and not overshadowed by other information presented? Are the causal elements of the system well illustrated or are they difficult to infer? Is there an obvious mapping of objects in the animation to the actual objects they represent? Is the animation overly complex such that the viewer cannot fully understand what is occurring? These four points are discussed below.

The animation must clearly show what each element in the animation represents and link those elements to the represented system. When the modeled system is itself abstract such as with a software algorithm, a viewer may have difficulties or make mistakes when linking between the animation and the real domain.

An animation should help the viewer to understand all of the important elements that the animation tries to represent. The most noticeable features of an animation should be the most salient in terms of the role they play in the system being modeled. For example, sort animations typically give equal emphasis to comparisons and swaps and a viewer may get those actions confused. These differences should be made more clear.

The causality within an animation should be unambiguous so that the viewer does not infer erroneous or incomplete causal connections in interpreting the movements. Many algorithm animations illustrate motion through some type of data structure (e.g., traversal through a graph), but do not give an explanation as to why a certain path is followed or why any given node is explored. Without clearly and explicitly showing the causal connections and reasons why given actions happen, an animation may fail to provide the necessary aid for some viewers.

Understanding complex systems or algorithms can be extremely challenging to novices. To understand computer algorithms one must keep track of the local state information, changes in data structures, and the progress through various loops and control structures. This can easily overload a novice. Animations can provide dynamic visual information to scaffold the viewer and make it easier to see and understand how an algorithm or complex system works. However, because there is a great deal of information to convey, animations often overwhelm and fail to explain all of the desired information that is being presented to the observer.

Design Guidelines

From prior empirical studies using animations I have chosen a set of design guidelines for presenting animated information. These design guidelines provide an instructional builder a framework to construct effective animation-based presentations of information. They can be tied to the theoretical framework presented above. These design guidelines and the researchers who propose them include the following:

References

  1. Baeker, R. (1998). Sorting out Sorting: A case study of software visualization for teaching computer science. In J. Stasko, J. Domingue, M. H. Brown, and B. A. Price (Eds.), Software Visualization: Programming as a multimedia experience, Cambridge, MA: MIT Press.
  2. Ben-Ari, M. (1998). Constructivism in Computer Science In D. Joyce (Ed.) Proceedings of the ACM SIGCSE, 1998, Atlanta, GA: ACM Press.
  3. Brown, M. H. (1988). Exploring Algorithms Using Balsa-II Computer, Vol. 21, no. 5, May 1988, 14-36.
  4. Collins, A., Brown, J. S., & Newman, S. (1989). Cognitive apprenticeship: Teaching the crafts of reading, writing, and mathematics. In L. B. Resnick (Ed.), Knowing, Learning, and Instruction, (453-494). Hillsdale, NJ: Erlbaum.
  5. Hansen, S., Scrimpsher, D., & Narayanan, N. H. (1998). From Algorithm Animations to Animation-embedded Hypermedia Visualizations Technical Report CSE98-05, Dept. of Computer Science and Engineering, Auburn University
  6. Kehoe, C., Stasko, J., and Taylor, A. (1999). Rethinking the Evaluation of Algorithm Animations as Learning Aids: An Observational Study Graphics, Visualization, and Usability Center, Georgia Institute of Technology, Atlanta, GA, Technical Report GIT-GVU-99-10, March 1999.
  7. Naps, T., Chair, Working Group on Visualization (1996). An Overview of Visualization: Its Use and Design In Proceedings of the Conference on Integrating Technology into Computer Science Education, Barcelona, Spain, June 1996, 192-200.
  8. Rieber, L. P. (1990). Animation in Computer-Based Instruction Educational Theory, Research, and Development, Vol. 38, No. 1, 1990, 77-86.
  9. Stasko, J. and Lawrence, A. (1998). Empirically assessing algorithm animations as learning aids. In J. Stasko, J. Domingue, M. H. Brown, and B. A. Price (Eds.), Software Visualization: Programming as a multimedia experience, Cambridge, MA: MIT Press.

Epilogue

I have used the aforementioned design considerations to build a set of animations to represent the actions of two sets of Scheme functions, the act of tracing recursive functions, and tree search algorithms. Most of these animations have been tested on students in my introductory computer science class. Early in 2000 I will analyze that data and write up the findings in my dissertation.

What I hope to get from the doctoral consortium is feedback from the panel and other members on my research as well as suggestions for the final stages of finishing my Ph.D. Last year's D.C. provided valuable information and motivation, and I look forward to participation in this year's D.C. once again.