Agents fail on update
I recently noted that there had been a lot of changes since i last updated (I believe end of July) and decided to update via pip install --upgrade https://github.com/deepmind/pysc2/archive/master.zip
I now get the following errors when attempting to run "$ python -m pysc2.bin.agent --map Simple64" or $ python -m pysc2.bin.agent --map CollectMineralShards --agent pysc2.agents.scripted_agent.CollectMineralShards" as given in the readme
Traceback (most recent call last):
File "C:\Python\lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "C:\Python\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Python\lib\site-packages\pysc2\bin\agent.py", line 164, in
If someone could tell me what's going wrong here or how i can roll back to a version before this problem, that would be greatly appreciated (yes, i foolishly did not back-up before running this update) Edit: I found and backversioned to 2.0.2 through pip and everything is running again, but am obviously missing any changes since that release
Hi @tewalds
This issue and question here is from September and still, there is no reply. pycs2 with the latest starcraft version is not working for me as well for a number of other people. It seems like testing was not on the very high level before the release.
But even if it was the case, I didn't know what could prevent replying to the question for almost half a year and fixing the issue reported by the community.
I'm having the same issue when trying to run the prepare datasets function from this repo. Python 3.7, Windows 10, latest version 3.0.0 of PySC2, and version 5.0.9 of the game, trying to process version 4.7.1 replays. Would be cool to see this get updated/some insight into the error. Unless this repo is about to be archived or something...
Narrowed it down to this section from /pysc2/lib/features.py
@sw.decorate
def available_actions(self, obs):
"""Return the list of available action ids."""
available_actions = set()
hide_specific_actions = self._agent_interface_format.hide_specific_actions
for i, func in six.iteritems(actions.FUNCTIONS_AVAILABLE):
if func.avail_fn(obs):
available_actions.add(i)
for a in obs.abilities:
if a.ability_id not in actions.ABILITY_IDS:
logging.warning("Unknown ability %s seen as available.", a.ability_id)
continue
found_applicable = False
for func in actions.ABILITY_IDS[a.ability_id]:
if func.function_type in actions.POINT_REQUIRED_FUNCS[a.requires_point]:
if func.general_id == 0 or not hide_specific_actions:
available_actions.add(func.id)
found_applicable = True
if func.general_id != 0: # Always offer generic actions.
for general_func in actions.ABILITY_IDS[func.general_id]:
if general_func.function_type is func.function_type:
# Only the right type. Don't want to expose the general action
# to minimap if only the screen version is available.
available_actions.add(general_func.id)
found_applicable = True
break
if not found_applicable:
raise ValueError("Failed to find applicable action for {}".format(a))
return list(available_actions)
I'll try and do some print outs and debugging on my end to see if I can somehow clumsily figure this out for anyone new (like me) trying to get setup with SC2 RL
Got same problem in pysc2 4.0.0. Any updates here ?
I got same problem in pysc2 4.0.0. It's been almost 4 years, is there any solution?