Submission of the CommonRoad exercise on Moodle

Hello,

I have the following questions about the submission of the CommonRoad exercise:

  1. Are we supposed to write only one single algorithm in student.py? I mean, should we develop an algorithm that can solve more than 340 scenarios at the same time? Or probably we can try different algorithms, as long as more than 340 scenarios are solved in total? (which is the case on the CommonRoad website)

  2. If, as mentioned above, we can use different algorithms, how can we submit them on Moodle? Since only one “student.py” can be submitted on it.

I really appreciate it if someone can answer my question!

Best

Hi,

last year we allowed the submission of multiple planners (algorithms) files, but it turned out in the end that it is very difficult to evaluate. Thus, this year we only allow for one planner file to be submitted, which should be able to solve all scenarios on its own. Having this said, you can potentially trigger different algorithms/parameters by passing in the ID of the scenario as one of the arguments of your planner.

Hey,

@ZHcuantianhu thanks for asking this, I was wondering the same thing and @Edmond thanks for your helpful answers on the foum!

I see that we should pack everything into one planner. I understand that we can switch between different algorithms based on the scenario ID. However I’ve seen that the choice of the automaton is sometimes more critical for solving scenarios in comparison to the weights of the different metrics. So I would like to use one automaton for some scenarios and another automaton for other scenarios.

So my question is if we can use multiple automata in our planner and how?

Thanks,
Jan

1 Like

Hi,

unfortunately, the current batch processing script only loads a default automaton for all scenarios. It would require some changes to be done in the batch_processing_parallel.py. As it is not easy to change and distribute it to other at this point, I would say it will be great if you can modify it so that it loads different automaton for different scenarios, and submit this file as well. We will incorporate this feature next time.

Hi,
I have an idea to solve it. Could it be possible to submit more than one batch_processing_config.yaml with different automaton and different scenarios instead of modifying the batch_processing_parallel.py?

1 Like

Hi, thanks for the input. Yes, that should work, and also should be an easier approach as compared to modifying the .py itself.

Hello,
I have an additional question. Do we have to submit the “prize challenge” scenarios to Moodle too, or only the “bonus” scenarios?

Hi Khakhluyk,
Please also submit your solutions to the scenarios for the challenge.

Thank you very much! This idea is fantastic and solves my problem perfectly!

Hello Edmond,
I already submitted my solution to Moodle, but without the solution files for the prize challenge. Is there a way to modify a submission? This would also be useful bc I’d like to further improve my student.py for the prize challenge.

I believe you can still submit your new files, don’t you? (The setting on Moodle says submissions are automatically reopened)

Maybe someone else can weigh in on this, but I’m not able to spot any button. I’m pretty sure though that the option exists in other courses. Thanks anyways for your help!

I have written to the Moodle team, hopefully, they answer the mail soon. Will keep you updated.

Hey Edmond, I have a question as well. I wanted to ask you whether it was okay to have minor modifications in the best_first_search.py and node.py class in order to get the solution accepted for bonus points. Of course, I would also be submitting these to moodle, just the exercise guide doesn’t make it clear to me whether I can make changes to any code, or just the student.py file and the configuration files. I’m thinking that theoretically I could just copy-paste the BFS implementation into my code, but it was easier to just add/modify a few lines.

Hi lilla, yes you can, but you should submit them as well.

1 Like

thanks for your quick answer!

Hey Edmond,

one more question regarding the submission of solutions:

I managed to solve more than the 340 scenarios with my heuristics in one run but while developing the algorithm, I somehow got some solutions for scenarios that my algorithm now isn’t capable to solve anymore. However, since you mentioned that the student.py should be able to solve all scenarios, I only submitted the once for the bonus exercise that were solved with my final algorithm.

Now I’m wondering if I could submit the earlier calculated solutions for the prize challenge or the same rule applies there, too?

Thanks,
Johannes

You can submit the earlier solutions, provided that you also submit the previous planner so that we can verify them.

Did I understand this right?
If I want to use a different automaton for a specific set of scenarios, I am allowed to create several batch_processing_parallel.yaml files with each specifying a different automaton and the scenarios that are solved by using this automaton.

Where should I put the different .yaml files? How should I name them in order to avoid any confusion?

Yes, that’s correct. It doesn’t really matter, as we read in all .yaml files regardless of their names.