PianoGym: Safe post-action piano rhythm training with fatigue constraints
Xiaoyu Meng, Hui Shi, Ningning Liu, Zhuangzhuang Pan, Yan Xia · PLoS ONE · 2026
Bimanual piano rhythm training must maintain precise interlimb timing under limited practice time and under fatigue constraints, while feedback on performance is typically available only after an exercise. A piano practice gym environment (PianoGym) is used as a reproducible simulator for fatigue-constrained piano rhythm training under post-action feedback. The training task is formulated as a fatigue-constrained, post-action, partially observable Markov decision process (POMDP). In this POMDP, a controller observes beat asynchrony, dominance gap, synchronization fidelity, and two fatigue signals, and selects the next exercise from a finite library of structured practice actions. To handle delayed measurements and fatigue feasibility under the simulator budget, we introduce a dual-timescale safety layer. The slow Lagrangian part tracks a long-horizon average constraint using revealed true fatigue, while the fast predictive guard screens candidate actions using the online fatigue estimate. On top of this layer, a piano model predictive controller (PianoMPC) uses certainty-equivalent planning and performs finite-horizon rollouts over a calibrated surrogate environment model and searches only within guard-filtered action sets. In the main three-profile experiment, PianoMPC achieves mean time-to-mastery values of 24.4 to 28.2 steps and FeasibleRate values of 0.90 to 0.95 under the shared environment-side guard. Under the same environment-side guard, it also outperforms bandit and value-based agents. These results indicate that model-predictive planning can convert a fixed operational fatigue budget into faster progress in fatigue-aware piano practice within the PianoGym simulator and its stated surrogate fatigue and skill-dynamics assumptions.