MultiAgentTORCS icon indicating copy to clipboard operation
MultiAgentTORCS copied to clipboard

resetting in multi agent setting

Open Anshu1245 opened this issue 4 years ago • 1 comments

While using say two clients from within a single program, after completing the first episode successfully, the environment doesn't reset simply by calling the reset method twice for both the clients.

that is, ob1, client1 = env.reset(client=client1, relaunch=True) ob2, client2 = env.reset(client=client2, relaunch=True), doesn't work.

Neither does ob1, client1 = env.reset(client=client1, relaunch=True) command = 'kill {}'.format(client2.serverPID) os.system(command) client2 = snakeoil3.Client(p=port[1], vision=False) # Open new UDP in vtorcs client2.MAX_STEPS = np.inf client2.get_servers_input(0) # Get the initial input from torcs obs2 = client2.S.d # Get the current full-observation from torcs ob2 = env.make_observation(obs2)

And both clients cannot be run from different consoles independently as their observations are required together. Not so sure about socket programming. Some help would be greatly appreciated!

Anshu1245 avatar Mar 11 '20 18:03 Anshu1245

Can you elaborate what your use-case is? It seems you are trying to run multiple learning agents from within the same console?

P.S.: Also check out the new repo for this project!

abhisheknaik96 avatar Mar 16 '20 00:03 abhisheknaik96