DDPG-Keras-Torcs icon indicating copy to clipboard operation
DDPG-Keras-Torcs copied to clipboard

How to switch torcs from GUI mode to text mode to accelerate the training process

Open wswdx opened this issue 6 years ago • 5 comments

If you assign "False" to the "vision" variable in the "ddpg.py" file, you may want to disable the GUI mode during training process. But it doesn't work if you only change the "vision" variable. Here I find a way to significantly switch torcs to text mode when training: Modify the 33rd line in "gym_torcs.py" like this: os.system('torcs -T -nofuel -nolaptime &') Here we append a new option "-T" for "torcs" command to enable the text mode. It's really easy, but have bothered me for minutes. Hope this can help u guys getting started with the code.

wswdx avatar Mar 08 '18 07:03 wswdx

What should you do if you still want to run practice? When I run with -T, it change mode to quick race.

edit: I think I found the answer.

Change /usr/local/games/torcs/config/raceman/practice.xml under the section Practice

change	<attstr name="display mode" val="normal"/>
to 	<attstr name="display mode" val="results only"/>

or run $ sudo torcs --> Race| --> Practice or Quick Race --> | Configure race --> Accept And then set display mode to results only.

aradove avatar Mar 27 '18 09:03 aradove

When I run the code after changing the line. It runs for few episodes and again gives an error saying that "Unable to open display 'default"

ratheesh2107 avatar Jul 03 '18 13:07 ratheesh2107

What should you do if you still want to run practice? When I run with -T, it change mode to quick race.

edit: I think I found the answer.

Change /usr/local/games/torcs/config/raceman/practice.xml under the section Practice

change	<attstr name="display mode" val="normal"/>
to 	<attstr name="display mode" val="results only"/>

or run $ sudo torcs --> Race| --> Practice or Quick Race --> | Configure race --> Accept And then set display mode to results only.

I change display mode to result only, but when I run "sudo torcs -T", it still print "Starting Quick Race". why? Is it really run practice?

zhysgithub avatar Apr 20 '19 15:04 zhysgithub

I got it. There is no need to append a new option "-T". You should only change the display mode to 'results only' by running $ sudo torcs.

UPUPGOO avatar Sep 18 '20 02:09 UPUPGOO