AI is capable of surprising introspection — or at least what passes for it. Don’t believe us? Check out Google’s new PoemPortrait, an online experiment that “[blurs] the boundaries of AI and human collaboration.” As the portmanteau implies, it overlays self-portraits with novel poems produced by a machine learning algorithm.

Here’s how it works: You snap a selfie, which becomes the backdrop, and contribute a word to serve as the algorithm’s muse. PoemPortrait then spits out an original stanza in bright glowing text, which it wraps over the picture of your face and combines with subsequent lines to form an ever-evolving poem.

Es Devlin — a London-based artist and stage designer who works with a range of media, often mapping light and projected film onto kinetic sculptures — explains in a blog post that the algorithm, which was designed in collaboration with Google Arts & Culture Lab’s Ross Goodwin, ingested over 25 million words written by 19th century authors to learn to write the poems. Like all well-trained machine learning models, it doesn’t copy or rework existing text; instead, it builds a statistical model that maps out relationships among samples, enabling it to “predict” original phrases that emulate the corpus’ dominant style.

Google POEMPORTRAIT

Above: A PoemPortrait.

Image Credit: Google

It works well enough in practice, but PoemPortrait won’t unseat Byron or Shelley anytime soon. Given the seed word “robot,” it composed this gem: “Your robot in the forest are flying out of the sky. Sad days are dead, and the sun lies faint.”

As history has shown us, simplistic AI models like PoemPortrait struggle to create coherent narrative works, particularly when those works are on the lengthier side. That’s poised to change with the advent of Transformers, a novel type of machine learning system that’s responsible for the impressively human-like text produced by OpenAI’s recent language model and the not-entirely-inharmonious tunes from MuseNet and Google AI’s Magenta. But, for now, AI’s best work is in the visual realm.

Case in point: Disney Research recently detailed an algorithm that generates storyboards from scripts, letting creators visualize scenes before committing hours to animating them. Other researchers are experimenting with systems that can hallucinate foundational sketches of cats, fire trucks, mosquitos, and yoga poses. Companies like Promethean AI are employing machine learning to help human artists create art for video games. And some of the best machine-guided artwork comes out of the annual international RobotArt competition, which tasks contestants with designing artistically inclined AI and robotics systems.