Open Teaser
petalz-teaser

Evolutionary Algorithms and User-Generated Content in PETALZ

Alex J. Champandard on July 24, 2012

While procedural generation techniques have been sweeping the indie games scene, and incrementally making their way to AAA consoles, social games have yet to make the most of them. The algorithms used to procedurally generate content for typical games on social networks need to be very different than what's otherwise done on PC. Yet, there is a lot of promise for both innovative gameplay and new business models.

In an interview last Sunday, broadcast live via AiGameDev.com, Ken Stanley and Sebastian Risi discussed the applications of evolutionary algorithms to their upcoming social gardening game, PETALZ. In integrating an evolutionary technique called NEAT into Flash, the game is breaking new ground in a variety of different areas...

NOTE: On Sundays at 18:00 UTC, AiGameDev.com broadcasts interviews or masterclasses on the topic of artificial intelligence in games. You can attend those live free! The replays are available for two weeks for PLUS Subscribers, and higher memberships like PREMIUM and ULTIMATE also give you full access to the edited recordings afterwards.

Screenshot 1: Family tree of a particular flower in PETALZ, including contributions from multiple players, breeding two plants together as well as single-plant mutations.

Collaborative Breeding

Stanley's research lab at the University of Central Florida, is famous for its work in two areas: firstly, for applying evolutionary algorithms into games — such as Galactic Arms Race (GAR) and Neuro-Evolved Robotic Operatives (NERO); secondly, for user-driven evolutionary explorations such as PicBreeder. Combining these two approaches together turns out to be very well suited to social games.

In PETALZ, the players controls the evolutionary algorithm by selectively breeding flowers together, or mutating single flowers and picking the prefered offspring. Each flower can then be shared with friends, who can then continue the breeding process. Some flowers have involved already dozens of players to create.

Screenshot 2: An example flower with a simplified representation of the pattern-producing network (CPPN) on the right, and its DNA parameters on the left.

Crafting Unique Content

In terms of content, PETALZ distinguishes itself from many other social games by allowing players to craft unique flowers. This adds a much more personal touch to the game, and a strong sense of ownership over the core elements of the game. Flowers that are sent as gifts to friends carry more meaning because of it.

The underlying procedure is a Flash implementation of Hyper-NEAT, which evolves pattern-producing networks known as CPPN. The CPPN is made up of a variety of pattern nodes such as Gaussian functions, sine and cosine waves, as well as mirroring functions, etc. See this paper for details:

Exploiting Regularity Without Development
Ken Stanley
Download PDF

Risi discusses the specifics of applying the algorithm to flowers in the interview.

Exploring Flower Space

On the meta-level, PETALZ is an interesting experiment that fits into Stanley's research perfectly. Given a large space of possible phenotypes (in this case flowers), how do humans and machines combine to explore the space of options? Machines on the one hand have no sense of what's interesting, while humans may not be as exhaustive or creative (in a random way).

Stanley's recent keynote at ON SPLASH 2011, called "Searching Without Objectives" digs into some of these topics. Evolutionary algorithms benefit from not being driven towards a particular goal, and humans in this case can provide the exploration.

NOTE: The broadcast replay of this interview is available for another week to PLUS, PREMIUM and ULTIMATE members on AiGameDev.com. You can find it from the the broadcasts page.

Discussion 2 Comments

speps on July 25th, 2012

The PDF download link is broken :)

aerton on July 31st, 2012

I believe it's the same as http://eplex.cs.ucf.edu/papers/stanley_aaaifs06.pdf

If you'd like to add a comment or question on this page, simply log-in to the site. You can create an account from the sign-up page if necessary... It takes less than a minute!