oxwhirl / pymarl

Python Multi-Agent Reinforcement Learning framework
Apache License 2.0
1.82k stars 380 forks source link

Cannot watch StarCraft II replays #5

Closed Kabibi closed 5 years ago

Kabibi commented 5 years ago

Firstly, I ran command like this:

_python3 src/main.py --config=qmix_smac --env-config=sc2 with env_args.map_name=3m save_replay=True savemodel=True

and then I loaded model by running:

_python3 src/main.py --config=qmix --env-config=sc2 with env_args.map_name=3m checkpoint_path=results/models/qmix_smac_parallel__2019-03-2019-06-37/ runner=episode

Note that I have to use "qmix" rather than "qmix_smac" because I found that using "qmix_smac" along with "runner=episode" would go wrong.(I don't know the difference between qmix and qmix_smac). Then I got .sc2replay file in StarCraftII folder. But when I ran:

_python3 -m pysc2.bin.play --norender --rgb_minimapsize 0 --replay NAME.SC2Replay

I got message like this without any replay:

smac_2019-03-21-07-04-12.SC2Replay pygame 1.9.4 Hello from the pygame community. https://www.pygame.org/contribute.html I0321 18:50:29.104659 140607866128192 sc_process.py:110] Launching SC2: /home/aaron/StarCraftII/Versions/Base70154/SC2_x64 -listen 127.0.0.1 -port 17276 -dataDir /home/aaron/StarCraftII/ -tempDir /tmp/sc-bvn2ia27/ -displayMode 0 -windowwidth 640 -windowheight 480 -windowx 50 -windowy 50 -dataVersion 94596A85191583AD2EBFAE28C5D532DB -osmesapath libOSMesa.so.8 I0321 18:50:29.107152 140607866128192 remote_controller.py:163] Connecting to: ws://127.0.0.1:17276/sc2api, attempt: 0, running: True Version: B70326 (SC2.2018Season4) Build: Nov 27 2018 03:26:30 Command Line: '"/home/aaron/StarCraftII/Versions/Base70154/SC2_x64" -listen 127.0.0.1 -port 17276 -dataDir /home/aaron/StarCraftII/ -tempDir /tmp/sc-bvn2ia27/ -displayMode 0 -windowwidth 640 -windowheight 480 -windowx 50 -windowy 50 -dataVersion 94596A85191583AD2EBFAE28C5D532DB -osmesapath libOSMesa.so.8' Starting up... Startup Phase 1 complete I0321 18:50:30.110396 140607866128192 remote_controller.py:163] Connecting to: ws://127.0.0.1:17276/sc2api, attempt: 1, running: True Startup Phase 2 complete Attempting to initialize OSMesa from file libOSMesa.so.8 ... Successfully loaded OSMesa library! Running CGLSimpleDevice::HALInit... Calling glGetString: 0x7ff0b6671da0 Version: 2.1 Mesa 18.2.2 Vendor: Brian Paul Renderer: Mesa OffScreen OpenGL initialized! Listening on: 127.0.0.1:17276 Startup Phase 3 complete. Ready for commands. I0321 18:50:31.111603 140607866128192 remote_controller.py:163] Connecting to: ws://127.0.0.1:17276/sc2api, attempt: 2, running: True Could not find map name for file: /tmp/sc-bvn2ia27/StarCraft II/TempReplayInfo.SC2Replay ----------------------- Replay info ------------------------ map_name: "Just Another StarCraft II Map" local_map_path: "SMAC_Maps/3m.SC2Map" player_info { player_info { player_id: 1 race_requested: Terran race_actual: Terran } player_result { player_id: 1 result: Tie } player_apm: 1808 } game_duration_loops: 4558 game_duration_seconds: 203.496337890625 game_version: "4.7.1.70326" data_build: 70326 base_build: 70154 data_version: "94596A85191583AD2EBFAE28C5D532DB" Configuring interface options Configure: raw interface disabled Configure: feature layer interface enabled Configure: score interface enabled Configure: render interface disabled Launching next game. Next launch phase started: 2 Next launch phase started: 3 Next launch phase started: 4 Next launch phase started: 5 Next launch phase started: 6 Next launch phase started: 7 Next launch phase started: 8 Starting replay 'TempStartReplay.SC2Replay' Game has started. Score: 100 Result: [player_id: 1 result: Undecided ] RequestQuit command received. Closing Application... unable to parse websocket frame. Terminate action already called. Entering core terminate. Core shutdown finished. I0321 18:54:00.920968 140607866128192 sc_process.py:201] Shutdown gracefully. I0321 18:54:00.921149 140607866128192 sc_process.py:182] Shutdown with return code: 0

smac_2019-03-21-07-04-12.SC2Replay_1.zip

samvelyan commented 5 years ago

Which OS are you using?

Kabibi commented 5 years ago

Which OS are you using?

I am using Ubuntu 18.04

samvelyan commented 5 years ago

Which OS are you using?

I am using Ubuntu 18.04

Unfortunately, the SC2 replays cannot be watched using the Linux version of StarCraft II as it doesn't have a graphical component. You will need to use either the Mac or Windows version of the StarCraft II client.

Kabibi commented 5 years ago

Which OS are you using?

I am using Ubuntu 18.04

Unfortunately, the SC2 replays cannot be watched using the Linux version of StarCraft II as it doesn't have a graphical component. You will need to use either the Mac or Windows version of the StarCraft II client.

I installed starcraft2 client on windows. But it says the .sc2replay file cannot be open due to the lack of map file. However, when I tried the following command on Ubuntu:

_python -m pysc2.bin.play --replay ~/StarCraftII/Replays/smac2019-03-21-07-04-12.SC2Replay

I got the following picture, but the replay stuck there. Screenshot_20190321_213033

Kabibi commented 5 years ago

The problem was solved by copying Maps directory to C:\Program Files (x86)\StarCraft II.

alsanron commented 11 months ago

Thank you! If you're using linux and install StarcraftII with wine, it would also work after copying the maps to Program Files (x86) of wine

ziyan-wang98 commented 8 months ago

Thank you! If you're using linux and install StarcraftII with wine, it would also work after copying the maps to Program Files (x86) of wine

Hello! When I try to watch the replay on StarCraft 2 (5.0 windows version) it says "Unable to open map", I tried copying all the maps into a folder but it doesn't work, do you know any way to watch that right now?