davidljung / rl-glue

Automatically exported from code.google.com/p/rl-glue
0 stars 1 forks source link

agent_cleanup (and my env_cleanup) sometimes gets called multiple times. #32

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
See here:
http://code.google.com/p/rl-library/issues/detail?id=50

Basically, once in a while, cleanup gets called 3 times instead of once. 
Try making an agent that checks for this, and then make a bash script that
runs and experiment over and over again.   If you come back after a while,
you'll probably see that it has happened.

The place where I made it happen was:
1)  Java EnvLoader + Java Mountain Car Env
2)  CPP Experiment Program (very simple one)
3)  MountainCarAgent from the RL-Competition

All compiled separate.

Original issue reported on code.google.com by brian.ta...@gmail.com on 13 Oct 2007 at 8:08

GoogleCodeExporter commented 8 years ago
So, I solved this mystery.  The issue is if you are overzealous trying to kill 
things
after an experiment, weird things happen.

So, if the experiment terminates and then you kill the glue, you might due that
before it can send the termination signal to the env and agent.  This, in turn, 
leads
to undefined behavior in what they read off the socket.

Let things die peacefully.

Original comment by brian.ta...@gmail.com on 14 Oct 2007 at 3:03