Coding Exquisite Corpse

Natalie Dixon, Junior Application Developer

Article Categories: #Code, #News & Culture

Posted on

What do coding exercises look like in the age of AI? Fun, collaborative, and whimsical if a recent Viget Dev Meeting exercise is any indication.

At the Viget Dev Offsite last fall, one of our discussion topics was how to bring more creativity, fun, and whimsy into our work. My opinion was specifically asked, as the designated “most whimsical” of the team - quite an illustrious title! I came up with an idea in the moment about some sort of abstract image/object translation into code as a team exercise. I held that conversation – and whispers of an idea – with me for months, until I was up for a slot to run our biweekly dev meeting. I knew I wanted to do something that exercised our creative thinking and collaboration skills – utilizing our uniquely human abilities in the age of AI being able to write a good amount of the actual code for us.

The Dev and PL/UI teams at our offsite in Nashville

In my brainstorming, I stumbled across a Viget.com article about The Fall 2022 Viget Development Offsite Art Show, where each developer had “ninety minutes to generate a single piece of art using code”. I thought this was a great exercise, and loved seeing the art produced from it; but in 2026, the word “generate” has a different meaning. You can generate “art”, or generate code which generates art, in two minutes with a one sentence prompt. With an AI-assisted work flow, a challenge like this would be trivial. But I liked the imagination and creativity required by it. I just wanted more, as well as an opportunity to work together and brainstorm out loud. 

I started thinking about other versions of this exercise, such as creating a game in X minutes. But I also wanted people to take turns working on it and create something together. And this reminded me of Exquisite Corpse, a Surrealist game that is a favorite of English classes, where a poem is written by a piece of paper being folded and passed around - each person contributing a sentence based only on what the person before them wrote, unable to see anything earlier. You can also play this game by drawing, where you continue the image without seeing the other segments - resulting in a strange and fanciful creature - the corpse. 

Thus I had the vision. Three groups of three developers each, who pass around 3 different “folds” - art, game, and world - building upon the work of the last group, adding their own interpretation and ideas, and then we’d see what sort of unexpected and delightful creation we’d get out of each fold. In the end, the three pieces could even come together – “unfolding the paper” – to create the whole body: the exquisite corpse. Or more accurately, likely some sort of web app game. 

I set up a repo with boilerplate for the 3 folds, so that the team would be able to get in and immediately start adding features and methods. The art fold was Python using the Python imaging library Pillow, and it started as the 2022 dev art challenge did: with a blank canvas. The game fold was a Ruby terminal game, with wasd controls for a character on a blank box to start. The world fold was the most difficult to figure out what I actually wanted to do with it, but the idea ended up being a JS lore generator of sorts, with a very short randomized list of adjectives which describe “The Land of Viget” for boilerplate. 

I had no idea if this was going to be fun, or even work, when I showed it to the team. And, since our dev meeting is only an hour, and I needed a bit of time at the beginning to explain the exercise, a bit of time at the end to debrief, and a couple minutes between each round for teams to push and pull new commits with their additions, it ended up that each team would only have 10 minutes with each fold. It’s not long, but I hoped it would be enough time to get acquainted with the new fold and even write just one new method, one new feature. The AI policy was: use it however you like, but be intentional. Stay in the spirit of the exercise. Make additions rather than rewrites. Use your human imagination.

There were some confused faces as I explained what is a somewhat complicated and convoluted exercise, but I assigned their teams and sent them off to their breakout rooms. I planned to keep time, troubleshoot, and observe the chaos with my fingers crossed as I jumped between groups.

And it was awesome to watch. Folks hit the ground running, immediately brainstorming “okay what should we do here?”. Most of the groups jumped right in with their AI of choice, though the first World group started out with basically no code. They thought about why the Land of Viget was “impossibly flat” and wrote by hand more adjectives and causes for the world lore, which I also loved to see. The groups moved fast, coming up with ideas and iterating on them. They talked and laughed. For each round, the groups switched drivers (though as Matt said, “AI has been the driver this whole time”), giving a look into each of their setups and their personal AI workflows. They ran into issues - getting handed faulty code from the last group and spending ten minutes just trying to fix it to get it to run. They had to decide whether to keep throwing the AI at a bug, or take a step back, take a closer look at the code, and approach it from a new way. There probably wasn’t enough time, it was mostly prompting and waiting, but you know what you can do while the AI is “zesting”? Talk with your teammates! At the end we came back together and got to see the final results, each team surprised with how their first fold had transformed by the end. Like a game of telephone. And everybody had fun!

Our smiling faces during a recent dev meeting!

The unfolding – creating the whole body – took a couple months for me to get around to. My original idea had been to just hand off the three folds to Claude and ask how these things could come together into a whole in a prompt one-shot. But then I had a random stroke of inspiration one day thinking about the coalescence possibilities, and so I decided I wanted to do it myself: come up with the human vision. Further the exercise by transforming divergent thinking into convergent thinking. So I spent some time brainstorming and enumerating my vision, then a morning vibecoding it all together, tweaking along the way but trying to keep as much from the original as possible. You can now play the final game - with the art aesthetics, game mechanics, and world lore. Try it out!

So it was a success! I got a bunch of senior devs to try something new, work together, constrained only by time and their imaginations (and weird AI bugs). The exercise taught us that we can be ambitious about what we can create in an hour, and showed what a coding exercise can look like in this day and age. And it was very whimsical :)

Appendix

If you'd like to try this exercise out with your team: https://github.com/vigetlabs/exquisite-corpse-boilerplate

Check out the evolution of each fold throughout the exercise!

Art Fold

After starting with a literal blank canvas, Group 1 on the Art Fold created a pleasing array of Viget-y colored circles and a pixel font.
Group 2 made it into a color changing GIF, greeting each team member by name.

Group 3 got stuck trying to deepfry the GIF. Alas.

Game Fold

In the Game Fold, Group 1 added some deadly falling scrap to the WASD boilerplate.

There were some bugs along the way, so Group 2 spent most of their time making fixes, then adding color and an explosion graphic.
Group 3 added collectible gems and a restart loop, and we ended up with something pretty fun that inspired competition amongst us to get the high score!

In the World Fold, Group 1 started out adding more adjectives, "This is because..." lines, and historical signatures. Here are some of their outputs:

The Land of Viget is fog-drenched. This is because AI.
The Land of Viget is impossibly flat. 
This is because giant kept sneezing over the lands. 
- Ferdinand Beaumont c.0.6187627135395186
The Land of Viget is slightly tilted. 
This is because giant kept sneezing over the lands. 
- Sylvester Pemberton c.0.41368134891646013
The Land of Viget is humming with low frequencies. 
This is because everyone hates harmonicas. 
- Evangeline Cartwright c.0.20367395882885453

Is the Land of Viget flat or tilted ? Maybe both ? What's up with harmonicas ?!

Group 2 got into how to handroll their own random number generator in order to add seeds for the world generation outputs, and did a bit of housekeeping with adding a README and a change log.

Group 3 went crazy with an ASCII map of the world, and even more lore from the PROPHECY, RUMOR MILL, and ENCOUNTER.

The Land of Viget is warm for this time of year. 
This is because yo mama sat there. 
- Theodore Pemberton c.0.4110129445454289

  ~ MAP OF THE LAND OF VIGET ~

+====================================================+
|      '            ,        ~~                  .   |
|   '            .        ,  ~~      ,           .   |
|           .         ,     .  ~        ,            |
|     ,          ,             '~                    |
|              ,.              ~~  ,                 |
|              ! .   .'.'.'     ~                    |
|    .     t,   . .,,.', ,,. '  ~     o      .       |
|    *TTtTtTTtT.' , '.  '.,,   ~      .              |
|   TTt*TtTTtT.    ,  . ,'   ~~  ^^^A.       .       |
|.   TtTTTTTtTt .,.'.' ,,...  ~  A^^n              , |
|  ' TT*Tt*T*TTT . .,,, .  .   ~ A#nn^    '  !       |
|     TTtttTtTT*tTT.,.. ..,  ~~  A^^A~    .   , .%   |
|          TTTTTTTTTt*ttt^^  ~.  ~~~~~~ .            |
|      . .    nTT**tTtTT^^A^~   ~~~~~~~~      ..    .|
|              ^^^A^A^A^A^AA^~  ~~~~~~~~~ .     ,    |
|      '      ^^^A^^^^^A^^^^~~,~~~~~~~~~~         '  |
|              ^nnAnA^^^A^A^  ~~~~~~~~~~~.       .   |
|  .               ^An^n       ~~~~~~~~~~            |
+====================================================+
  LEGEND: T=forest  ^=mountain  ~=water  ,=marsh
  TOWER(!)  TAVERN(o)  RUINS(%)  CASTLE(#)  TOWER(!)

PROPHECY (as foretold by Percival Ashford the Unblinking):
"Once the elders stop arguing about cheese, all bread in the land will taste of regret,
which the scholars insist is 'fine, probably'."
RUMOR MILL:
That mysterious stranger at the crossroads once arm-wrestled a bear and called it a draw.
The local bards are already writing songs about it.
ENCOUNTER:
Along a suspiciously well-maintained clearing, you come upon a tortoise wearing a tiny crown.
It waves. You wave back. Neither of you knows why.

And finally, here are some shots from the final, "Whole Body" game. Play it yourself!

Natalie Dixon

Natalie is a Junior Application Developer based in her hometown of Boulder, CO. She is passionate about communicating, creating, and problem-solving in both human and machine languages.

More articles by Natalie

Related Articles