M-J-Murray / MAMEToolkit

A Python toolkit used to train reinforcement learning algorithms against arcade games
GNU General Public License v2.0
642 stars 114 forks source link

Can it train on the server? #18

Closed guanzeying closed 4 years ago

guanzeying commented 4 years ago

Can it train on the server? No GUI.

sitmo commented 4 years ago

I've been looking into the same thing, also tried to Dockerize it. I've made some progress with using Xvfb for headless video, but so far no luck with getting rid of the audio.

` apt-get intall -y xvfb

Xvfb :0 -screen 0 800x600x16 +extension RANDR &

export DISPLAY=:0

./mame `

guanzeying commented 4 years ago

Thanks. When I run mame. output tips: ALSA lib seq_hw.c:466:(snd_seq_hw_open) open /dev/snd/seq failed: Permission denied It can't continue.

M-J-Murray commented 4 years ago

"Permission denied" usually means your current user doesn't have permission to run a command. Try writing 'sudo' before the command. If that doesn't help then I'm unsure how to help, as I have not seen that error before.

guanzeying commented 4 years ago

I writing 'sudo' before the command, But error same as last.

M-J-Murray commented 4 years ago

I've just done some work improving the compatibility of the library and I've worked out what was going on with this issue. Although the library raises the warning:

ALSA lib conf.c:3750:(snd_config_update_r) Cannot access file /usr/share/alsa/alsa.conf
ALSA lib seq.c:935:(snd_seq_open_noupdate) Unknown SEQ default

It does not affect MAME or the library's performance. Everything will be working as normal. The error is caused by MAME not being able to setup sound for the game. If you do want sound for some reason and you have no screen then have a look at this forum: https://unix.stackexchange.com/questions/105964/launch-a-fake-minimal-x-session-for-pulseaudio-dbus

I have also added documentation describing how to run the library without a screen.