Infinifriends

10 February 2014

Time to write up something that’s been sitting around on various disks for a while.

Many months ago, I saw Plotagon. It’s best explained as Xtranormal by way of The Sims: reasonable resolution, 3D-animated videos based on scripts; a desktop tool to generate them, and a site to host them.

Most interestingly, it’s scripted with what actually looks like movie scripts, and that got me thinking: what would it look like to feed it with procedurally generated scripts? Could you make the machine make videos? All I knew was two things:

  1. I know, for good or ill, how Markov chains work.
  2. All the scripts for Friends are transcribed on the internet.

After all, given Plotagon’s focus on semi-realistic forms, I decided that it was best suited to the great American artform of the 20th century: the sitcom.

The Infinite Friends Machine was born.

The machines does a few simple things. First, it scrapes Friends transcripts. For now, it works for most of Series 1. It then parses those scripts and chops them up into episodes, scenes, and lines attributed to individual characters. It also strips out some directions. Then, using all that, it offers ways to generate new scripts.

Markov Chains, as Leonard has frequently pointed out, are not always the best way of generating text alone, especially when the corpus you’re working from isn’t particularly consistent. He is, of course, right. Still, I enjoy the mental leap readers make in order to make generative prose actually make sense, and for this project, I mainly wanted to get to scripts as fast as I could.

Still, I didn’t want to hamper their relative crudeness, so I tried to skew things in their favour. To that end, the Infinite Friends Machine generates scripts by copying the structure of existing scripts. When it makes a new “episode”:

  1. it finds the scenes that are in the original episode it’s being copied from
  2. for each scene, it finds each line – who says a line at what point in the episode
  3. then, it generates a new line for the speaking character from their own corpus. That is: Joey only ever things derived from Everything Joey Has Ever Said. What this means is that the main cast have quite diverse things they might say, and the bit players pretty much only say the same thing. Gunther is quite boring.

That’s it. A few seconds later, it spits out a nonsensical episodes of friends. Here’s a scene:

Friends script
and this is a full episode.

The machine isn’t online because it’s quite crude and processor-intensive, but you can get at the sourcecode from Github.

Anyhow: machine to generate scripts. Next stage: get them into Plotagon.

This was where my troubles began. For starters, despite having a nice format for scripts, Plotagon really demands you enter them via its UI – you can’t paste a big block of text in, you have to enter it by hand. Painful.

Next: Plotagon only lets scenes have two characters in. I decided to make a single scene – the tag on the end of the episode. But this turned into many scenes in Plotagon, as four people in an apartment was a bit much for it. I had to keep track of who was where, who was talking to whom at any point.

And then I had to deal with the unfortunate truth: Plotagon is horrible. I mean, Xtranormal used its non-realistic avatars and computer-voices to comic extent. By contrast, here we had disappointing voice acting with clunky visuals. Also, I had to add some ‘acting’. This largely consisted of making Chandler say everything whilst doing the (crazy) emote, to really capture that Series 1 Matthew Perry vibe.

A quick sting later, and Infinifriends S1E1 existed:

It is not exactly high art.

Just one scene took long enough, and I think, proved my point to an extent, but probably can’t be improved on for now. I’m not sure if I’ll ever return to the Infinite Friends Machine, but it was an entertaining enough exercise, and the video rendition is probably worth it for the cringe factor alone.

Theme tune. Credits. Tune in next time.

Toca Builders, and the spirit of Seymour Papert

23 June 2013

Tocabuilders

I’ve been playing a little with Toca Boca‘s latest iOS toy: Toca Builders.

As you’d expect from Toca Boca, it’s charming: a straightforward, paired down implementation of an idea, with unambiguous UI and lovely character design.

Builders is Toca’s take on a block construction toy for small children. Initially, it might seem a bit clunky, a Minecraft pastiche that’s not nearly so sophisticated as Mojang’s original. After all, it’s a tiny play area compared to Minecraft – six blocks of height and relatively small X-Y dimensions.

It’s the plural in the title that makes it so interesting, though: builders. This is not (just) a game in which the user is a builder; it is a game about six individual builders (pictured above). Each has their own different ability: most can both construct and desturct; almost all can control the colour of blocks; some are better at changing blocks after the fact, others at sketching with. They each control slightly differently – and they each manifest in the landscape. You can swap between builders with a simple or menu, or by tapping on any that you can see.

It’s the manifestation and personification of the four builders that suddenly clicked for me. As I played this, I realised what it really was: Minecraft through the eyes of Seymour Papert. Lego as LOGO.

Papert explained the LOGO turtle as an “object-for-thinking-with“. Not just a device to command, attached to a programming language; a device that you see the world through. Or as Papert says in Mindstorms, his wonderful book about the development and intent behind LOGO:

“objects in which there is an intersection of cultural presence, embedded knowledge, and the possibility for personal identification.”

He makes what I think is a clearer point later, though, and which I think Toca Builders captures perfectly:

Even the simplest Turtle work can open new opportunities for sharpening one’s thinking about thinking: Programming the Turtle starts by making one reflect on how one does oneself what one would like the Turtle to do. Thus teaching the Turtle to act or to ‘think’ can lead one to reflect on one’s own actions and thinking. And as children move on, they program the computer to make more complex decisions and find themselves engaged in reflecting on more complex aspects of their own thinking.

Papert is sometimes quite wordy. When I explain this to people, I tend to say: the value of the Turtle is that when you are stuck, you solve the problem by pretending to be the Turtle. This is especially valuable for young learners; as Papert points out later:

Children can identify with the Turtle, and are thus able to bring their knowledge of their bodies and how they move into their work of learning formal geomtetry

There are some lovely photos in Mindstorms of kids on a playing field, practicing Logo; one of them is being the Turtle, and the others are telling her what to do. The second you act out a program for yourself (or watch another child follow your instructions to the letter), you see how literal you need to be, or which line of code is ambiguous. You begin to see how the computer processes information (“thinks” being, unfortunately, an entirely inaccurate word).

This kind of embodied representation of computational logic is very rare. Often, the hard things in computer science are very abstract. I do not know how to “pretend to be the compiler”; I just have to trust input and output.

Toca Builders takes the abstract building of Minecraft – tools attached to a disembodied perspective (albeit one hindered by some degree of personhood – factors such as gravity, and so forth) – and embodies them to help younger children answer the question which tool would you use to place a block where you need to? Or sometimes backwards: which block shall we place next? It is not quite as freeform as Minecraft, but it actually forces the user to think a little harder about planning ahead, lining up his builders, and which builders go together well. Measure twice, cut once.

To that end, it’s much more like real-world building.

Papert was very clear about one particular point: the value of this is not to think in mechanical ways; it’s actually the opposite. By asking children to think in a mechanical way temporarily, they end up thinking about thinking more: they learn that there are many ways to approach a problem, and they can choose which way to think about things; which might be most appropriate.

And so Toca Builders is, in many ways, like all good construction toys: it’s about more than just building. It’s about planning, marshalling, making use of a limited set of tools to achieve creative goals. And all the while, helping the user understand those tools by making them appear in the world, taking up space in it, colliding with one another, and needing moving. All so that you can answer the question when you’re stuck: well, if you were Blox the Hammer, what would you do?

Some of what looks like clunkiness, then, is actually a subtle piece of design.

If you’re interested in the value of using computers to teach – not using computers to teach about computers, but using computers to teach about the world, then Mindstorms is a must-read. It’s easy to dismiss LOGO for its simplicity, and to forget the various paradigms it bends and breaks (more so than many programming languages) – and it’s remarkable to see just how long ago Papert and his collaborators were touching on ideas that are still fresh and vital today.

  • "At the moment, however, the prevailing wisdom seems to be that audiences have to be tricked into buying digital toys. Toys have to be disguised as something else. They don't yet have the framework of expectations around them that allows people to decide whether the proposition is worth it on its own or not, whatever that phrase really means. They're yet to feel entirely legitimate." Lots of lovely stuff in Christian's article here, but this stood out particularly: having to disguise toys to sell them to current expectations and the current marketplace.
  • "Over the past few months I have been collaborating with her to curate her first ever career-spanning exhibition. Retrospective Posy Simmonds: Essentially English opens on June 12th at the beautiful Art Nouveau, Victor Horta-designed Belgian Comic Strip Centre in Brussels and continues until November 25th 2012. I’ll be adding photos from the exhibition shortly, but below are the texts I have written for the explanatory graphic panels." Paul Gravett on Posy Simmonds – some great sketches in here and details of early work.
  • "[Bradbury] told them about a child he had watched, teased by his friends for wanting to enter a toy shop because they said it was too young for him, and how much Ray had wanted to persuade the child to ignore his friends and play with the toys." That, forever.
  • "It should be pointed out, however, that physics is not the only systemic toy upon which fun games can be built. Probability fields, such as those forged by the colours, numbers and suits in a deck of cards, and the stochastic patterns that emerge from mixing those cards up, are another well-known toy upon which many great games are built. In fact, there is a literal infinity of foundational systemic toys upon which meaningful games can be built, yet for the most part, the game industry focuses on building baseline game engines that simulate one single toy that is proven to only be marginally fun: physical reality."

Play is a serious business

22 April 2012

I had the great pleasure to get to Galy Tots at Kemistry last week: a lovely, tiny retrospective of Ken Garland Associates’ work for Galt Toys. It was lovely: lots of nice examples of graphic design and photography, as well as lots of items on display, including a prototype of knock-down furniture for playgroups, that was just beautiful.

There were several particularly lovely touches: firstly, that all the toys and games on display were set up to be played with – indeed, that they were set up so that children as well as adults could play.

And secondly: all the exhibition copy was written by Garland himself, which gave it a tone that was both very honest but also charming and subtle.

There were two quotation I took down, because they made an impact, and I wanted to share them.

Garland wrote about Edward Newmark, who had been manager of Paul and Marjorie Abbatt’s toyshop before he went to Galt.

Edward brought with him the conviction that play is a serious business, and toys are the tools of the child.

Talking about their time working for Galt, Garland said:

Most especially, it is rare for designers to have the experience of their work being enjoyed before their very eyes. I have had the greatest delight in seeing children playing our most successful game, Connect, in many parts of the world.

Watching something being enjoyed before your eyes is one of the great pleasures of designing things to be played or interacted with.

(And, by corollary, nothing hurts more, or reminds you to up your game, than watching somebody not have fun with something assumed they would enjoy).

  • "The point isn't nostalgia, that things were better in simpler times, but that the conditions we create (deliberately or accidentally) for and around the practices we pursue have a tremendous influence on the ways we carry out those practices. In the case of computer programming in particular, the apparent benefits of speed, efficiency, accessibility, and other seemingly "obvious" positive virtues of technical innovation also hide lost virtues, which of course we then fail to see." Culture as a byproduct of conditions.
  • "Type words to interact with Fireplace or just sit back and enjoy. The logs burn down to ashes in about 30 minutes each." Charming, delightful.