Skip to Content, Navigation, or Footer.
The Daily Cardinal Est. 1892
Friday, April 19, 2024

UW students train computers to play angry birds

Artificial Intelligence is defined as the ability for a machine such as a computer to perform functions analogous to learning and decision making. This past summer undergraduates Anjali Narayan-Chen and Liqi Xu taught the computer how to play Angry Birds. Angry birds is a popular game where using a slingshot, the player shoots wingless birds to kill pigs. And like other games, there are several levels of difficulty, different sizes and colors of birds, and different obstacles. With each game, new birds and special abilities can be activated by the player.

Narayan-Chen and Xu originally met each other in Computer Science 540 (an introductory course about artificial intelligence). Their passion drove them to find opportunities to delve further into the field. Computer sciences and biostatistics & medical informatics professor Jude Shavlik directed them to the Angry Birds Artificial Intelligence Competition. The competition itself was newly introduced and was in its second year running.

The task of the competition was to autonomously and without human intervention successfully play Angry Birds. All participants of the competition were given a basic game playing software with which to work. The competition had three rounds where new Angry Bird levels of increasing difficulty were given to programs created by competitors. For the qualification round, all agents had 40 minutes to solve about ten levels. 20 teams submitted their programs for the qualification round, but only eight were chosen to compete in the international competition. In the quarter finals, semi-finals and finals, all agents were given 30 minutes to play eight levels. The last round contained levels that even humans would have a hard time solving.

The Universiy of Wisconsin-Madison team was the only U.S. team and was also the only team with undergraduates. The competition itself took place at the International Joint Conference on Artificial Intelligence in Beijing, China this past August. Xu attended the competition in person while Narayan-Chen visually attended via Skype as remote participation was acceptable. The team won third place, earning $500. “We all bought angry bird plush toys with part of that money,” said Narayan-Chen.

Leading up the competition, Narayan-Chen, Xu and Shavlik worked on improving the base code. They fed games into approximately a dozen computers. In order to let the computer autonomously play the game, they collected data over a month by letting the computers make shots at the pigs. By the end, they collected over 3,000,000 shots. They used this data to improve the code so that it could judge the trajectories of the shots. “We marked each shot that killed a pig as a ‘good’ shot and all other shots as ‘bad,’” said Narayan-Chen.

From there, they also had to account for all the different circumstances such as the different birds and the colors of the birds, the location of the pigs, and the method to activate the shot. They also had to define a win and a loss and how to play different levels for the computer.

“Every time the computer slung a bird and made a shot, the screen took a picture of the screen and at each grid point, it recognized different objects such as the presence of sky or the presence of a pig,” said Narayan-Chen.

“[The most exciting aspect of working toward the competition] was seeing all the excitement of the undergraduates. Plus it is fun working on video games since one can directly and quickly see the performance of the learning algorithm and relatively easily figure out what smart and stupid things it is doing.” said Shavlik.

Narayan-Chen, Xu and Shavlik used Bayesian networks software for their program. BN software is a probabilistic graphical method that relates all variables of interest. Using a simple algorithm model, they created a program that could play Angry Birds from the array of data it was given.

The algorithms used for this program were “everyday practice of professor Beth Burnside of the UW Medical School, who is a practicing radiologist as well as a biomedical-informatics researcher,” commented Shavlik.

Narayan-Chen and Xu stated they were interested in going for another round and want to compete in the 2014 Angry Birds Artificial Intelligence competition.

Enjoy what you're reading? Get content from The Daily Cardinal delivered to your inbox
Support your local paper
Donate Today
The Daily Cardinal has been covering the University and Madison community since 1892. Please consider giving today.

Powered by SNworks Solutions by The State News
All Content © 2024 The Daily Cardinal