Games-and-Simulations / sc-docker

Multi-platform Version of StarCraft: Brood War in a Docker Container, ready to use for bot play simulations.
MIT License
231 stars 40 forks source link

Game does not find replay files from all players #22

Closed brownzach125 closed 6 years ago

brownzach125 commented 6 years ago

expected behaviour

Game should finish properly

actual behaviour

Game ends with error saying "ERROR The game 'GAME_10D043FB' did not finish properly! Did not find replay files from all players in '/home/solevi/.scbw/maps/replays/'." I checked the replays folder and the bot's replay was present, but the human's wasn't.

steps to reproduce

Run game with human and end the game by surrendering.

Please run the command issued with --log_level=DEBUG parameter and log:

scbw.play --bots "PurpleWave" --log_level=DEBUG --human

DEBUG checking bot in /home/solevi/.scbw/bots/PurpleWave DEBUG found bot in /home/solevi/.scbw/bots/PurpleWave DEBUG ['docker', 'run', '-d', '--rm', '--privileged', '--name', 'GAME_10D043FB_0_human', '--volume', '/home/solevi/.scbw/logs:/app/logs:rw', '--volume', '/home/solevi/.scbw/bots:/app/bots:ro', '--volume', '/home/solevi/.scbw/maps:/app/sc/maps:rw', '--volume', '/home/solevi/.scbw/bwapi-data/BWTA:/app/sc/bwapi-data/BWTA:rw', '--volume', '/home/solevi/.scbw/bwapi-data/BWTA2:/app/sc/bwapi-data/BWTA2:rw', '--net', 'sc_net', '-p', '5900:5900', '-e', 'PLAYER_NAME=human', '-e', 'PLAYER_RACE=R', '-e', 'NTH_PLAYER=0', '-e', 'NUM_PLAYERS=2', '-e', 'GAME_NAME=GAME_10D043FB', '-e', 'MAP_NAME=/app/sc/maps/sscai/(2)Benzene.scx', '-e', 'GAME_TYPE=FREE_FOR_ALL', '-e', 'SPEED_OVERRIDE=0', 'starcraft:game', '/app/play_human.sh', '--headful'] INFO launched HumanPlayer:human:R in container GAME_10D043FB_0_human DEBUG ['docker', 'run', '-d', '--rm', '--privileged', '--name', 'GAME_10D043FB_1_PurpleWave', '--volume', '/home/solevi/.scbw/logs:/app/logs:rw', '--volume', '/home/solevi/.scbw/bots:/app/bots:ro', '--volume', '/home/solevi/.scbw/maps:/app/sc/maps:rw', '--volume', '/home/solevi/.scbw/bwapi-data/BWTA:/app/sc/bwapi-data/BWTA:rw', '--volume', '/home/solevi/.scbw/bwapi-data/BWTA2:/app/sc/bwapi-data/BWTA2:rw', '--net', 'sc_net', '-p', '5901:5900', '--volume', '/home/solevi/.scbw/bots/PurpleWave/write/GAME_10D043FB_1:/app/sc/bwapi-data/write:rw', '-e', 'PLAYER_NAME=PurpleWave', '-e', 'PLAYER_RACE=P', '-e', 'NTH_PLAYER=1', '-e', 'NUM_PLAYERS=2', '-e', 'GAME_NAME=GAME_10D043FB', '-e', 'MAP_NAME=/app/sc/maps/sscai/(2)Benzene.scx', '-e', 'GAME_TYPE=FREE_FOR_ALL', '-e', 'SPEED_OVERRIDE=0', '-e', 'BOT_NAME=PurpleWave', '-e', 'BOT_FILE=PurpleWave.jar', 'starcraft:game', '/app/play_bot.sh', '--headful'] INFO launched BotPlayer:PurpleWave:P in container GAME_10D043FB_1_PurpleWave INFO Checking if game has launched properly... DEBUG running containers: ['af46a8bdcbb8', '318ce3372fe2'] INFO Launching vnc viewer for HumanPlayer:human:R on port 5900 INFO In headful mode, you must specify and start the game manually. Select the map, wait for bots to join the game and then start the game. INFO Waiting until game is finished... DEBUG running containers: ['af46a8bdcbb8', '318ce3372fe2'] DEBUG running containers: ['af46a8bdcbb8', '318ce3372fe2'] DEBUG running containers: ['af46a8bdcbb8', '318ce3372fe2'] DEBUG running containers: ['af46a8bdcbb8', '318ce3372fe2'] DEBUG running containers: ['af46a8bdcbb8', '318ce3372fe2'] DEBUG running containers: ['af46a8bdcbb8', '318ce3372fe2'] DEBUG running containers: ['af46a8bdcbb8', '318ce3372fe2'] DEBUG running containers: ['af46a8bdcbb8', '318ce3372fe2'] DEBUG running containers: ['af46a8bdcbb8', '318ce3372fe2'] DEBUG running containers: ['af46a8bdcbb8', '318ce3372fe2'] DEBUG running containers: ['af46a8bdcbb8', '318ce3372fe2'] DEBUG running containers: ['af46a8bdcbb8', '318ce3372fe2'] DEBUG running containers: ['af46a8bdcbb8', '318ce3372fe2'] DEBUG running containers: ['af46a8bdcbb8', '318ce3372fe2'] DEBUG running containers: ['af46a8bdcbb8', '318ce3372fe2'] DEBUG running containers: ['af46a8bdcbb8', '318ce3372fe2'] DEBUG running containers: ['af46a8bdcbb8', '318ce3372fe2'] DEBUG running containers: ['af46a8bdcbb8'] DEBUG running containers: [] INFO Found replay files: INFO [] ERROR The game 'GAME_10D043FB' did not finish properly! Did not find replay files from all players in '/home/solevi/.scbw/maps/replays/'. Traceback (most recent call last): File "/usr/local/lib/python3.6/dist-packages/scbw/cli.py", line 178, in main game_result = run_game(args) File "/usr/local/lib/python3.6/dist-packages/scbw/game.py", line 111, in run_game winner_player = find_winner(game_name, args.map_dir, len(players)) File "/usr/local/lib/python3.6/dist-packages/scbw/game.py", line 31, in find_winner map_dir))) scbw.error.GameException: The game 'GAME_10D043FB' did not finish properly! Did not find replay files from all players in '/home/solevi/.scbw/maps/replays/'.

operating system

linux (4.4.0-112 x86_64)

Ubuntu lsb_release -a:

Distributor ID: Ubuntu
Description:    Ubuntu 16.04
Release:        16.04
Codename:       xenial

docker version

output of command docker version:

Client: Version: 17.12.0-ce API version: 1.35 Go version: go1.9.2 Git commit: c97c6d6 Built: Wed Dec 27 20:11:19 2017 OS/Arch: linux/amd64

Server: Engine: Version: 17.12.0-ce API version: 1.35 (minimum version 1.12) Go version: go1.9.2 Git commit: c97c6d6 Built: Wed Dec 27 20:09:53 2017 OS/Arch: linux/amd64 Experimental: false

scbw version

output of command scbw.play -v

0.2b2
michalsustr commented 6 years ago

Thanks, I will fix this with the tournament module inclusion.

michalsustr commented 6 years ago

Fixed with new version (will upload soon).