Skip to content

resetting in multi agent setting #11

Description

@nshmn

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!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions