davechurchill / commandcenter Goto Github PK
View Code? Open in Web Editor NEWStarcraft AI Bot
License: MIT License
Starcraft AI Bot
License: MIT License
Usually queens are not used for attack purposes especially at the early stage of the game because of quite slow move speed. The bot shouldn't count queens when he checks attack conditions neither include queens into attack group.
However some rare strategies exists which uses large number of queens at the battleground. Dunno should it be supported or not.
In your Compile Instructions, you wrote "Click "Local Windows Debugger" in VS to launch the program from within VS. To do this, you need to set the "Working Directory" option under "Debugging" to "$(ProjectDir)/../bin/" (I don't know why this option won't save)". Is it because your /vs/CommandCenter.vcxproj.user
was not pushed due to the .gitignore
? Can a simple git add CommandCenter.vcxproj.user -f
will solve this issue ?
Hey, so I'm running the bot. I'm using the BotConfig and all is fine. And then suddenly, BAMM.
libc++abi.dylib: terminating with uncaught exception of type std::out_of_range: map::at: key not found
And that's that. I'm on OSX.
Hello! I am a newbie who has just used Github and Commander Center,my bot race is Terran,then i want to use the "CreateParticipant()" to add the custom bot to i fight with my bot,
CreateParticipant(Util::GetRaceFromString(botRaceString), &Player),
CreateParticipant(Util::GetRaceFromString(botRaceString), &bot)
i can open two windows,but the
else if (item.type.getUnitTypeID() == sc2::UNIT_TYPEID::TERRAN_STARPORTREACTOR)
Micro::SmartAddon(producer, sc2::ABILITY_ID::BUILD_REACTOR_STARPORT, m_bot);
is invalid in the game.Do other people have encountered such a problem?
In "UnitData.cpp" you are casting "sc2::Unit::tag" to an int when you operate with it. This value is a 64-bit integer, and we DO use the bits in the upper word. By truncating it to a 32-bit integer you may be introducing tag collisions.
I suggest you use the same 64-bit integer type the api library does:
typedef uint64_t Tag;
I'm building this package and I got some errors.
Enviroment : MacOS Sierra 10.12.6
Build the bot
$ git clone https://github.com/davechurchill/commandcenter.git && cd commandcenter
$ cmake .
$ make
$ make
[ 2%] Building CXX object src/CMakeFiles/CommandCenter.dir/BaseLocation.cpp.o
In file included from /Users/Chris/Documents/ML/commandcenter/src/BaseLocation.cpp:1:
In file included from /Users/Chris/Documents/ML/commandcenter/src/BaseLocation.h:5:
In file included from /opt/local/include/sc2api/sc2_api.h:3:
In file included from /opt/local/include/sc2api/sc2_interfaces.h:13:
In file included from /opt/local/include/sc2api/sc2_unit.h:6:
In file included from /opt/local/include/sc2api/sc2_proto_interface.h:5:
/opt/local/include/s2clientprotocol/sc2api.pb.h:17:2: error: This file was generated by an older version of protoc which is
#error This file was generated by an older version of protoc which is
^
/opt/local/include/s2clientprotocol/sc2api.pb.h:18:2: error: incompatible with your Protocol Buffer headers. Please
#error incompatible with your Protocol Buffer headers. Please
^
/opt/local/include/s2clientprotocol/sc2api.pb.h:19:2: error: regenerate this file with a newer version of protoc.
#error regenerate this file with a newer version of protoc.
^
In file included from /Users/Chris/Documents/ML/commandcenter/src/BaseLocation.cpp:1:
In file included from /Users/Chris/Documents/ML/commandcenter/src/BaseLocation.h:5:
In file included from /opt/local/include/sc2api/sc2_api.h:3:
In file included from /opt/local/include/sc2api/sc2_interfaces.h:13:
In file included from /opt/local/include/sc2api/sc2_unit.h:6:
In file included from /opt/local/include/sc2api/sc2_proto_interface.h:5:
In file included from /opt/local/include/s2clientprotocol/sc2api.pb.h:31:
/opt/local/include/s2clientprotocol/common.pb.h:17:2: error: This file was generated by an older version of protoc which is
#error This file was generated by an older version of protoc which is
^
/opt/local/include/s2clientprotocol/common.pb.h:18:2: error: incompatible with your Protocol Buffer headers. Please
#error incompatible with your Protocol Buffer headers. Please
^
/opt/local/include/s2clientprotocol/common.pb.h:19:2: error: regenerate this file with a newer version of protoc.
#error regenerate this file with a newer version of protoc.
^
/opt/local/include/s2clientprotocol/common.pb.h:966:27: error: too many arguments to function call, expected 0, have 1
return data_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/google/protobuf/arenastring.h:225:3: note: 'GetNoArena' declared here
inline const ::std::string& GetNoArena() const { return *ptr_; }
^
In file included from /Users/Chris/Documents/ML/commandcenter/src/BaseLocation.cpp:1:
In file included from /Users/Chris/Documents/ML/commandcenter/src/BaseLocation.h:5:
In file included from /opt/local/include/sc2api/sc2_api.h:3:
In file included from /opt/local/include/sc2api/sc2_interfaces.h:13:
In file included from /opt/local/include/sc2api/sc2_unit.h:6:
In file included from /opt/local/include/sc2api/sc2_proto_interface.h:5:
In file included from /opt/local/include/s2clientprotocol/sc2api.pb.h:32:
/opt/local/include/s2clientprotocol/data.pb.h:17:2: error: This file was generated by an older version of protoc which is
#error This file was generated by an older version of protoc which is
^
/opt/local/include/s2clientprotocol/data.pb.h:18:2: error: incompatible with your Protocol Buffer headers. Please
#error incompatible with your Protocol Buffer headers. Please
^
/opt/local/include/s2clientprotocol/data.pb.h:19:2: error: regenerate this file with a newer version of protoc.
#error regenerate this file with a newer version of protoc.
^
/opt/local/include/s2clientprotocol/data.pb.h:1289:32: error: too many arguments to function call, expected 0, have 1
return link_name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/google/protobuf/arenastring.h:225:3: note: 'GetNoArena' declared here
inline const ::std::string& GetNoArena() const { return *ptr_; }
^
In file included from /Users/Chris/Documents/ML/commandcenter/src/BaseLocation.cpp:1:
In file included from /Users/Chris/Documents/ML/commandcenter/src/BaseLocation.h:5:
In file included from /opt/local/include/sc2api/sc2_api.h:3:
In file included from /opt/local/include/sc2api/sc2_interfaces.h:13:
In file included from /opt/local/include/sc2api/sc2_unit.h:6:
In file included from /opt/local/include/sc2api/sc2_proto_interface.h:5:
In file included from /opt/local/include/s2clientprotocol/sc2api.pb.h:32:
/opt/local/include/s2clientprotocol/data.pb.h:1367:34: error: too many arguments to function call, expected 0, have 1
return button_name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/google/protobuf/arenastring.h:225:3: note: 'GetNoArena' declared here
inline const ::std::string& GetNoArena() const { return *ptr_; }
^
In file included from /Users/Chris/Documents/ML/commandcenter/src/BaseLocation.cpp:1:
In file included from /Users/Chris/Documents/ML/commandcenter/src/BaseLocation.h:5:
In file included from /opt/local/include/sc2api/sc2_api.h:3:
In file included from /opt/local/include/sc2api/sc2_interfaces.h:13:
In file included from /opt/local/include/sc2api/sc2_unit.h:6:
In file included from /opt/local/include/sc2api/sc2_proto_interface.h:5:
In file included from /opt/local/include/s2clientprotocol/sc2api.pb.h:32:
/opt/local/include/s2clientprotocol/data.pb.h:1421:36: error: too many arguments to function call, expected 0, have 1
return friendly_name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
~~~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/google/protobuf/arenastring.h:225:3: note: 'GetNoArena' declared here
inline const ::std::string& GetNoArena() const { return *ptr_; }
^
In file included from /Users/Chris/Documents/ML/commandcenter/src/BaseLocation.cpp:1:
In file included from /Users/Chris/Documents/ML/commandcenter/src/BaseLocation.h:5:
In file included from /opt/local/include/sc2api/sc2_api.h:3:
In file included from /opt/local/include/sc2api/sc2_interfaces.h:13:
In file included from /opt/local/include/sc2api/sc2_unit.h:6:
In file included from /opt/local/include/sc2api/sc2_proto_interface.h:5:
In file included from /opt/local/include/s2clientprotocol/sc2api.pb.h:32:
/opt/local/include/s2clientprotocol/data.pb.h:1475:29: error: too many arguments to function call, expected 0, have 1
return hotkey_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/google/protobuf/arenastring.h:225:3: note: 'GetNoArena' declared here
inline const ::std::string& GetNoArena() const { return *ptr_; }
^
In file included from /Users/Chris/Documents/ML/commandcenter/src/BaseLocation.cpp:1:
In file included from /Users/Chris/Documents/ML/commandcenter/src/BaseLocation.h:5:
In file included from /opt/local/include/sc2api/sc2_api.h:3:
In file included from /opt/local/include/sc2api/sc2_interfaces.h:13:
In file included from /opt/local/include/sc2api/sc2_unit.h:6:
In file included from /opt/local/include/sc2api/sc2_proto_interface.h:5:
In file included from /opt/local/include/s2clientprotocol/sc2api.pb.h:32:
/opt/local/include/s2clientprotocol/data.pb.h:1982:27: error: too many arguments to function call, expected 0, have 1
return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/google/protobuf/arenastring.h:225:3: note: 'GetNoArena' declared here
inline const ::std::string& GetNoArena() const { return *ptr_; }
^
In file included from /Users/Chris/Documents/ML/commandcenter/src/BaseLocation.cpp:1:
In file included from /Users/Chris/Documents/ML/commandcenter/src/BaseLocation.h:5:
In file included from /opt/local/include/sc2api/sc2_api.h:3:
In file included from /opt/local/include/sc2api/sc2_interfaces.h:13:
In file included from /opt/local/include/sc2api/sc2_unit.h:6:
In file included from /opt/local/include/sc2api/sc2_proto_interface.h:5:
In file included from /opt/local/include/s2clientprotocol/sc2api.pb.h:32:
/opt/local/include/s2clientprotocol/data.pb.h:2541:27: error: too many arguments to function call, expected 0, have 1
return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/google/protobuf/arenastring.h:225:3: note: 'GetNoArena' declared here
inline const ::std::string& GetNoArena() const { return *ptr_; }
^
In file included from /Users/Chris/Documents/ML/commandcenter/src/BaseLocation.cpp:1:
In file included from /Users/Chris/Documents/ML/commandcenter/src/BaseLocation.h:5:
In file included from /opt/local/include/sc2api/sc2_api.h:3:
In file included from /opt/local/include/sc2api/sc2_interfaces.h:13:
In file included from /opt/local/include/sc2api/sc2_unit.h:6:
In file included from /opt/local/include/sc2api/sc2_proto_interface.h:5:
In file included from /opt/local/include/s2clientprotocol/sc2api.pb.h:32:
/opt/local/include/s2clientprotocol/data.pb.h:2719:27: error: too many arguments to function call, expected 0, have 1
return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/google/protobuf/arenastring.h:225:3: note: 'GetNoArena' declared here
inline const ::std::string& GetNoArena() const { return *ptr_; }
^
In file included from /Users/Chris/Documents/ML/commandcenter/src/BaseLocation.cpp:1:
In file included from /Users/Chris/Documents/ML/commandcenter/src/BaseLocation.h:5:
In file included from /opt/local/include/sc2api/sc2_api.h:3:
In file included from /opt/local/include/sc2api/sc2_interfaces.h:13:
In file included from /opt/local/include/sc2api/sc2_unit.h:6:
In file included from /opt/local/include/sc2api/sc2_proto_interface.h:5:
In file included from /opt/local/include/s2clientprotocol/sc2api.pb.h:33:
/opt/local/include/s2clientprotocol/debug.pb.h:17:2: error: This file was generated by an older version of protoc which is
#error This file was generated by an older version of protoc which is
^
/opt/local/include/s2clientprotocol/debug.pb.h:18:2: error: incompatible with your Protocol Buffer headers. Please
#error incompatible with your Protocol Buffer headers. Please
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[2]: *** [src/CMakeFiles/CommandCenter.dir/BaseLocation.cpp.o] Error 1
make[1]: *** [src/CMakeFiles/CommandCenter.dir/all] Error 2
make: *** [all] Error 2
Chrisui-MacBook-Pro:commandcenter Chris$ make
[ 2%] Building CXX object src/CMakeFiles/CommandCenter.dir/BaseLocation.cpp.o
In file included from /Users/Chris/Documents/ML/commandcenter/src/BaseLocation.cpp:1:
In file included from /Users/Chris/Documents/ML/commandcenter/src/BaseLocation.h:5:
In file included from /opt/local/include/sc2api/sc2_api.h:3:
In file included from /opt/local/include/sc2api/sc2_interfaces.h:13:
In file included from /opt/local/include/sc2api/sc2_unit.h:6:
In file included from /opt/local/include/sc2api/sc2_proto_interface.h:5:
/opt/local/include/s2clientprotocol/sc2api.pb.h:17:2: error: This file was generated by an older version of protoc which is
#error This file was generated by an older version of protoc which is
^
/opt/local/include/s2clientprotocol/sc2api.pb.h:18:2: error: incompatible with your Protocol Buffer headers. Please
#error incompatible with your Protocol Buffer headers. Please
^
/opt/local/include/s2clientprotocol/sc2api.pb.h:19:2: error: regenerate this file with a newer version of protoc.
#error regenerate this file with a newer version of protoc.
^
In file included from /Users/Chris/Documents/ML/commandcenter/src/BaseLocation.cpp:1:
In file included from /Users/Chris/Documents/ML/commandcenter/src/BaseLocation.h:5:
In file included from /opt/local/include/sc2api/sc2_api.h:3:
In file included from /opt/local/include/sc2api/sc2_interfaces.h:13:
In file included from /opt/local/include/sc2api/sc2_unit.h:6:
In file included from /opt/local/include/sc2api/sc2_proto_interface.h:5:
In file included from /opt/local/include/s2clientprotocol/sc2api.pb.h:31:
/opt/local/include/s2clientprotocol/common.pb.h:17:2: error: This file was generated by an older version of protoc which is
#error This file was generated by an older version of protoc which is
^
/opt/local/include/s2clientprotocol/common.pb.h:18:2: error: incompatible with your Protocol Buffer headers. Please
#error incompatible with your Protocol Buffer headers. Please
^
/opt/local/include/s2clientprotocol/common.pb.h:19:2: error: regenerate this file with a newer version of protoc.
#error regenerate this file with a newer version of protoc.
^
/opt/local/include/s2clientprotocol/common.pb.h:966:27: error: too many arguments to function call, expected 0, have 1
return data_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/google/protobuf/arenastring.h:225:3: note: 'GetNoArena' declared here
inline const ::std::string& GetNoArena() const { return *ptr_; }
^
In file included from /Users/Chris/Documents/ML/commandcenter/src/BaseLocation.cpp:1:
In file included from /Users/Chris/Documents/ML/commandcenter/src/BaseLocation.h:5:
In file included from /opt/local/include/sc2api/sc2_api.h:3:
In file included from /opt/local/include/sc2api/sc2_interfaces.h:13:
In file included from /opt/local/include/sc2api/sc2_unit.h:6:
In file included from /opt/local/include/sc2api/sc2_proto_interface.h:5:
In file included from /opt/local/include/s2clientprotocol/sc2api.pb.h:32:
/opt/local/include/s2clientprotocol/data.pb.h:17:2: error: This file was generated by an older version of protoc which is
#error This file was generated by an older version of protoc which is
^
/opt/local/include/s2clientprotocol/data.pb.h:18:2: error: incompatible with your Protocol Buffer headers. Please
#error incompatible with your Protocol Buffer headers. Please
^
/opt/local/include/s2clientprotocol/data.pb.h:19:2: error: regenerate this file with a newer version of protoc.
#error regenerate this file with a newer version of protoc.
^
/opt/local/include/s2clientprotocol/data.pb.h:1289:32: error: too many arguments to function call, expected 0, have 1
return link_name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/google/protobuf/arenastring.h:225:3: note: 'GetNoArena' declared here
inline const ::std::string& GetNoArena() const { return *ptr_; }
^
In file included from /Users/Chris/Documents/ML/commandcenter/src/BaseLocation.cpp:1:
In file included from /Users/Chris/Documents/ML/commandcenter/src/BaseLocation.h:5:
In file included from /opt/local/include/sc2api/sc2_api.h:3:
In file included from /opt/local/include/sc2api/sc2_interfaces.h:13:
In file included from /opt/local/include/sc2api/sc2_unit.h:6:
In file included from /opt/local/include/sc2api/sc2_proto_interface.h:5:
In file included from /opt/local/include/s2clientprotocol/sc2api.pb.h:32:
/opt/local/include/s2clientprotocol/data.pb.h:1367:34: error: too many arguments to function call, expected 0, have 1
return button_name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/google/protobuf/arenastring.h:225:3: note: 'GetNoArena' declared here
inline const ::std::string& GetNoArena() const { return *ptr_; }
^
In file included from /Users/Chris/Documents/ML/commandcenter/src/BaseLocation.cpp:1:
In file included from /Users/Chris/Documents/ML/commandcenter/src/BaseLocation.h:5:
In file included from /opt/local/include/sc2api/sc2_api.h:3:
In file included from /opt/local/include/sc2api/sc2_interfaces.h:13:
In file included from /opt/local/include/sc2api/sc2_unit.h:6:
In file included from /opt/local/include/sc2api/sc2_proto_interface.h:5:
In file included from /opt/local/include/s2clientprotocol/sc2api.pb.h:32:
/opt/local/include/s2clientprotocol/data.pb.h:1421:36: error: too many arguments to function call, expected 0, have 1
return friendly_name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
~~~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/google/protobuf/arenastring.h:225:3: note: 'GetNoArena' declared here
inline const ::std::string& GetNoArena() const { return *ptr_; }
^
In file included from /Users/Chris/Documents/ML/commandcenter/src/BaseLocation.cpp:1:
In file included from /Users/Chris/Documents/ML/commandcenter/src/BaseLocation.h:5:
In file included from /opt/local/include/sc2api/sc2_api.h:3:
In file included from /opt/local/include/sc2api/sc2_interfaces.h:13:
In file included from /opt/local/include/sc2api/sc2_unit.h:6:
In file included from /opt/local/include/sc2api/sc2_proto_interface.h:5:
In file included from /opt/local/include/s2clientprotocol/sc2api.pb.h:32:
/opt/local/include/s2clientprotocol/data.pb.h:1475:29: error: too many arguments to function call, expected 0, have 1
return hotkey_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/google/protobuf/arenastring.h:225:3: note: 'GetNoArena' declared here
inline const ::std::string& GetNoArena() const { return *ptr_; }
^
In file included from /Users/Chris/Documents/ML/commandcenter/src/BaseLocation.cpp:1:
In file included from /Users/Chris/Documents/ML/commandcenter/src/BaseLocation.h:5:
In file included from /opt/local/include/sc2api/sc2_api.h:3:
In file included from /opt/local/include/sc2api/sc2_interfaces.h:13:
In file included from /opt/local/include/sc2api/sc2_unit.h:6:
In file included from /opt/local/include/sc2api/sc2_proto_interface.h:5:
In file included from /opt/local/include/s2clientprotocol/sc2api.pb.h:32:
/opt/local/include/s2clientprotocol/data.pb.h:1982:27: error: too many arguments to function call, expected 0, have 1
return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/google/protobuf/arenastring.h:225:3: note: 'GetNoArena' declared here
inline const ::std::string& GetNoArena() const { return *ptr_; }
^
In file included from /Users/Chris/Documents/ML/commandcenter/src/BaseLocation.cpp:1:
In file included from /Users/Chris/Documents/ML/commandcenter/src/BaseLocation.h:5:
In file included from /opt/local/include/sc2api/sc2_api.h:3:
In file included from /opt/local/include/sc2api/sc2_interfaces.h:13:
In file included from /opt/local/include/sc2api/sc2_unit.h:6:
In file included from /opt/local/include/sc2api/sc2_proto_interface.h:5:
In file included from /opt/local/include/s2clientprotocol/sc2api.pb.h:32:
/opt/local/include/s2clientprotocol/data.pb.h:2541:27: error: too many arguments to function call, expected 0, have 1
return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/google/protobuf/arenastring.h:225:3: note: 'GetNoArena' declared here
inline const ::std::string& GetNoArena() const { return *ptr_; }
^
In file included from /Users/Chris/Documents/ML/commandcenter/src/BaseLocation.cpp:1:
In file included from /Users/Chris/Documents/ML/commandcenter/src/BaseLocation.h:5:
In file included from /opt/local/include/sc2api/sc2_api.h:3:
In file included from /opt/local/include/sc2api/sc2_interfaces.h:13:
In file included from /opt/local/include/sc2api/sc2_unit.h:6:
In file included from /opt/local/include/sc2api/sc2_proto_interface.h:5:
In file included from /opt/local/include/s2clientprotocol/sc2api.pb.h:32:
/opt/local/include/s2clientprotocol/data.pb.h:2719:27: error: too many arguments to function call, expected 0, have 1
return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/google/protobuf/arenastring.h:225:3: note: 'GetNoArena' declared here
inline const ::std::string& GetNoArena() const { return *ptr_; }
^
In file included from /Users/Chris/Documents/ML/commandcenter/src/BaseLocation.cpp:1:
In file included from /Users/Chris/Documents/ML/commandcenter/src/BaseLocation.h:5:
In file included from /opt/local/include/sc2api/sc2_api.h:3:
In file included from /opt/local/include/sc2api/sc2_interfaces.h:13:
In file included from /opt/local/include/sc2api/sc2_unit.h:6:
In file included from /opt/local/include/sc2api/sc2_proto_interface.h:5:
In file included from /opt/local/include/s2clientprotocol/sc2api.pb.h:33:
/opt/local/include/s2clientprotocol/debug.pb.h:17:2: error: This file was generated by an older version of protoc which is
#error This file was generated by an older version of protoc which is
^
/opt/local/include/s2clientprotocol/debug.pb.h:18:2: error: incompatible with your Protocol Buffer headers. Please
#error incompatible with your Protocol Buffer headers. Please
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[2]: *** [src/CMakeFiles/CommandCenter.dir/BaseLocation.cpp.o] Error 1
make[1]: *** [src/CMakeFiles/CommandCenter.dir/all] Error 2
make: *** [all] Error 2
I'm trying to build on Ubuntu 16.04, but the cmake file for finding the api is proving to be a challenge. Because the api doesn't provide a cmake install target (at this rate I'm considering making a PR for one), I'm trying to trick your file into thinking the api is accessible. So far I managed to get the libraries to be found with
sudo mkdir -p /opt/local/lib
sudo ln -s ~/s2client-api/build/bin/ /opt/local/lib/sc2api
but the includes fail to be found using the same method. Reading through the cmake file it seems like you expect the sc2api
and sc2utils directories
to be found in one of
"/opt/local/include"
"/usr/local/include"
"/usr/include
(plus any directories cmake has defaulted in). And yet I still get failures for finding the first set of includes after doing
sudo mkdir -p /opt/local/include
for i in ~/s2client-api/include/; do sudo ln -s $i $(basename $i); done
I realized that I'll further need to add the protobuf includes since they're generated and build into the build directory, but I can't even get past the first find_path
. Do you have any ideas?
https://github.com/Blizzard/s2client-proto/releases
is it compatible with new 4.0 api?
As seen here, *_s is only available if __STDC_LIB_EXT1__
is defined by the implementation and if __STDC_WANT_LIB_EXT1__
is defined to 1
before including ctime. These are unfortunately not available to me on g++/clang++. Is there a solution to this?
Currently one can specify OrbitalCommand as an instruction of OpeningBuildOrder. That leads to fun results:
It seems that either request to build Orbital Command should be automagically split into 'Create Command Center + Morph to Orbital) or that the bot should restrict such commands in general.
The latter looks more natural to me. In this case one should explicitly request morphing of command center.
I believe the bot behaves the same for the zerg's buildings.
Hi. At the end of the compilation process with cmake fails in linking executable. A sample of the error:
.....
[ 94%] Building CXX object src/CMakeFiles/CommandCenter.dir/WorkerManager.cpp.o
/home/juanj/apps/s2client-api/commandcenter/src/WorkerManager.cpp: In member function ‘void WorkerManager::drawWorkerInformation()’:
/home/juanj/apps/s2client-api/commandcenter/src/WorkerManager.cpp:235:9: warning: unused variable ‘yspace’ [-Wunused-variable]
int yspace = 0;
^~~~~~
[ 97%] Building CXX object src/CMakeFiles/CommandCenter.dir/main.cpp.o
[100%] Linking CXX executable ../bin/CommandCenter
/opt/local/lib/sc2api/libsc2api.a(sc2_agent.cc.o): On function: google::protobuf::RepeatedField<unsigned long long>::Reserve(int)': sc2_agent.cc:(.text._ZN6google8protobuf13RepeatedFieldIyE7ReserveEi[_ZN6google8protobuf13RepeatedFieldIyE7ReserveEi]+0xdf): reference to
google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel, char const*, int)' not defined
sc2_agent.cc:(.text._ZN6google8protobuf13RepeatedFieldIyE7ReserveEi[_ZN6google8protobuf13RepeatedFieldIyE7ReserveEi]+0xf7): reference to google::protobuf::internal::LogMessage::operator<<(char const*)' not defined sc2_agent.cc:(.text._ZN6google8protobuf13RepeatedFieldIyE7ReserveEi[_ZN6google8protobuf13RepeatedFieldIyE7ReserveEi]+0x106): reference to
google::protobuf::internal::LogMessage::operator<<(char const*)' not defined
sc2_agent.cc:(.text._ZN6google8protobuf13RepeatedFieldIyE7ReserveEi[_ZN6google8protobuf13RepeatedFieldIyE7ReserveEi]+0x11b): reference to `google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage&)' not defined
...............................................................................................................
Thanks.
I am trying to run command center on Linux but it trows me an error during make.
when i do steps :
$ git clone --recursive https://github.com/Blizzard/s2client-api && cd s2client-api
$ git checkout dd10176ab94cc078a2116ec790b63f0a93ac5527 .
$ mkdir build && cd build
$ cmake ../
$ make
then it will throw me error
[ 83%] Built target sc2protocol
Scanning dependencies of target sc2utils
[ 83%] Building CXX object src/CMakeFiles/sc2utils.dir/sc2utils/sc2_arg_parser.cc.o
[ 83%] Building CXX object src/CMakeFiles/sc2utils.dir/sc2utils/sc2_manage_process.cc.o
/mnt/minerva1/nlp/projects/ai_in_games19/s2client-api/src/sc2utils/sc2_manage_process.cc: In function âbool sc2::HasExtension(const string&, const string&)â:
/mnt/minerva1/nlp/projects/ai_in_games19/s2client-api/src/sc2utils/sc2_manage_process.cc:84:5: error: no matching function for call to âequal(__gnu_cxx::__normal_iterator<const char*, std::basic_string >, std::basic_string::const_iterator, std::basic_string::const_iterator, std::basic_string::const_iterator, sc2::HasExtension(const string&, const string&)::__lambda0)â
);
^
/mnt/minerva1/nlp/projects/ai_in_games19/s2client-api/src/sc2utils/sc2_manage_process.cc:84:5: note: candidates are:
In file included from /usr/include/c++/4.8/vector:60:0,
from /mnt/minerva1/nlp/projects/ai_in_games19/s2client-api/src/../include/sc2utils/sc2_manage_process.h:4,
from /mnt/minerva1/nlp/projects/ai_in_games19/s2client-api/src/sc2utils/sc2_manage_process.cc:1:
/usr/include/c++/4.8/bits/stl_algobase.h:1021:5: note: template<class _II1, class _II2> bool std::equal(_II1, _II1, _II2)
equal(_II1 __first1, _II1 __last1, _II2 __first2)
^
/usr/include/c++/4.8/bits/stl_algobase.h:1021:5: note: template argument deduction/substitution failed:
/mnt/minerva1/nlp/projects/ai_in_games19/s2client-api/src/sc2utils/sc2_manage_process.cc:84:5: note: candidate expects 3 arguments, 5 provided
);
^
In file included from /usr/include/c++/4.8/vector:60:0,
from /mnt/minerva1/nlp/projects/ai_in_games19/s2client-api/src/../include/sc2utils/sc2_manage_process.h:4,
from /mnt/minerva1/nlp/projects/ai_in_games19/s2client-api/src/sc2utils/sc2_manage_process.cc:1:
/usr/include/c++/4.8/bits/stl_algobase.h:1053:5: note: template<class _IIter1, class _IIter2, class _BinaryPredicate> bool std::equal(_IIter1, _IIter1, _IIter2, _BinaryPredicate)
equal(_IIter1 __first1, _IIter1 __last1,
^
/usr/include/c++/4.8/bits/stl_algobase.h:1053:5: note: template argument deduction/substitution failed:
/mnt/minerva1/nlp/projects/ai_in_games19/s2client-api/src/sc2utils/sc2_manage_process.cc:84:5: note: candidate expects 4 arguments, 5 provided
);
^
make[2]: *** [src/CMakeFiles/sc2utils.dir/sc2utils/sc2_manage_process.cc.o] Error 1
make[1]: *** [src/CMakeFiles/sc2utils.dir/all] Error 2
make: *** [all] Error 2
Hi, i am instaling commandcenter on linux and i got to the point to do:
$ git clone https://github.com/davechurchill/commandcenter.git && cd commandcenter
$ cmake .
but it throws me error:
-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found SC2Api: SC2Api_INCLUDE_DIR-NOTFOUND;SC2Api_Proto_INCLUDE_DIR-NOTFOUND;/usr/include
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
/mnt/minerva1/nlp/projects/ai_in_games19/s2client-api/commandcenter/src/SC2Api_INCLUDE_DIR
used as include directory in directory /mnt/minerva1/nlp/projects/ai_in_games19/s2client-api/commandcenter/src
used as include directory in directory /mnt/minerva1/nlp/projects/ai_in_games19/s2client-api/commandcenter/src
used as include directory in directory /mnt/minerva1/nlp/projects/ai_in_games19/s2client-api/commandcenter/src
SC2Api_Proto_INCLUDE_DIR
used as include directory in directory /mnt/minerva1/nlp/projects/ai_in_games19/s2client-api/commandcenter/src
used as include directory in directory /mnt/minerva1/nlp/projects/ai_in_games19/s2client-api/commandcenter/src
used as include directory in directory /mnt/minerva1/nlp/projects/ai_in_games19/s2client-api/commandcenter/src
-- Configuring incomplete, errors occurred!
See also "/mnt/minerva1/nlp/projects/ai_in_games19/s2client-api/commandcenter/CMakeFiles/CMakeOutput.log".
could you please help me?
I was trying my hand at creating AI for the first time. after following the guide for a while, when I was trying to build the solution like the guide was said. instead, it gives me a bunch of error saying
Cannot open include file: 'corecrt.h': No such file or directory(compiling source file ..\src*.cpp)
the asterisk means the name of some files in the project. I'm using the precompiled library, since compiling myself seems bleak. It keeps giving me something about submodules and errors.
Does anyone have a suggestion for what I may have done wrong?
This pull request is similar in nature to this one:
#60
The problem is that the calculated resource locations are a bit off, so it causes problems with expansion (i.e. it can't build new geysers).
The calculations for starting player bases seem to be correct however.
A picture paints a thousand words.
Hey guys.
Can I get some help over here please? I really would love to tinker with CommandCenter but I'm unable to build it so far.
I have the sc2 api checked out and built nicely. I added the path to my includes to the FindSC2Api.cmake file like this:
# Find main Api headers.
find_path(SC2Api_INCLUDE_DIR
NAMES
"sc2api/sc2_api.h"
"sc2utils/sc2_manage_process.h"
PATHS
"/opt/local/include"
"/usr/local/include"
"/usr/include"
"/Users/user/C++/s2client-api/include"
)
However, I'm getting this:
CMake Error at /usr/local/Cellar/cmake/3.9.1/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
Could NOT find SC2Api (missing: SC2Api_INCLUDE_DIRS SC2Api_LIBRARIES)
Call Stack (most recent call first):
/usr/local/Cellar/cmake/3.9.1/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:377 (_FPHSA_FAILURE_MESSAGE)
cmake/FindSC2Api.cmake:77 (find_package_handle_standard_args)
CMakeLists.txt:11 (find_package)
-- Configuring incomplete, errors occurred!
See also "/Users/user/C++/commandcenter/build/CMakeFiles/CMakeOutput.log".
Having everything setup, I noticed this part:
"${SC2Api_INCLUDE_DIR}/sc2api/proto"
This isn't there.
I found proto which is a Java thing under here:
find . -name proto
./contrib/protobuf/java/compatibility_tests/v2.5.0/more_protos/src/proto
./contrib/protobuf/java/compatibility_tests/v2.5.0/protos/src/proto
./contrib/protobuf/java/core/src/test/proto
./contrib/protobuf/java/util/src/test/proto
But also could find protobuf like this:
~/C++/s2client-api master*
❯ find . -name protobuf
./.git/modules/contrib/protobuf
./build/contrib/protobuf
./build/contrib/protobuf/cmake/CMakeFiles/Export/lib/cmake/protobuf
./build/contrib/protobuf/cmake/lib/cmake/protobuf
./contrib/protobuf
./contrib/protobuf/java/compatibility_tests/v2.5.0/more_protos/src/proto/com/google/protobuf
./contrib/protobuf/java/compatibility_tests/v2.5.0/more_protos/src/proto/google/protobuf
./contrib/protobuf/java/compatibility_tests/v2.5.0/protos/src/proto/com/google/protobuf
./contrib/protobuf/java/compatibility_tests/v2.5.0/protos/src/proto/google/protobuf
./contrib/protobuf/java/compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf
./contrib/protobuf/java/core/src/main/java/com/google/protobuf
./contrib/protobuf/java/core/src/test/java/com/google/protobuf
./contrib/protobuf/java/core/src/test/proto/com/google/protobuf
./contrib/protobuf/java/util/src/main/java/com/google/protobuf
./contrib/protobuf/java/util/src/test/java/com/google/protobuf
./contrib/protobuf/java/util/src/test/proto/com/google/protobuf
./contrib/protobuf/python/google/protobuf
./contrib/protobuf/src/google/protobuf
Sooooo.... which one is it? :)
Thanks!!
Check next item in build order, if it needs a prereq, add it to top of BO. If it needs supply, add supply to top of BO. This should make all builds possible.
DELETED
because it is much more efficient to use other language(ie. python) to write some machine learning code on top of some library(ie. tensorflow), but the official AIIDE tournament machine seems do not support such python library.
so I has several questions:
Thanks
I tried to build commandcenter in ubuntu16.04 following the steps provided in the readme, However, after I run the make command, countless errors occurred:
Here I list one of them:
/opt/local/lib/sc2api/libsc2protocol.a(data.pb.cc.o):(.rodata._ZTVN14SC2APIProtocol11AbilityDataE[_ZTVN14SC2APIProtocol11AbilityDataE]+0xb0): undefined reference to `google::protobuf::Message::SpaceUsed() const'
How can I solve that? Should I install the specific version of protobuf and rebuild the sc2api?
My cmake version:3.5.1
My g++ version: 5.4.0
My operation system (ubuntu) is newly installed.
Current bot implementation allows to pass cmdline parameters to sc2api directly:
if (!coordinator.LoadSettings(argc, argv))
{
std::cout << "Unable to find or parse settings." << std::endl;
return 1;
}
Is it intended? I can pass things like '--help', 'map_path', 'realtime' and so on while the same parameters are duplicated in BotConfig.txt and some are discarded in the code below. Looks confusing.
Probably better solution will be to limit number of parameters delivered to sc2api::Coordinator, e.g. pass only program name:
sc2::Coordinator coordinator;
coordinator.LoadSettings(1, argv);
The bot is only able to find 12 of the 14 base locations on CatalystLE. Due to this error, it is unable to find its start location. Its start location is thus null and the bot chrashes later.
edit: i got similar issues on other new maps of ladder 2018 Season 1
Hello, David!
I'm curious about your thoughts on https://github.com/deepmind/pysc2 and an option to align commandcenter-based AI and the pysc2 training agents, for some interop maybe?
My interest in this question arises from the fact that I'd love to use awesome primitives you built in the commandcenter, but at the same time, I'd love to have the flexibility to plug in all the RL training stuff that deepmind team provided. Also doing it casually in Python would be somewhat easier than in c++ for me and possibly some other sc2 enthusiasts.
Sometimes it is useful to slow down the game and look at the decisions the bot is making however the game is always really fast.
Probably we should make a configurable gamespeed parameter in BotConfig.txt similar to the original game (i.e. fast, very fast).
Currently I don't know how that should be done in a proper way. The following approach works for me:
while (coordinator.Update()) {
// Slow down game speed for better look & feel while making experiments.
sc2::SleepFor(15);
}
Probably higher step value will do the same?
Seems like the bot can't execute this strategy because he can't build reapers:
"3Rax_Reapers" : { "Race" : "Terran", "OpeningBuildOrder" : ["SCV", "SupplyDepot", "SCV", "SCV", "SCV", "Refinery", "SCV", "Barracks", "SCV", "Refinery", "SCV", "Barracks", "SCV", "Barracks", "SCV", "SupplyDepot", "SCV", "SupplyDepot", "Reaper", "Reaper", "Reaper", "Reaper", "Reaper", "Reaper", "Reaper", "Reaper", "Reaper", "Reaper", "Reaper", "Reaper", "Reaper", "Reaper", "Reaper", "Reaper", "Reaper", "Reaper", "Reaper", "Reaper"] },
And sometimes he builds extra refinery, sometimes not, also not clear why.
This is not exactly an issue. I'm finally midway finishing my AI. By somehow follow UAlbertaBot wiki as suggested on the bottom page.
And I want to test it, not against SC2 Computer / BOT. but, against a player (Non-AI) or at least I can test the AI my self.
So, is there any documentation on what to do? or something to change on the code side.
if there is one already and I'm somehow missing it, I'm sorry.
And Thank you in advance.
How?
Hello and Happy holidays to everyone.
This is not issue, i would just like to ask you for advice.
I want to use this CommandCenter for deep learning research, and i want to train neural network for commanding squad of units in battle. I would like to ask you if i need to use some framework for this, and if you know about some helpful programs that i could use.
I would also like to ask you for any general or specific advices, you could give me about this.
Marry Christmas and Happy New Year.
Currently CommandCenter uses only workers for scouting tasks. However zergs gameplay is reacher:
a. An overlord could be used to scout the enemies position before (instead?) a worker.
b. When current map contains > 2 players starting points the bot should send an overlord to one direction ( e.g, clockwise) and a worker to another in order to find the enemy faster.
Probably the overlord scouting should be optional and enabled via special flag (as it is a bit risky esoecially against terran) or even used instead of worker scouting (not sure).
After running "cmake .", in the compilation process:
.... commandcenter/src/BuildingPlacer.cpp: In member function 'sc2::Point2D BuildingPlacer::getRefineryPosition()': ........./commandcenter/src/BuildingPlacer.cpp:244:33: error: invalid initialization of reference of type 'const sc2::Unit&' from expression of type 'const sc2::Unit* '
if (!Util::IsGeyser(unit))
There are also other problems in BuildingPlacer.cpp with request for member 'pos' in 'unit' pointer.
src/CMakeFiles/CommandCenter.dir/build.make:278 with failure of the instructions for the target
Thank you very much for your work and sorry for my bad english.
Now I try to morph hatchery to lair. But, It dosen't work properly.
I also insert the word "Lair" in "BotConfig.txt"file, the program always skip this build.
I don't know why this program skip morph lair.
Also I already check conditions for morph lair(builting sporning pool, 150 minerals and 100 gas).
How can I made hatchery morph to lair??
Can you give me any hint to solve this problem??
Hi , could anyone help me?
when i do last step on linux:
$ git clone https://github.com/davechurchill/commandcenter.git && cd commandcenter
$ cmake .
$ make
it throws me error:
[ 2%] Building CXX object src/CMakeFiles/CommandCenter.dir/BaseLocation.cpp.o
In file included from /mnt/minerva1/nlp/projects/ai_in_games19/opt/local/include/sc2api/sc2_proto_interface.h:5:0,
from /mnt/minerva1/nlp/projects/ai_in_games19/opt/local/include/sc2api/sc2_unit.h:6,
from /mnt/minerva1/nlp/projects/ai_in_games19/opt/local/include/sc2api/sc2_interfaces.h:13,
from /mnt/minerva1/nlp/projects/ai_in_games19/opt/local/include/sc2api/sc2_api.h:3,
from /mnt/minerva1/nlp/projects/ai_in_games19/s2client-api/commandcenter/src/Common.h:17,
from /mnt/minerva1/nlp/projects/ai_in_games19/s2client-api/commandcenter/src/BaseLocation.h:3,
from /mnt/minerva1/nlp/projects/ai_in_games19/s2client-api/commandcenter/src/BaseLocation.cpp:1:
/mnt/minerva1/nlp/projects/ai_in_games19/opt/local/include/s2clientprotocol/sc2api.pb.h:17:2: error: #error This file was generated by an older version of protoc which is
#error This file was generated by an older version of protoc which is
^
/mnt/minerva1/nlp/projects/ai_in_games19/opt/local/include/s2clientprotocol/sc2api.pb.h:18:2: error: #error incompatible with your Protocol Buffer headers. Please
#error incompatible with your Protocol Buffer headers. Please
^
/mnt/minerva1/nlp/projects/ai_in_games19/opt/local/include/s2clientprotocol/sc2api.pb.h:19:2: error: #error regenerate this file with a newer version of protoc.
#error regenerate this file with a newer version of protoc.
^
In file included from /mnt/minerva1/nlp/projects/ai_in_games19/opt/local/include/s2clientprotocol/sc2api.pb.h:31:0,
from /mnt/minerva1/nlp/projects/ai_in_games19/opt/local/include/sc2api/sc2_proto_interface.h:5,
from /mnt/minerva1/nlp/projects/ai_in_games19/opt/local/include/sc2api/sc2_unit.h:6,
from /mnt/minerva1/nlp/projects/ai_in_games19/opt/local/include/sc2api/sc2_interfaces.h:13,
from /mnt/minerva1/nlp/projects/ai_in_games19/opt/local/include/sc2api/sc2_api.h:3,
from /mnt/minerva1/nlp/projects/ai_in_games19/s2client-api/commandcenter/src/Common.h:17,
from /mnt/minerva1/nlp/projects/ai_in_games19/s2client-api/commandcenter/src/BaseLocation.h:3,
from /mnt/minerva1/nlp/projects/ai_in_games19/s2client-api/commandcenter/src/BaseLocation.cpp:1:
/mnt/minerva1/nlp/projects/ai_in_games19/opt/local/include/s2clientprotocol/common.pb.h:17:2: error: #error This file was generated by an older version of protoc which is
#error This file was generated by an older version of protoc which is
^
/mnt/minerva1/nlp/projects/ai_in_games19/opt/local/include/s2clientprotocol/common.pb.h:18:2: error: #error incompatible with your Protocol Buffer headers. Please
#error incompatible with your Protocol Buffer headers. Please
^
/mnt/minerva1/nlp/projects/ai_in_games19/opt/local/include/s2clientprotocol/common.pb.h:19:2: error: #error regenerate this file with a newer version of protoc.
#error regenerate this file with a newer version of protoc.
^
In file included from /mnt/minerva1/nlp/projects/ai_in_games19/opt/local/include/s2clientprotocol/sc2api.pb.h:32:0,
from /mnt/minerva1/nlp/projects/ai_in_games19/opt/local/include/sc2api/sc2_proto_interface.h:5,
from /mnt/minerva1/nlp/projects/ai_in_games19/opt/local/include/sc2api/sc2_unit.h:6,
from /mnt/minerva1/nlp/projects/ai_in_games19/opt/local/include/sc2api/sc2_interfaces.h:13,
from /mnt/minerva1/nlp/projects/ai_in_games19/opt/local/include/sc2api/sc2_api.h:3,
from /mnt/minerva1/nlp/projects/ai_in_games19/s2client-api/commandcenter/src/Common.h:17,
from /mnt/minerva1/nlp/projects/ai_in_games19/s2client-api/commandcenter/src/BaseLocation.h:3,
from /mnt/minerva1/nlp/projects/ai_in_games19/s2client-api/commandcenter/src/BaseLocation.cpp:1:
/mnt/minerva1/nlp/projects/ai_in_games19/opt/local/include/s2clientprotocol/data.pb.h:17:2: error: #error This file was generated by an older version of protoc which is
#error This file was generated by an older version of protoc which is
^
/mnt/minerva1/nlp/projects/ai_in_games19/opt/local/include/s2clientprotocol/data.pb.h:18:2: error: #error incompatible with your Protocol Buffer headers. Please
#error incompatible with your Protocol Buffer headers. Please
^
/mnt/minerva1/nlp/projects/ai_in_games19/opt/local/include/s2clientprotocol/data.pb.h:19:2: error: #error regenerate this file with a newer version of protoc.
#error regenerate this file with a newer version of protoc.
^
In file included from /mnt/minerva1/nlp/projects/ai_in_games19/opt/local/include/s2clientprotocol/sc2api.pb.h:33:0,
from /mnt/minerva1/nlp/projects/ai_in_games19/opt/local/include/sc2api/sc2_proto_interface.h:5,
from /mnt/minerva1/nlp/projects/ai_in_games19/opt/local/include/sc2api/sc2_unit.h:6,
from /mnt/minerva1/nlp/projects/ai_in_games19/opt/local/include/sc2api/sc2_interfaces.h:13,
from /mnt/minerva1/nlp/projects/ai_in_games19/opt/local/include/sc2api/sc2_api.h:3,
from /mnt/minerva1/nlp/projects/ai_in_games19/s2client-api/commandcenter/src/Common.h:17,
from /mnt/minerva1/nlp/projects/ai_in_games19/s2client-api/commandcenter/src/BaseLocation.h:3,
from /mnt/minerva1/nlp/projects/ai_in_games19/s2client-api/commandcenter/src/BaseLocation.cpp:1:
/mnt/minerva1/nlp/projects/ai_in_games19/opt/local/include/s2clientprotocol/debug.pb.h:17:2: error: #error This file was generated by an older version of protoc which is
#error This file was generated by an older version of protoc which is
^
/mnt/minerva1/nlp/projects/ai_in_games19/opt/local/include/s2clientprotocol/debug.pb.h:18:2: error: #error incompatible with your Protocol Buffer headers. Please
#error incompatible with your Protocol Buffer headers. Please
^
/mnt/minerva1/nlp/projects/ai_in_games19/opt/local/include/s2clientprotocol/debug.pb.h:19:2: error: #error regenerate this file with a newer version of protoc.
#error regenerate this file with a newer version of protoc.
I have several suggestion regarding the bot's config:
a. BotConfigs has .txt extension by some reason while it is .json. Could it be renamed? The .txt extension confuses IDEs and disables syntax highlight, making it easier to make a mistake.
b. Rename BotConfig.txt into Botconfig.example.txt (or something like it). The motivation: this config is just a general example. As a user of this project I have several different settings, especially regarding map path and have to rebase the settings on each change.
The example should be renamed manually (or during build) into BotConfig.txt while BotConfig.txt must be ignored in .gitignore.
This approach allows to keep local changes outside of git control while still receive the latest updates. Just for convenience.
// TODO: fix this so we can actually expand
//return m_bot.Bases().getNextExpansion(Players::Self);
in BuildingManager.cpp
note: i've been banging my head against the wall trying to figure out where a valid location for the next hatchery, etc...
maybe someone else can figure this out so i can go back to combat coding. =] thanks.
The following are two last compilation issues on OS X and probably Linux:
diff --git a/src/BotAssert.cpp b/src/BotAssert.cpp
index 10eab6e..2aaf9ec 100644
--- a/src/BotAssert.cpp
+++ b/src/BotAssert.cpp
@@ -11,7 +11,7 @@ namespace Assert
struct tm tstruct;
char buf[80];
//tstruct = *localtime(&now);
- localtime_s(&tstruct, &now);
+ localtime_r(&now, &tstruct);
strftime(buf, sizeof(buf), "%Y-%m-%d_%X", &tstruct);
for (size_t i=0; i<80; ++i)
@@ -29,8 +29,8 @@ namespace Assert
{
va_list args;
va_start(args, msg);
- //vsprintf(messageBuffer, msg, args);
- vsnprintf_s(messageBuffer, 1024, msg, args);
+ vsprintf(messageBuffer, msg, args);
+ //vsnprintf_s(messageBuffer, 1024, msg, args);
va_end(args);
}
Actually I don't know what was original intention thus not sure which fix should be applied.
First, by some reason the compiler fails to find localtime_s. I used localtime_r which is multythread version but I don't think that this fix is correct.
Second, vsnprintf_s is Windows specific. The code contains both versions. Is it forgotten code or there is something behind?
I am developing a StarCraft2 Ladder platform based on the commandcenter, which lets bots play automatically. However, I cannot find the api of getting the match result. How can I get the outcome of a match?
Thanks.
@alkurbatov I changed the json library which may have broken the linux build, would you mind having a look?
Hi,
I've been using your project for my undergraduate projects and I am not able to run the bot anymore after merging your latest changes. I am now getting the warning
LNK4098 defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library
followed by 80 linker errors (LNK2001) all related to the new class UnitType.
And when I try to add this flag, I get over 3000 errors.
The runtime library setting in Project Properties -> C/C++ -> Code Generation -> Runtime Library
is set to Multi-threaded Debug (/MTd) for my debug settings (Debug|x64). I tried the other values with no success.
Do you have an idea of what I need to do?
Thank you,
Raphaël Royer-Rivard
After following the steps on Windows, when I run the .exe, I get this error:
Launched SC2 (C:\Program Files (x86)\StarCraft II\Versions\Base56787\SC2_x64.exe), PID: 5192
Waiting for connection...
Connected to 127.0.0.1:8167
CreateGame request returned an error code: Invalid Map Path
CreateGame request returned error details: map_path file doesn't exist.
Assertion failed: is_game_created, file c:\projects\s2client-api\src\sc2api\sc2_coordinator.cc, line 511
In the BotConfig.txt, I have this :
...
"Game Info" :
{
"BotRace" : "Random",
"EnemyRace" : "Random",
"MapFile" : "InterloperLE.SC2Map",
"StepSize" : 1
},
...
I already have this map in C:\Program Files (x86)\StarCraft II\Maps\Ladder2017Season3
, should it be elsewhere ?
Hi, i am trying to make command center work on windows, but when the game starts it trows error.
Could someone help me please?
if I run CommandCenter_d.exe then
WaitJoinGame finished successfully
vc\tools\msvc\14.10.25017\include\vector
line 1754
expression: vector subscript out of range
if run CommandCenter.sln by local windows debuger
then
WaitJoinGame finished successfully
stdthrow.cpp
line 1760
CommandCenter_d.exe has triggered a breakpoint. occurred
Unhandled exception at 0x00007FF7FC27DCBC in CommandCenter_d.exe: An invalid parameter was passed to a function that considers invalid parameters fatal. occurred
if I run CommandCenter.sln by local windows debuger again
then
did not get a join game response
error in returning observation
the main response is of type 12
there is no response/observation message
no error strings in result
I am developing the starcraft2 ladder platform based on the commandcenter and I find it it hard to get the match result.
Could you please expose the match result api? Thanks.
I don't know how to change this option.
Clearly, the BotConfig.txt:
"ScoutCondition" : [ ["Self", "Pylon"], ">", [ 0 ] ],
but probe always go scout as the game starts.
[ 2%] Building CXX object src/CMakeFiles/CommandCenter.dir/BuildingManager.cpp.o
/home/sklett/starcraft/s2client-api/commandcenter/src/BuildingManager.cpp: In member function ‘void BuildingManager::constructAssignedBuildings()’:
/home/sklett/starcraft/s2client-api/commandcenter/src/BuildingManager.cpp:180:48: error: invalid user-defined conversion from ‘sc2::Unit’ to ‘const sc2::Unit*’ [-fpermissive]
if (Util::IsGeyser(unit) && Util::Dist(b.finalPosition, unit->pos) < 3)
^
In file included from /opt/local/include/sc2api/sc2_interfaces.h:13:0,
from /opt/local/include/sc2api/sc2_api.h:3,
from /home/sklett/starcraft/s2client-api/commandcenter/src/Common.h:3,
from /home/sklett/starcraft/s2client-api/commandcenter/src/BuildingManager.cpp:1:
/opt/local/include/sc2api/sc2_unit.h:182:5: note: candidate is: sc2::Unit::operator sc2::Tag() const
operator Tag() const { return tag; }
^
/opt/local/include/sc2api/sc2_unit.h:182:5: note: no known conversion from ‘sc2::Tag {aka long unsigned int}’ to ‘const sc2::Unit*’
In file included from /home/sklett/starcraft/s2client-api/commandcenter/src/BuildingManager.cpp:5:0:
/home/sklett/starcraft/s2client-api/commandcenter/src/Util.h:29:10: note: initializing argument 1 of ‘bool Util::IsGeyser(const sc2::Unit*)’
bool IsGeyser(const sc2::Unit * unit);
^
/home/sklett/starcraft/s2client-api/commandcenter/src/BuildingManager.cpp:180:85: error: base operand of ‘->’ has non-pointer type ‘sc2::Unit’
if (Util::IsGeyser(unit) && Util::Dist(b.finalPosition, unit->pos) < 3)
^
/home/sklett/starcraft/s2client-api/commandcenter/src/BuildingManager.cpp:182:36: error: invalid user-defined conversion from ‘sc2::Unit’ to ‘const sc2::Unit*’ [-fpermissive]
geyser = unit;
^
In file included from /opt/local/include/sc2api/sc2_interfaces.h:13:0,
from /opt/local/include/sc2api/sc2_api.h:3,
from /home/sklett/starcraft/s2client-api/commandcenter/src/Common.h:3,
from /home/sklett/starcraft/s2client-api/commandcenter/src/BuildingManager.cpp:1:
/opt/local/include/sc2api/sc2_unit.h:182:5: note: candidate is: sc2::Unit::operator sc2::Tag() const
operator Tag() const { return tag; }
^
/opt/local/include/sc2api/sc2_unit.h:182:5: note: no known conversion from ‘sc2::Tag {aka long unsigned int}’ to ‘const sc2::Unit*’
/home/sklett/starcraft/s2client-api/commandcenter/src/BuildingManager.cpp: In member function ‘void BuildingManager::drawBuildingInformation()’:
/home/sklett/starcraft/s2client-api/commandcenter/src/BuildingManager.cpp:352:9: warning: unused variable ‘yspace’ [-Wunused-variable]
int yspace = 0;
^
/home/sklett/starcraft/s2client-api/commandcenter/src/BuildingManager.cpp: In member function ‘sc2::Point2D BuildingManager::getBuildingLocation(const Building&)’:
/home/sklett/starcraft/s2client-api/commandcenter/src/BuildingManager.cpp:413:12: warning: unused variable ‘numPylons’ [-Wunused-variable]
size_t numPylons = m_bot.UnitInfo().getUnitTypeCount(Players::Self, Util::GetSupplyProvider(m_bot.GetPlayerRace(Players::Self)), true);
^
src/CMakeFiles/CommandCenter.dir/build.make:110: recipe for target 'src/CMakeFiles/CommandCenter.dir/BuildingManager.cpp.o' failed
make[2]: *** [src/CMakeFiles/CommandCenter.dir/BuildingManager.cpp.o] Error 1
CMakeFiles/Makefile2:85: recipe for target 'src/CMakeFiles/CommandCenter.dir/all' failed
make[1]: *** [src/CMakeFiles/CommandCenter.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
Please post suggestions or fixes to tech tree here
Config file could not be found, and is required for starting the bot
Please read the instructions and try again
logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.
[Process completed]
This is the result of running the CommandCenter executable. The BotConfig.txt is located in the bin folder with the executable. The only change I made to it was the map to be played on. I believe I've followed all the instructions for the Mac install. I had to edit a file in the the s2client-api code, comment out line 17867 in civetweb.c, to stop warnings from being treated as errors. The only part I wasn't sure about was downloading the maps from https://github.com/Blizzard/s2client-proto#downloads
. I downloaded one map pack and extracted the map files in to a folder that I created in my starcraft2 application called maps. I had to create maps folder because there wasn't a folder with that name already.
Does anyone have a suggestion for what I may have done wrong?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.