Sc2 Not Available When Initializing Game Mode

OpenAI Gym Environments for the StarCraft II PySC2 environment.

  1. You must have logged in to the game at least once within the last 30 days before you can launch it in offline mode. Matchmaking (versus mode) is not available when playing offline. Battle.net social features are not available when playing offline. Your activity in offline mode will not count towards your account stats and achievements.
  2. Co op, Versus, and literally every game mode in my game other than offline campaign load literally no info and the play buttons say 'Not available when initializing gamemode' all the time. All I could do is test my map using a method I saw in a video (dragging the map file to SC2Switcherx64.exe shortcut I made).

Discuss Arcade, custom map creation and the StarCraft II map editor. Receive support for technical issues while installing or running the game. Hello I'm new here and i didnt know how to solve this. I keep getting after installing the game 'not available while initializing game mode' i really want to start playing vs ai and 1v1.

Installation:

After cloning the repository, you can use the environments inone of two ways:

  1. Add the directory where you cloned the repo to your PYTHON_PATH
  2. Install the package in development mode using pip: pip install -e .

If you use the first option, you need to manually make sure thedependencies are installed.

Sc2 Not Available When Initializing Game Mode

The second option will install the package into your pip environmentas a link to the directory, so it will reflect the changes whenyou git pull or make any changes to the code.

Usage:

You need the following minimum code to run any environment:

Import gym and this package:

Import and initialize absl.flags: (this is due to pysc2 dependency)

Create and initialize the specific environment as indicated in thenext section.

Available environemnts:

SC2Game:

The full StarCraft II game environment. Initialize as follows:

Starcraft 2 Not Available While Initializing Game Mode Mac

Versions:

  • SC2Game-v0: The full game with complete access to action andobservation space.
When

Sc2 Not Available When Initializing Game Mode Ps4

Notes:

  • The action space for this environment doesn't require the call tofunctionCall like pysc2 does. You just need to call it with anarray of action and arguments. For example:

    It will check the first element in the array (the action) and makesure it's available before trying to pass it along to thepysc2 environment.

  • This environment doesn't specify the observation_space andaction_space members like traditional gym environments. Instead,it provides access to the observation_spec and action_spec objectsfrom the pysc2 environment.

MoveToBeacon:

The MoveToBeacon mini game. Initialize as follows:

Versions:

  • 'SC2MoveToBeacon-v0': The observation is a [1, 64, 64] numpyarray that represents the obs.observation['screen'][_PLAYER_RELATIVE]plane from the pysc2 observation. The action is a numberbetween 0 and 4095 (64x64-1), which is a 1-d representation of thescreen coordinates to move the marine towards. The environmentpre-selects the marine at the start of each episode.
  • 'SC2MoveToBeacon-v1': The observation is a [1, 64, 64] numpyarray that represents the obs.observation['screen'][_PLAYER_RELATIVE]plane from the pysc2 observation. The action is an array oftwo numbers, each between 0 and 63, representing the screen coordinatesto move the marine towards. The environment pre-selects the marine atthe start of each episode.

CollectMineralShards:

The CollectMineralShards mini game. Initialize as follows:

Versions:

  • 'SC2CollectMineralShards-v0': The observation is a [1, 64, 64] numpyarray that represents the obs.observation['screen'][_PLAYER_RELATIVE]plane from the pysc2 observation. The action is a numberbetween 0 and 4095 (64x64-1), which is a 1-d representation of thescreen coordinates to move the marines towards. The environmentpre-selects both marines at the start of each episode.
  • 'SC2CollectMineralShards-v1': The observation is a [1, 64, 64] numpyarray that represents the obs.observation['screen'][_PLAYER_RELATIVE]plane from the pysc2 observation. The action is an array oftwo numbers, each between 0 and 63, representing the screen coordinatesto move the marines towards. The environment pre-selects the marine atthe start of each episode.
  • 'SC2CollectMineralShards-v2': The observation is a [2, 64, 64] numpyarray that represents the obs.observation['screen'][_PLAYER_RELATIVE]and the obs.observation['screen'][_SELECTED] planes from the pysc2observation. The action is an array of three numbers. The first numberis between 0 and 2, representing which control group to move.The remaining two numbers are integers between 0 and 63, representing the screen coordinatesto move the marines in this control group towards.The environment automatically creates the following control groups atthe start of each episode.Each episode starts with control group 3 pre-selected.
    • Group 1 [index 0]: Both marines
    • Group 2 [index 1]: Marine 1
    • Group 3 [index 2]: Marine 2

General Notes:

Starcraft 2 Not Available When Initializing Game Mode

  • Per the Gym environment specifications, the reset function returns anobservation, and the step function returns a tuple(observation, reward, done, info), where info is an empty dictionary andthe observation is the observation object from the pysc2 environment.The reward is the same as observation.reward, and done is equal true ifobservation.step_type is LAST.
  • In addition to step() and reset(), the environments define asave_replay() method, that takes a single parameter, replay_dir,which is the name of the replay directory to save to inside theStarCraft II/Replays/ folder.
  • All the environments have action_spec and observation_spec properties,in addition to the action_space and observation_space properties definedfor the mini game environments.
  • All the environments have the following additional properties:
    • episode: The current episode number
    • num_step: The total number of steps taken
    • episode_reward: The total reward received this episode
    • total_reward: The total reward received for all episodes
  • The examples folder contains examples of using the various environments.