Play to Grade: Testing Coding Games as Classifying Markov Decision Process

Allen Nie, Emma Brunskill, Chris Piech
10/27/2021
cs.AIcs.CYcs.LG
rl

Official code: allenanie/play-to-grade (7 stars, Jupyter Notebook, last commit 2025-10-28).

Abstract

Contemporary coding education often presents students with the task of developing programs that have user interaction and complex dynamic systems, such as mouse based games. While pedagogically compelling, there are no contemporary autonomous methods for providing feedback.

Show full abstract

Notably, interactive programs are impossible to grade by traditional unit tests. In this paper we formalize the challenge of providing feedback to interactive programs as a task of classifying Markov Decision Processes (MDPs). Each student's program fully specifies an MDP where the agent needs to operate and decide, under reasonable generalization, if the dynamics and reward model of the input MDP should be categorized as correct or broken. We demonstrate that by designing a cooperative objective between an agent and an autoregressive model, we can use the agent to sample differential trajectories from the input MDP that allows a classifier to determine membership: Play to Grade. Our method enables an automatic feedback system for interactive code assignments. We release a dataset of 711,274 anonymized student submissions to a single assignment with hand-coded bug labels to support future research.

View on arXivView PDF

Code Implementations(1)

Applying RL to grade coding games. NeurIPS 2021.

76Jupyter Notebook, PythonOct 25, 20211 years ago

Similar Papers

Cite this paper

@article{nie2021play,
  title  = {Play to Grade: Testing Coding Games as Classifying Markov Decision Process},
  author = {Allen Nie and Emma Brunskill and Chris Piech},
  year   = {2021},
  eprint = {2110.14615},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2110.14615}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2110.14615.svg)](https://codeofpaper.com/paper/2110.14615)

Discussion