Virgil’s Commonplace Book

Posted on:

Virgil's Commonplace Book

For NaNoGenMo 2015, my project was Virgil’s Commonplace Book, a computer-generated travel novel set in the Roman Empire. As always, the code is on Github.

There’s also a related Twitter bot, @erat_viator.

In both cases, one of the underlying motivations was to explore serendipity in publically accessible data. There’s a ton of databases of information from the Roman Empire, but sorting through the deluge of data is hard to do without context. The bot and the book add context as you explore the data.

Virgil's Commonplace Book

Posted in Uncategorized | Comments Off on Virgil’s Commonplace Book

Gravity on

Posted on:


I’ve updated Gravity so that it works in current browsers.

I took the opportunity to tweak a couple of things. The biggest change, though, is that it’s now hosted on

Invisible Cities

Posted on:

The deepdream animation I was working on is now complete! I used a custom-written script to switch between guide images, using photos from my personal collection. Even with a guide image, the results can be surprising: the reflections-in-water sections were actually based on a photo of clouds from above, taken from an airplane shot.

Some still frames from the animation that I particularly like:

isaackarth_deepdream_00089 isaackarth_deepdream_00143 isaackarth_deepdream_00123 isaackarth_deepdream_00000 isaackarth_deepdream_u00127 isaackarth_deepdream_00299 isaackarth_deepdream_00245

Posted in Projects | Comments Off on Invisible Cities


Posted on:


I’ve been playing around with the deep dream/inceptionism neural networks since Google Research released their source code. Getting the dependencies set up is a real pain, but now that it’s working I can write arbitrary Python code to script it.

The first difficulty is that the default settings are already cliche and a bit horrifying. Once you get past the shock value, turning everything into melted dogs is jejune.

Switching training data helps a little, but the MIT Places data has its own strange attractors. Basically, the recursive nature of the algorithm will inevitably lead to it getting stuck in a local maxima. Which has a lot of baseball diamonds in it, apparently.

See? Pretty ugly once it gets stuck in an endless loop of baseball diamonds and pagodas that are fractally assembled from baseball diamonds and pagodas. Well, the pagodas are nice and fractally, but kind of repetitiously boring.

And that’s the main problem: because the recursive modification is based on image recognition, it transforms unique input photos into a pattern it recognizes. And humans are even better at pattern recognition, so we can pretty quickly get to the point where we just glance past the next hundred melted dog-slugs and baseball pagodas.

One solution is to keep the intervention fairly subtle:
You have to glance closer to see the changes to the original image, and it gives the whole thing a kind of impressionistic swirling feel. You can also change it up by using different layers in the network and combining them in different ways, but you’re still getting stuck at local maximas. So subtle is better, but still eventually falls into the same old patterns.

Especially when you do an animation and zoom deeper in:
Still not too bad, but you keep running this and you end up with baseball diamonds again. (About 300 frames later in this case.)

As a side note, these animations have an interesting property: if you feed in the same input they are deterministic, so you can pick a frame you like, tweak the settings, and watch it veer off in another direction.

That helps, because the big problem in keeping these images fresh and interesting is to get new information into the system. Fortunately, the original developers have some help, because yesterday they released some code that allows for the use of guide images. (Somewhat reminiscent of the project I wrote about on the procgen blog.)

For example, this takes the sequence that used to produce that ugly baseball diamond image above and uses a photo of pebbles that I took as a guide image:
Much better. No more baseball diamonds.

From here, designing a system that uses a bunch of guide images to keep things fresh is a good next step. (Though mine is currently taking forever to render the dozens of frames I want for the subtle transitions.) Ultimately, I suspect that a custom-trained CNN will produce the best results, but that will likely require a million or so categorized photos. Just please, no dogs this time.

Posted in Projects | Comments Off on Deepdream

Clojure-Unity: Getting it to Work

Posted on:

Clojure in Unity is a really exciting idea. Since Clojure CLR has been around a while, it’s been theoretically possible to combine the two, but last time I looked into it the old version of Mono that Unity currently uses was too big a barrier without some work being done. Well, now that work has been done, and it’s working enough that I can have a functional REPL in Unity.

The downside is that it’s very, very early stuff right now, and requires you to have your duct tape ready to deal with the problems you’ll run into.

The biggest one I’ve run into so far is the Windows paths were broken, since the main developers seem to be working on OSX. Fortunately, there’s already been one enthusiastic Windows user, Joseph Parker, who made Parade Route for Clojure Cup 2014. And made the source code available, so I could check his changes.

static public string[] CompilationRoots = new [] {

static public string pathToAssemblies = "Assets\\Clojure\\Compiled";

static public void SetupLoadPath() {
string loadPath = Path.Combine(System.Environment.CurrentDirectory, pathToAssemblies);
foreach(string path in CompilationRoots) {
loadPath += ";" + Path.Combine(System.Environment.CurrentDirectory, path);

System.Environment.SetEnvironmentVariable("CLOJURE_LOAD_PATH", loadPath);

There’s still some issues with it, some of which aren’t present is parade-route, especially with the play mode in the editor. But for a pre-alpha duct-taped project it’s got a lot working already.

Posted in Uncategorized | Comments Off on Clojure-Unity: Getting it to Work

Ludum Dare #26: Nothing Left

Posted on:

I made a game.

The theme was “Minimalism”, which worked because I didn’t have a lot of time to work on it. It’s a no-button bullet-hell vertical-scrolling shooter. With procedurally generated enemies.

I think the competition version may be a little too easy, but I think it has enough potential that I’d like to add a bit more to the game.

Posted in Uncategorized | Comments Off on Ludum Dare #26: Nothing Left