gym-super-mario icon indicating copy to clipboard operation
gym-super-mario copied to clipboard

Cannot disable GUI for FCEUX

Open nbopardi opened this issue 7 years ago • 19 comments

I am trying to run the FCEUX emulator on AWS without rendering so that training can occur faster. So far I have tried setting no_render to False, and adding --nogui 1 to cmd_args in nes_env.py, but have had no luck. Any help is appreciated.

nbopardi avatar Aug 13 '17 07:08 nbopardi

I have same problem too. My server doesn't support GUI so is there anyway can get the observation without calling FCEUX?

MarvinYeh avatar Sep 11 '17 15:09 MarvinYeh

I have the same problem too. Have you found any way to solve it?

shinshiner avatar Sep 16 '17 02:09 shinshiner

I don't think there is an easy way to disable the FCEUX gui. You should try contacting the FCEUX developers and see what they say.

On Sep 15, 2017, at 10:27 PM, Shin [email protected] wrote:

I have the same problem too. Have you found any way to solve it?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

ppaquette avatar Sep 16 '17 02:09 ppaquette

Hello Pcpaquette, by the way, this environment is written by you and uploaded to gym. If you can not disable the GUI, how do you train the RL model when you want to test some RL algorithms? Do you open the game windows all the time, or there may be some other ways?

shinshiner avatar Sep 16 '17 05:09 shinshiner

If I can not disable the GUI, is there any ways to speed up the game?

shinshiner avatar Sep 16 '17 15:09 shinshiner

There are no easy ways.

You could try building the fceux engine without GUI support, or you could try improve the communication mechanism (currently named pipe) between Python and FCEUX.

Otherwise, you'll need to have multiple agents in parallel to speed up your learning.

On Sat, Sep 16, 2017 at 11:17 AM, Shin [email protected] wrote:

If I can not disable the GUI, is there any ways to speed up the game?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ppaquette/gym-super-mario/issues/9#issuecomment-329974648, or mute the thread https://github.com/notifications/unsubscribe-auth/AAZbIwFEYWHp1If-MOrXgo8Ona5ltQedks5si-aJgaJpZM4O1nov .

ppaquette avatar Sep 16 '17 18:09 ppaquette

Here is an example twitch.tv/koltafrickenfer, am obviously interested in this as well.

kolt-mcb avatar Sep 16 '17 18:09 kolt-mcb

By now, I use your Tiles environment, which just return an array instead of image, and I can pass the level one within 2 seconds. From your point of view, if I disable the GUI support, will it become faster?

shinshiner avatar Sep 17 '17 01:09 shinshiner

I think you can still use the image in my env/code, if that is broken it was not intended.

As far as disabling rendering, this is something you would have much more luck asking the developers of fceux, I know that theoretically it is possible, the Atari emulator is capable of this exact feature, but that doesn't mean anything about fceux.

kolt-mcb avatar Sep 17 '17 21:09 kolt-mcb

I compile a no GUI version of fceux, but it run slower than my oringinal version...

shinshiner avatar Sep 18 '17 02:09 shinshiner

wow interesting, I thought this would be so much work I never even tried. I'l give it a go as well. can you let me know what os/hardware you attempted this on? I run most my stuff in docker for testing.

kolt-mcb avatar Sep 18 '17 03:09 kolt-mcb

I run most of my codes in Ubuntu14.04 and my cpu is Intel i5-5200U

shinshiner avatar Sep 18 '17 04:09 shinshiner

I have compiled fceux on ubuntu 17.04 (I think might be 16.xx) and disabled gtk2 and 3, I dont know what else I would do to compile with out a gui but I can confirm it is not this. Fceux will still launch with a gui stating an error loading. How did you compile this for server rendering?

kolt-mcb avatar Sep 19 '17 02:09 kolt-mcb

I download the 2.2.2 version from here and follow the instructions in README-SDL, the important thing is to setting GTK to 0 in the SConstruct build file.

shinshiner avatar Sep 19 '17 02:09 shinshiner

hmmm thats what I tried, il give it another go tomorrow.

kolt-mcb avatar Sep 19 '17 03:09 kolt-mcb

@koltafrickenfer Your Channel so coooooool!!! Still have no luck in blocking GUI.

MarvinYeh avatar Sep 19 '17 13:09 MarvinYeh

I have been doing some research. This is not as straight forward as described, im linking a pretty infamous project, this apparently has a modified fceux branch in the fceu folder, I haven't had time to try this but will in the next few days.

kolt-mcb avatar Sep 20 '17 02:09 kolt-mcb

I have created a repo for this project here. It does not yet compile. I also have no idea what im doing.

kolt-mcb avatar Sep 28 '17 07:09 kolt-mcb

You can try to run headlessly using Xvfb . I am currently doing so, with the following commands:

Xvfb :10 -ac -screen 0 1024x768x24 >/dev/null 2>/dev/null &
DISPLAY=:10 python3 train.py

Optionally, if you want to see how it is behaving, you can use x11vnc to stream the virtual display.

valiro21 avatar Jan 23 '18 19:01 valiro21