Introductory programming (CS1) courses often struggle to support students' understanding of program execution. While visualizations can make execution processes explicit, their effectiveness depends on design and context, and empirical evidence for AI-generated visualizations remains limited. We propose Generated Animated Traces (GATs), AI-generated, analogy-based, narrated animations that coordinate source code, execution state, and conceptual analogies. We conduct a study at two institutions in CS1 courses (Python, N=961; Java N=151) comparing GATs to textual explanations. We measure immediate learning performance and experience, end-of-course engagement and exam performance. Results show that GATs can yield selective benefits for immediate learning, but benefits are context-dependent and short-term. We observe that GATs' influence on performance is moderated by learner engagement profiles. This finding underscores the importance of personalized approaches.
翻译:计算机科学入门编程课程(CS1)常难以帮助学员理解程序执行过程。尽管可视化技术能够直观呈现执行细节,但其有效性受设计与使用情境制约,且针对AI生成可视化效果的实证证据仍十分有限。我们提出生成式动画轨迹——一种基于类比叙述的AI生成动画,能够协调源代码、执行状态与概念类比。我们在两所高校的CS1课程中(Python课程961人,Java课程151人)开展对比研究,将GAT与传统文本解释进行对照。通过测量即时学习效果与体验、期末课程投入度及考试成绩,结果显示GAT对即时学习具有选择性增益,但该效益具有情境依赖性与短期性特征。研究发现,GAT对学习表现的影响受学习者投入度特征的调节作用,这一发现凸显了个性化教学方案的重要性。