论文标题

部分可观测时空混沌系统的无模型预测

Common Patterns in Block-Based Robot Programs

论文作者

Obermüller, Florian, Pernerstorfer, Robert, Bailey, Lisa, Heuer, Ute, Fraser, Gordon

论文摘要

可编程的机器人引人入胜且有趣,与现实世界互动,因此非常适合向年轻的学习者介绍编程。入门机器人编程语言通常会扩展现有的基于块的语言,例如刮擦。尽管已经建立了使用这种语言的教学编程,但与现实世界的机器人计划中的互动会带来特定的挑战,学习者和教育者可能需要帮助和反馈。提供此反馈的一种实用方法是通过识别和指出指示好或坏解决方案的代码中的模式。尽管已经针对基于块的程序定义了此类模式,但到目前为止,尚未考虑机器人特定的编程方面。因此,本文的目的是确定针对基于刮擦的MBLOCK编程语言的机器人编程的模式,该模式用于流行的MBOT和Codey Rocky机器人。我们识别:(1)26个错误模式,指示错误的代码; (2)三种代码气味,指示可能有效但以混乱或难以理解的方式编写的代码; (3)18代码香水,表明代码的各个方面可能是好的。我们扩展了垃圾箱分析框架,以自动在mblock程序中识别这些模式。在3,540个MBLOCK程序的数据集上进行了评估,我们发现了6,129个错误模式,592个代码气味和14,495个代码香水的实例。这证明了我们的方法可能为学习者和教育工作者提供MMBLOCK机器人计划的反馈和帮助。

Programmable robots are engaging and fun to play with, interact with the real world, and are therefore well suited to introduce young learners to programming. Introductory robot programming languages often extend existing block-based languages such as Scratch. While teaching programming with such languages is well established, the interaction with the real world in robot programs leads to specific challenges, for which learners and educators may require assistance and feedback. A practical approach to provide this feedback is by identifying and pointing out patterns in the code that are indicative of good or bad solutions. While such patterns have been defined for regular block-based programs, robot-specific programming aspects have not been considered so far. The aim of this paper is therefore to identify patterns specific to robot programming for the Scratch-based mBlock programming language, which is used for the popular mBot and Codey Rocky robots. We identify: (1) 26 bug patterns, which indicate erroneous code; (2) three code smells, which indicate code that may work but is written in a confusing or difficult to understand way; and (3) 18 code perfumes, which indicate aspects of code that are likely good. We extend the LitterBox analysis framework to automatically identify these patterns in mBlock programs. Evaluated on a dataset of 3,540 mBlock programs, we find a total of 6,129 instances of bug patterns, 592 code smells and 14,495 code perfumes. This demonstrates the potential of our approach to provide feedback and assistance to learners and educators alike for their mBlock robot programs.

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源