Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable running multiple torcs #3

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

muupan
Copy link

@muupan muupan commented Aug 30, 2016

This PR enables running multiple torcs instances, each of which is controlled by different TorcsEnv instances. It would helpful if you run multiple experiments at the same time, or running parallel RL algorithms.

After this PR, if you want to run multiple torcs, just create TorcsEnv instances with different port values.

  • Add -title option to torcs so that its window title can be changed
  • Use xdotool instead of xte so that it can specify which window to control by its title
  • Chage TorcsEnv and Client accordingly
  • Remove auto-generated files (This is not related to the subject of the PR. If there's a problem, I'll omit this change.)

@ugo-nama-kun
Copy link
Owner

Thank you for your great work!
I will immediately pull your request after the check on my ubuntu machine.

Copy link

@smasoudn smasoudn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please specify relaunch_torcs in line 560 of snakeoil3_gym.py.

Your Client class expect relaunch_torcs in C= Client(p=3101).

@j-lnaddef
Copy link

Does it allow to run multiple instances in vision mode?

As far as I understood from #10, they use the image from TORCS' gui, so I guess it is complicated to get the image from multiple instances?

@rtasik
Copy link

rtasik commented Apr 5, 2019

Hey guys,
can somebody please help me getting multiple clients started? When I try in QuickRace with two scr_servers, the first one is called by python3 snakeoil3_gym.py --port 3101, which connects. In the second console I try python3 snakeoil3_gym.py --port 3102 but then it is not connecting properly and ending up within a loop. Does somebody know how to deal with this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants