It’s no secret that artificial intelligence is a core part design in most video games, but what can games actually teach us about the evolution of AI systems? You may be surprised to know that the now 20-year-old game StarCraft has been recognized as a tool to aid in AI research.
Heavy metal music roars as tanks, mechanized units and Marine infantry move across barren wastelands — reminiscent of 1970s science fiction novel covers.
“Give me somethin’ to shoot.”
The famous line, as spoken by the Terran Marines right before they are sent to destroy the enemy, perfectly sums up what is about to happen. They march like ants, each following the last one’s path almost exactly, as they invade enemy territory.
The game has contributed to more than just science fiction imagery. Originally released in 1998, StarCraft is a highly competitive real time strategy (RTS) computer game with incredible depth and complexity to each match — and researchers at the University of Alberta hope the game offers new insight to AI research.
The black fog of war begins a couple dozen metres in front of the first Marine, preventing him from seeing the enemy until it’s too late. Humans, aliens and parasitic lifeforms clash as screams of death and pools of blood stain the ground of distant colony planets.
This is StarCraft.
StarCraft’s complex gameplay and wide array of strategic variables lends itself well to AI programmers who write their own bots to play the game according to a particular set of strategies decided on by the programmer.
UAlbertaBot, the StarCraft-playing AI, is the brainchild of Dave Churchill, a professor at the Memorial University and formerly a PhD computing science student at the U of A. He has been programming the AI since 2010 for various StarCraft AI competitions.
“RTS game strategy AI was super new at the time and not many people were doing it. I’m a video gamer at heart and so I thought, hey this is a really cool topic,” Churchill says.
StarCraft: Brood War has been known throughout gaming circles and the internet as one of the most competitive multiplayer strategy games that exists. In South Korea, the game is celebrated with as much enthusiasm as some North American sports.
“StarCraft is like baseball,” Churchill says, referencing its popularity.
Despite its age, StarCraft still attracts new players and AI programmers alike, and there are numerous tools and resources available free on the internet. According to Churchill, StarCraft AI programming and competitions became popular around 2010 when StarCraft 2 was released.
“We had to make it from scratch in only a few months, we got some undergrads together and divided the workload,” Churchill says, describing how UAlbertaBot came together. “It had almost no defense and essentially the bot tried to get Mutalisks* as fast as possible and then micro* those Mutalisks to try and win fights.”
For those who may be confused, Mutalisks are an air unit of the Zerg race, and Churchill is referring to the strategy of micromanaging units on the battlefield.
Churchill says that he wanted UAlbertaBot to be architecture for others to use in order to create their own bots for the competition.
“These tournaments have been created to motivate the research,” he says.
Churchill’s UAlbertaBot has been the starting point for several other bots due to its well rounded nature and ability to randomly play as any of the three races in StarCraft: Terran (humans), Protoss (advanced aliens), or Zerg (insect-like aliens).
“The down side,” Churchill notes, “is that you have to be equally good with all the races.” He hopes this issue will subside once the AI has progressed enough.
Churchill says being effective in all races gives UAlbertaBot a distinct tactical advantage, as the opposing AI doesn’t know what they are up against until the first battle, but UAlbertaBot does.
As well as researching AI and improving UAlbertaBot, Churchill also organizes the AIIDE StarCraft AI Competition — one of the premiere events for AI programmers and StarCraft fans to play competitively against their peers’ creations.
YouTube videos of the matches between Churchill’s UAlbertaBot and other StarCraft bots offer a world of information and reveals the intricacy of how the bot thinks. Back on distant planets like Mar Sara or Char, two opposing forces begin their campaign to destroy the other. This time, the commanders of each faction are AIs, and the fighting is swift and calculated, but also hectic. The AI controlled armies are incredibly skilled at resource management as well, doing the important math behind the scenes in order to maximize the output of units without sacrificing time or resources.
Bots like UAlbertaBot can think and act on orders of magnitude more quickly than human players, and aren’t distracted by the images and sound effects made to entice regular gamers. They run simulations of the next engagement in their heads before it happens, finding out prematurely if they have enough firepower to win. Light and heavy units move back and forth, attacking simultaneously and independently of one another in ways that only a computer-controlled commander could organize.
The bots don’t panic when the odds are stacked against them either, they keep their cool even in the face of defeat, knowing that victory is the only action they can willingly accomplish. A human player may surrender when they believe there is no way of winning, but the bot will persist until it has run out of units or materials.
Churchill says that the end goal of StarCraft AI is to write a bot capable of winning against the best human players. “As a whole, the biggest challenge is trying to beat humans, which we’re nowhere close to yet,” he says.
This statement however, comes after Google’s Go playing AI, AlphaGo defeated the World Go champion two years ago.
In StarCraft, the human players still have the edge, at least for now. Churchill notes a particular example where a human player was able to sidestep his units out of the effective range of the AI controlled defenses, and infiltrate the enemy base unopposed.
“I think we learn a lot of things [about AI] by tackling StarCraft,” Churchill says. “We reason with uncertainty. In chess you know where all the pieces are, but in StarCraft, you don’t know where your opponent’s pieces are. Also in StarCraft, you have this real time aspect of a video game — you and your opponent are taking simultaneous moves.”
Churchill explains how variables in StarCraft are exponentially more complex than other strategy games. “In a chess game you might only have 50 moves you can do at any one time, but in StarCraft you can have millions,” Churchill says.
Mutalisk: A StarCraft air unit of the Zerg race
Micro: Strategy of micromanaging units
Editor’s Note: This is an updated verison of a published story from July 2017. Photos taken directly from reporter’s gameplay.
Editor: Kate Paton | email@example.com