Synthesizing Tasks for Block-based Programming
Umair Z. Ahmed, Maria Christakis, Aleksandr Efremov, Nigel Fernandez, Ahana Ghosh, Abhik Roychoudhury, Adish Singla
Abstract
Block-based visual programming environments play a critical role in introducing computing concepts to K-12 students. One of the key pedagogical challenges in these environments is in designing new practice tasks for a student that match a desired level of difficulty and exercise specific programming concepts. In this paper, we formalize the problem of synthesizing visual programming tasks. In particular, given a reference visual task and its solution code , we propose a novel methodology to automatically generate a set of new tasks along with solution codes such that tasks and are conceptually similar but visually dissimilar. Our methodology is based on the realization that the mapping from the space of visual tasks to their solution codes is highly discontinuous; hence, directly mutating reference task to generate new tasks is futile. Our task synthesis algorithm operates by first mutating code to obtain a set of codes . Then, the algorithm performs symbolic execution over a code to obtain a visual task ; this step uses the Monte Carlo Tree Search (MCTS) procedure to guide the search in the symbolic tree. We demonstrate the effectiveness of our algorithm through an extensive empirical evaluation and user study on reference tasks taken from the Hour of the Code: Classic Maze challenge by this http URL and the Intro to Programming with Karel course by this http URL.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Cited by top-tier papers2
- KASER: Knowledge-Aligned Student Error Simulator for Open-Ended Coding TasksZhangqi Duan, Nigel Fernandez, Andrew LanACL 2026 · 5 citations
- RePurr: Automated Repair of Block-Based Learners' ProgramsSebastian Schweikl, Gordon FraserFSE 2025
Related papers
- Reinforcement Learning and Data-Generation for Syntax-Guided SynthesisJulian Parsert, Elizabeth PolgreenAAAI 2024 · 7 citations
- Parametric Visual Program Induction with Function ModularizationXuguang Duan, Xin Wang, Ziwei Zhang, Wenwu ZhuICML 2022 · 3 citations
- Visualization by exampleChenglong Wang, Yu Feng, Rastislav Bodík, Alvin Cheung et al.POPL 2020 · 36 citations
- Visual StoryCoder: A Multimodal Programming Environment for Children's Creation of StoriesGriffin Dietz, Nadin Tamer, Carina Ly, Jimmy K. Le et al.CHI 2023 · 21 citations
- Adding interactive visual syntax to textual codeLeif Andersen, Michael Ballantyne, Matthias FelleisenOOPSLA 2020 · 28 citations
