Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configuring to run commandcenter #145

Open
jmugan opened this issue Jan 5, 2021 · 6 comments
Open

Configuring to run commandcenter #145

jmugan opened this issue Jan 5, 2021 · 6 comments

Comments

@jmugan
Copy link

jmugan commented Jan 5, 2021

Sorry for the stupid question. I'm trying to run commandcenter and it just says "Failed to start CCBot."

My laddermanager.json looks like this

{
    "CommandCenterPath": "/Users/jmugan/bin/Sc2LadderServer/build/bin/Bots/CCBot/CommandCenter",
    "LocalReplayDirectory": "./Replays/",
    "MaxGameTime": 60480,
	"MaxRealGameTime": 3600,
	"MatchupGenerator": "file",
    "MatchupListFile": "./MatchupList",
    "ErrorListFile": "./errorlist",
    "ResultsLogFile": "./Results.json",
    "PlayerIdFile": "./PlayerIds",
	"PythonBinary": "python",
	"ReplayBotRenameProgram": "ReplayNameChange.exe",
	"BaseBotDirectory":  "./Bots/",
	"RealTimeMode": true,
    "Maps": [
        "Simple64.SC2Map",
        "Simple128.SC2Map"
    ]
}

The base directory is where I run ./Sc2LadderServer is /Users/jmugan/bin/Sc2LadderServer/build/bin.

The directory /Users/jmugan/bin/Sc2LadderServer/build/bin/Bots/CCBot contains CommandCenter, BotConfig.txt and ladderbots.json. The file ladderbots.json looks like this

{
    "Bots": {
        "CCBot": {
            "Race": "Terran",
            "Type": "CommandCenter",
            "RootPath": "./",
            "FileName": "BotConfig.txt"
        }
    }
}

On the output, data/stderr.log only says 04-01-2021 22-26-21: Starting game vs Bob (the name of the other bot).

I'm able to run other bots fine. It's just something about the commandcenter configuration. I am also able to run commandcenter by itself, just not with the ladder server. Any ideas?

@lladdy
Copy link
Contributor

lladdy commented Jan 5, 2021

Hi @jmugan
Which version of command center are you using?
This is the most up to date version that I'm aware of: https://github.com/cpp-sc2/commandcenter

@jmugan
Copy link
Author

jmugan commented Jan 5, 2021

Yep, that's the one I'm using. I works fine if I run commandcenter by itself. Maybe I have to do something special in the BotConfig.txt to run on the ladder server?

@lladdy
Copy link
Contributor

lladdy commented Jan 5, 2021

You could try configuring it as a normal C++ bot instead, like so:

{
	"Bots": {
		"<bot_name_here>": {
			"Race": "<race>",
			"Type": "BinaryCpp",
			"RootPath": "./",
			"FileName": "<file_name>",
			"Debug": true
		}
	}
}

@jmugan
Copy link
Author

jmugan commented Jan 5, 2021

I tried CommandCenter and BotConfig.txt in the "FileName" place but neither seemed to work. But the debug flag was new to me.

Using the "Debug" flag on the original setup gave me

--GamePort is an unrecognized argument.
Unable to find or parse settings.
--ConfigFile is an unrecognized argument.
Unable to find or parse settings.

in stdout.log. That seems promising. Do you know what that might be?

@lladdy
Copy link
Contributor

lladdy commented Jan 5, 2021

I think the usual process is to compile the bot as its own executable (as opposed to running it as a command center bot type, which I don't know much about) and then configure the filename to point to said executable. I'm guessing the bot itself then takes care of finding the BotConfig.txt, provided it's in the bot's current working directory.

I'm just noticing that you're running in a linux environment, so you might be better served using the AI Arena arenaclient - Sc2LadderServer is mostly used in a windows environment for the sc2ai.net ladder, which is now merging with AI Arena (and therefore in future using the arenaclient, which we run on linux).
You can find the arenaclient repo here: https://github.com/aiarena/aiarena-client
and there's a docker image here: https://hub.docker.com/repository/docker/aiarena/arenaclient

I recommend 2 things moving forward:

  1. Join the sc2ai discord if you haven't already: https://discord.gg/zXHU4wM
    The community is very active on - you will get help much faster from people much more knowledgeable than me (especially in AI research).
  2. Once you're on the sc2ai discord, message me directly (I'll be in the admin list).
    The arenaclient setup instructions aren't fully refined yet, but I'm happy to walk you through any issues to get you up and running, so then I can see where the documentation needs improving :)

@jmugan
Copy link
Author

jmugan commented Jan 5, 2021

Thanks for your help @lladdy !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants