Page 1 of 1

Stop the experiment by lua code

Posted: Tue Feb 01, 2022 7:27 pm
by FrankVig
I implemented the episodic Q-Learning algorithm and I want to stop the experiment in progress (by lua code) when the footbot reaches the goal state (checked by goal test). It is useful because I run multiple experiments automatically using a bash script.

So, I want to call the destroy() function inside the step() function. Is it possible?

Re: Stop the experiment by lua code

Posted: Tue Feb 01, 2022 9:06 pm
by pincy
You do it in the loop functions, not in the robot controller. You reimplement the loop function method "IsExperimentFinished()", as shown in the embedding examples. No robot can single-handedly stop the simulation.

Re: Stop the experiment by lua code

Posted: Wed Feb 02, 2022 1:22 am
by FrankVig
Thanks, I'll try to do it!