google-deepmind / pysc2

StarCraft II Learning Environment
Apache License 2.0
8.03k stars 1.16k forks source link

searching detailled doc like how to make one unit attack #290

Open loicmidy opened 4 years ago

loicmidy commented 4 years ago

Hello, I'm starting to work on building an starcraft2 IA using pysc2. I followed the tutorial https://itnext.io/build-a-zerg-bot-with-pysc2-2-0-295375d2f58e. It's clear but it doesn't answer some important questions.

Is there detailled information somewhere available? What I want to do is to separate my army in several parts and send them to different locations. Idem for the drones.

The provided code in the tutorial select the whole army

_return actions.FUNCTIONS.Attack_minimap("now",self.attack_coordinates) if self.can_do(obs, actions.FUNCTIONS.select_army.id): return actions.FUNCTIONS.selectarmy("select")

Yours sincerely Loïc Midy

KingKeet commented 4 years ago

You could always select units in a rectangle using select_rect or just select each unit individually. I've never used the select_rect function before so I can't tell you how to use, but it should be the answer you're looking for.

As for a detailed document, the only thing I can tell you is to look into the actual pysc2 code (specifically actions.py) and try to search for the answers that way.