Bot Name: PurpleWave Bot Race: All races; Primarily Protoss Author Name(s): Dan Gant Affiliation(s): -- Nationality(s): USA Occupation(s): Software engineer Bot URL: https://github.com/dgant/PurpleWave Personal URL: http://dangant.com Affiliation URL: -- Q: What is the overall strategy/strategies of your bot? Why did you choose them? PurpleWave plays a fairly complete package of pro-style Protoss strategies. Almost anything that's objectively good and can be executed with the existing micro skills and building placement is in there. There are aggressive strategies, economic strategies, and some delightfully cheesy strategies too. Q: Do you incorporate learning of any form in your bot? If so, how was it accomplished? PurpleWave chooses strategies based on results of previous games against the same opponent, race, map, and number of starting positions. It has a graph of strategy selections, like opening build orders paired with mid game transitions and late-game compositions. Q: Please describe all AI techniques / algorithms used in your bot. PurpleWave's high-level decision-making is structured as a task network. A strategy comprises a graph of modular tasks that allows re-use across different strategies. Each strategy assigns priorities to each of its tasks, which allows for centralized delegation of resources like minerals, supply, or units. Tasks don't directly command their allocated units, but pass down goals for them to pursue. The units themselves operate mostly independently, trying to safely achieve their assigned goals. I use a fast clustering algorithm to form ad-hoc combat squads, and to identify where fights are happening. For each fight, I estimate the outcome with a simple "what would happen if these units smashed into each other" simulator. For performance purposes, the simulator ignores terrain and collisions. But I weigh the simulated results with a few heuristic weights, to prefer fighting on favorable terrain and and apply varying degrees of hysteresis based on my units' ability to enter or leave the fight at will. For example: Avoid attacking into narrow chokes Dragoons don't need much convincing to fight or retreat from Marines since they can duck out of combat easily. But Zealots against Siege Tanks need to either commit or avoid fighting entirely. Units decide to fight or flee based partly on the results of that simulation, but are also empowered to dissent in appropriate situations. For example, if a unit's simulated contribution to the fight was very high (like a cheap unit about to kill an expensive unit) it can opt to keep fighting. Or a Dragoon facing slow enemy Zealots nearby can opt to safely kite those zealots. The net result is having units that are opportunistic and flexible, if a bit unruly at times. Philosophically, I aim to design PurpleWave to operate mostly statelessly. The upshot is simplicity: Less statefulness means less opportunity to introduce bugs in state transitions. Q: How did you become interested in Starcraft AI? Back in 5th grade, I loved building WarCraft II campaigns and customizing the AI scripts. Afterwards I got into game AI competitions and writing AI for WarCraft III custom maps. When I found out this year that Brood War AI was going strong, I felt compelled to try my hand at it! Frankly, I think I just like making little people on a screen do clever things. Q: How long have you been working on your bot? Since January of this year (2017). Q: About how many lines of code is your bot? Currently 23,162 lines across 739 files. Q: Why did you choose the race of your bot? I wanted the first version of PurpleWave to do something simple and effective that nobody else was doing. So I had it do a proxy 2-Gateway rush. And it's primarily played Protoss since. But I've intended for it to play all three races from the beginning. Q: Did you use any existing code as the basis for your bot? If so, why, and what did you change? I use BWMirror for communication with BWAPI. Q: What do you feel are the strongest and weakest parts of your bot's overall performance? PurpleWave thrives on its unit micro, combat selection, and efficient macro execution. In particular, it's very good at using Dragoons in open areas, Dark Templars to evade or snipe detection, and using Carriers to abuse terrain features. It struggles with some defensive skills, like defensive building placement and proactively preventing expansion harassment. Q: If you competed in previous tournaments, what did you change for this year's entry? I competed in CIG 2017. Since then I almost completely rewrote PurpleWave's micro -- it's now much smarter at choosing and committing to fights and maneuvering ranged units. It's also equipped with much tighter build orders. Q: Have you tested your bot against humans? If so, how did it go? Poorly. It'd fare well on the ladder but anyone resembling a pro player beats it. Q: Any other projects you're working on that you'd like to advertise? If you play Magic: the Gathering, try http://ComboDeck.net to help you craft your next deck! Optional Opinion Questions: Q: What is your opinion on the current state of StarCraft AI? How long do you think before computers can beat humans in a best-of-7 match? We're beating most amateurs, but pros are playing on a far higher level. I'd bet the under on 5 years, but I wouldn't be shocked if it took far longer. Q: What do you feel is the biggest hurdle (technological or otherwise) in improving your bot's AI? We're close to the ceiling of what can be achieved with rules-based bots. We can improve incrementally, but pro players are at a level of refinement we're just not going to achieve this way. Bot authors certainly don't know everything a pro knows, and even a pro isn't consciously aware of everything they know. Machine learning will be the way forward. Q: Which bots are the most interesting to you and why? I really admire tscmoo's micro. The way its armies move, especially its Zerg units, is both beautiful and horrifying. I've learned a lot from reading tscmoo, Iron bot, Skynet, and UAlbertaBot. The ways they approach playing the game and navigate the gnarly Brood War engine have inspired a lot of the approaches I've used in PurpleWave.