In numerous different types of games, the real-time strategy (RTS) ones have always been the focus of gaming competitions, and in this regard, StarCraft can arguably be considered a classic real-time strategy game. Currently, most of the artificial intelligence (AI) players for real-time strategy games cannot reach or get close to the same intelligent level of their human opponents. In order to enhance the ability of Al players and hence improve the playability of games, in this study, we make an attempt to develop for StarCraft a mechanism learning to select an appropriate action to take according to the circumstance. Our empirical results show that action selection can be learned by AI players with the optimization capability of genetic algorithms and that cooperation among identical and/or different types of units is observed. The potential future work and possible research directions are discussed. The developed source code and the obtained results are released as open source.