Stop the experiment by lua code

Requests regarding how to set up experiments in ARGoS.
FrankVig
Posts: 5
Joined: Fri Jan 14, 2022 9:34 pm

Stop the experiment by lua code

Postby FrankVig » Tue Feb 01, 2022 7:27 pm

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?

pincy
Site Admin
Posts: 632
Joined: Thu Mar 08, 2012 8:04 pm
Location: Boston, MA
Contact:

Re: Stop the experiment by lua code

Postby pincy » Tue Feb 01, 2022 9:06 pm

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.
I made ARGoS.

FrankVig
Posts: 5
Joined: Fri Jan 14, 2022 9:34 pm

Re: Stop the experiment by lua code

Postby FrankVig » Wed Feb 02, 2022 1:22 am

Thanks, I'll try to do it!


Return to “How to... ?”