Garkov -- Garfield + Markov chains
June 6, 2008 8:20 AM   Subscribe

Garkov -- Garfield + Markov chains
Garkov is a comic strip generator that uses Markov chains to synthesize new Garfield strips based on transcripts of several hundred existing strips. The output varies nicely from plausible to surreal to downright incoherent.

The output is a probabilistic remix of original Garfield dialogue, divorced of its original context and plopped into blanked-out speech bubbles in (currently a bit less than a dozen of) Davis' original 3-panel daily strips.

The generation work is being done in Perl, and the final images are rendered using CSS positioning and a hand-cut garfield comic <img> font. Unfortunately, that means the raw images can't be saved as such, but screenshotting is totally kosher and the site allows users to save strips they particularly like to permalinks, as well.

This is really a proof-of-concept -- nothing in the code is Garfield-specific, so adapting the codebase to other comics is in principle totally doable. But I needed to start with something, and Garfield was that something, and so: Garkov.

It's also almost certainly buggy, and yes, there are some weird yet-to-be-fixed typos in the transcripts.
posted by cortex (30 comments total) 12 users marked this as a favorite
This project was posted to MetaFilter by not_on_display on June 6, 2008: Garkov -- Garfield + Markov chains

Fantastic. Current favorite. I will hit reload when I wipe the coffee off my keyboard.
posted by rtha at 8:47 AM on June 6, 2008

It is my fondest wish to see these printed out and pinned up in cubicles to baffle unsuspecting coworkers.
posted by cortex at 9:41 AM on June 6, 2008

I'll get right on that.
posted by rtha at 10:01 AM on June 6, 2008

I'd like to nominate "I've lost the feeling in my meatloaf" as an all-purpose expression of the existential angst that surrounds us all.
posted by yhbc at 10:13 AM on June 6, 2008 [2 favorites]

cortex, it looks like the "Hall of Fame" as well as the "save this strip" scripts are currently borked.
posted by yhbc at 10:48 AM on June 6, 2008

Yeah, woof. Looking into it.
posted by cortex at 11:15 AM on June 6, 2008

It is my fondest wish to see these printed out and pinned up in cubicles to baffle unsuspecting coworkers.

Done and done. The most visible part of my cubicle wall, too.
posted by Plutor at 11:23 AM on June 6, 2008

Ha. Awesome, Plutor.
posted by cortex at 11:24 AM on June 6, 2008

Help! Chair! Help! Chair!
This is amazing.
posted by The Great Big Mulp at 12:15 PM on June 6, 2008

I've got some db problems, so I've flushed the archives. Hopefully I won't have to do that many more times. Yay for launch day!
posted by cortex at 12:17 PM on June 6, 2008

This is wonderful.
posted by cowbellemoo at 1:14 PM on June 6, 2008

It's like, Garfield: the Dusted Years.
posted by The Straightener at 2:20 PM on June 6, 2008

The Websense category "Sex" is filtered.

I don't think I want to know what your Garfield & Jon are up to.
posted by desjardins at 2:46 PM on June 6, 2008 [1 favorite]

You had me at "Garkov."
posted by not_on_display at 3:29 PM on June 6, 2008

posted by Sailormom at 5:59 PM on June 6, 2008

This is brillant. I don't know if it is possible, but it would be even more surreal if you used a Markov dump of Metafilter comments.
posted by never used baby shoes at 7:55 PM on June 6, 2008

Did you hand transcribe hundreds of strips? If so are you completely insane at this point?
posted by damn dirty ape at 11:23 AM on June 7, 2008 [1 favorite]

Yes, and left as an exercise to the reader. Transcribing isn't so bad; there's some like Czech guy who set up an archive index by month and year that just displays images fed straight from (as far as I can tell) the syndicate server, and using that I found that I can plow through a month of strips in 10-15 minutes. A typical transcribed strip ends up looking like this:


Then I have a little perl script that parses a file of transcriptions into separate per-character files for stocking character-specific markov tables at runtime.

So I'd estimate I put like 5 hours so far into transcribing. It'd be awesome to have a more significant chunk of them done up -- more variety in the text, more strange Markovian branching in general -- so I'll probably keep doing an hour here or there every once in a while. To do the whole 30 year run would probably be about 80 hours of work, all told, which is a lot of typing.
posted by cortex at 1:38 PM on June 7, 2008

Stank-ass no-account Perl DBM back-end out. Shiny, hopefully extremely well-behaved mysql back-end in. Saving and hall of fame work again, and I managed to salvage the old saved strips as well.
posted by cortex at 10:22 PM on June 7, 2008

Perhaps your best yet. Yet still I bitterly lament for the the abandonment of Bunt Cake.

I have to say, all these Garfield postmodernizations have convinced me that the strip is, in fact, a work of unutterable genius.
posted by nanojath at 1:02 PM on June 8, 2008

...there's just no way
posted by felix at 9:55 AM on June 9, 2008 [1 favorite]

posted by thewalrusispaul at 10:41 AM on June 16, 2008

Garkov doesn't work anymore! Is there any chance it can be fixed, or salvaged in some way?
posted by DoctorFedora at 8:18 PM on June 16, 2010

I alerted cortex and he fixed it last night. Let the lulz re-commence!
posted by Plutor at 11:15 AM on June 22, 2010

Yeah, it's back! I think Plutor was like the third or fourth shove I got but it was at the right moment. And it got me thinking again about some of the improvements I had been meaning to make with the whole thing. I may go back and try and rework some of the code to sparkle it up a bit more—go for balloon-to-balloon coherence a bit more, try to eliminate cut-off sentences and empty balloons, that sort of thing.
posted by cortex at 11:18 AM on June 22, 2010 [1 favorite]

So projects threads stay open indefinitely or what?
posted by desjardins at 10:43 AM on June 23, 2010

Seems that way!
posted by cortex at 11:32 AM on June 23, 2010

So do Music threads, fwiw.
posted by cortex at 11:32 AM on June 23, 2010

it's like a tennis match
posted by desjardins at 1:19 PM on June 23, 2010

Can I FPP this one again? kthx
posted by not_on_display at 8:46 PM on June 23, 2010 [1 favorite]

« Older Mon.thly.Info...   |   TeamPages... Newer »

You are not currently logged in. Log in or create a new account to post comments.