Cool problem. This seems very similar to Super Cleanup Karel in the Karel Challenges, but maybe it's supposed to work on more complicated worlds. In my opinion it's a little unclear what types of worlds can be created because the one in the example would actually be pretty tough to solve; it's more of a path finding problem. If there were some limitations to what the world could look like (i.e. where walls can be) then I think it's a really good problem.
Also have you tried out the Custom Content Tool? You can access it in the teacher side navigation on any teacher or class page. Students can take the quiz just like they would any other exercise on CodeHS. You'll be able to start with one example starting world and solution and then have them create custom ones to test out their code. If you need help getting started you can check out the Custom Content Tool Guide.