-
"Someone at work recently asked how he should go about studying machine learning on his own. So I’m putting together a little guide." Ooh, useful. Lots of starting points for machine learning in R.
-
"When you look at the dubstep scene you realize quickly that it’s a fairly young genre. Not in terms of its own existence as a named thing, but as a measure of the age of many of its prominent musicians. They’re of the generation that doesn’t know a world before the Nintendo Entertainment System and a lot of the music reflects that… If you had a giant Venn Diagram of dubstep and 8-bit chiptunes, you’d see a large overlap between the two. Why dubstep is particularly prone to this, more than other electronic styles, I don’t know. Maybe it has to do with its relatively lo-fi, home studio feel of the genre? … There’s a hidden, untold history there, but it’d be best told by someone that knows the genre, and its players, better than I do. In the meantime, I’ll continue enjoying it until it’s pillaged and destroyed for all its worth." Mike on the overlap between dubstep and chiptune culture.
-
"All artworks have been created using data from the game "Unreal Tournament". Each image represents about 30 mins of gameplay in which the computers AI plays against itself. There are 20-25 bots playing each game and they play custom maps which I create. Each map has been specially designed so that the AI bots have a rough idea of where to go in order to create the image I want. I log the position (X,Y,Z) of each bot, every second using a modification for the game, I also log the position of a death. I then run my own program written in Processing to create printable postscript files of that match."
-
"This page will maintain list of AI related libraries for the Ruby programming language." Some interesting stuff here, although it's all in varying degrees of maturity…
-
"What data can we wring out of the rural environment that might prove of use to it’s residents and visitors? What embedded processes should have APIs opened up to the wider community?" Lovely lovely lovely design of little bits of Ruricomp and what they might look like from the lovely lovely Paul Pod (who was in the studio a week or two ago, and a joy to work with and around). The twitterbots are especially good.
-
"We’ve been working with the fine folks at Flickr (thanks Aaron!) to add Noticings to their third party machine tag services. What on earth does that mean? Basically, a badge on the sidebar of your Flickr photos linking to Noticings…" Ding! Rather excited about this. Lots more to come (especially from my half of the deal) on Noticings soon, but this bit is super-exciting.
Twit 4 Dead: more silly nonsense with Twitter bots.
29 December 2008
As a little post-Christmas present, I thought I’d share a little code toy I’ve been working on recently.
You might know that I’m a fan of Twitter as a messaging bus, and I’ve already built some entertainingly daft bots in my time with it. Recently, I decided to flex my programming skills a bit and build not one but four bots. And, more specifically: four bots that talk to each other.
Enter @louis_l4d, @zoey_l4d, @bill_l4d and @francis_l4d. You might notice that they’re named for the characters in Left 4 Dead.
This is not a coincidence.
One of the most wonderful things in that game (which I’ve already commented on the brilliance of) is the banter between the four player characters. There’s so much dense, specific scripting, and enough dialogue so that it rarely repeats. I thought it would be interesting to see if you could simulate the four players’ dialogue over Twitter, sharing some state between the bots, but also finding a way to make them communicate a little with each other.
Well, a bit later, I worked out how, and this is the result:
You get the picture. They run a scenario, they bump into boss zombies, they find stuff, they get hurt (and help each other), they get scared (and reassure each other). At the moment, there are some dialogue overlaps; my main work at the moment is adding more unique dialogue for each bot. Bill is sounding pretty good, but the rest of them need work. It takes about 2-3 hours for them to run a scenario, and it’s usually fun to watch. (And, as you can see, it makes sense to follow all four of them).
So how does it work?
It turned out that rather than trying to build any real AI, it was much more fun just to simulate intelligence. The bots are state machines; they have a variety of states, which they transition in or out of dependent on factors, and suitable dialogue for each state.
I wrote the bots in Ruby. There are two main components to the twit4dead code: the Actor class and the Stage class. The Stage is a singleton; it’s where the state of the world is determined, and global variables tracked. It’s also where all the probabilities are run from. The Actor class is what each of the bots are, and it’s based on the Alter Ego state-machine library for Ruby. We have a lot of states, rules for transition, a selection of methods to handle being helped or talked to by friends, and a method to choose a random piece of dialogue appropriate to the current state.
All the bots are instantiated from a YAML file. For each bot, I store its Twitter username and password, and a nested tree of dialogue for each state. This means it’s really easy to add new states and maintain the dialogue for each bot. It’s also easy to add new bots – you just create a top-level entry in the YAML file.
Originally, I thought about the bots broadcasting and listening over Twitter, but the API calls were just going to get out of hand, and it turned out that Twitter didn’t like being bombarded with messages and would drop a few over time. So I separated out writing the script and broadcasting it. A small utility generates a script file; each line of this file consists of three delimited fields for username, password, and message to send to Twitter. Then, another program – which I currently run on a screen
ed shell – reads that file and broadcasts one line of it every minute until it’s done.
And that’s it. I have to run it by hand for now, which is fine – it’s more something I fire up every now and then, rather than something you want to permanently run. I originally was going to keep track of loads of statistics – health, zombies in play, etc – but found a cruder set of rules worked much better. Every time they’re in combat, there’s a slim chance somebody gets hurt; every time somebody’s hurt, a friend will rush to save them. That sort of thing. Simulated Intelligence, then, rather than Artificial Intelligence.
Alter Ego turned out to be a lovely library; dead simple to use, and as a result the bots are really nicely modelled (or, at least, I’m very happy with how they’re modelled). The notion of a Stage with Actors, rather than a Game with Players, feels about right, and the modularity of it all is pretty nifty. It still requires a little refactoring, but the architecture is solid, and I’m proud of that.
I think my favourite aspect of it, though, is that at times, watching the bots play together is a little like magic. The first time I saw them talk to each other, cover each other whilst reloading, help each other up after a Boomer attacked, I felt a little (only a little, mind) like a proud father. They’re dumb as a sack of hammers, but they look convincing, and that was the real goal. It’s fun to watch them fight the horde amidst all my other friends on Twitter.
Nonsense, then, but a fun learning exercise about state machines, object orientation, and simulating conversations. State machines are a ton of fun and if you’ve not seriously played with them, I thoroughly recommend it.
Do follow the four of them, if you fancy; I’ll make sure I run them with reasonable regularity, and I’ll be fixing the dialogue over time. After all, I want to keep Francis happy.
What Left 4 Dead needs: an arrange mode
16 December 2008
Left 4 Dead is a wonderful game, and there is, to be honest, almost nothing in it I’d change. It’s deceptively simple, lots of fun, and brilliantly executed. But it has a big problem: what happens when the players’ competency doesn’t live up to the drama the AI Director wants to portray.
(Quick digression, for those of you who don’t know: the AI Director is the name Valve has given the enemy AI; it’s a smart move, because the magic of the game really is the AI, and personifying highlights the importance of this game system to the players. It decides what to spawn, when to spawn them, and when to take advantage of players’ sloppiness; as such, it appears cruel and sadistic to most players, and it’s nice that the system has a name you can curse).
My friends and I are reasonably competent and we like a challenge, so we tend to start most levels in Advanced difficulty. Normal is a bit too easy in the early stages, and the apocalypse was never meant to be easy. Anyhow, we make good progress on Advanced for quite a while. The problem tends to come between stages 3 and 5 of any campaign, when we start to get wiped out a lot more.
We all die, and we restart, and we remind each other to stick closer and not shoot each other and not get distracted. And we do a bit better, and then we die. But this is OK; it’s a game, and we want to get better, and we like the challenge.
But after nine restarts, the challenge is wearing thin. And here’s where the problem kicks in: we would like to go to bed soon – it’s a school night, after all – and yet our pride reminds us that we would rather finish the scenario than give up. And so we grudgingly take a vote, drop the difficulty to normal, and thoroughly enjoy the challenge of the always-tough grand finales.
I’m ashamed we dropped the difficultly, but I’d be more ashamed if we didn’t finish the campaign. When this happened for the second time at the weekend, I got thinking as to how you could fix this problem, and I came across one possible solution.
What Left 4 Dead needs is an “arrange mode”.
I would like to be able to tell the game “there are X of us, and we should like to play an exciting zombie-slaying adventure for approximately Y minutes on difficulty Z“.
All the AI has to do is keep pace, supplying the appropriate numbers of highs, a really big finish, but backing off the volume of the zombie horde when it looks like we’re not going to make our time limit. As it stands, a decent run-through on Normal usually takes about 40 minutes, but Advanced sessions are taking me and my regular teammates about 1h45. This way, we could peg the session at, say, 75 minutes, and still have a decent evening’s fun.
If possible, the AI shouldn’t be adjusting the difficulty as it goes along. Players pick a particular difficulty for a reason – challenge, bravado, personal reasons – and you shouldn’t then throw easy-level enemies at them just because they’re running out of time; what Left 4 Dead has already proven is that much of the difficulty can come from pacing (how often the big encounters are, how weak the players are when you jump them) just as well as from hit points.
A good example of a game that already does this it the original PSP Ridge Racer; its “Custom Tour” mode lets you choose how long you wish to play for, and then it assembles a series of tracks that ought to take an average player that length of time; perfect for its handheld platform, as you’re often likely to be playing for known periods of time – a commute – rather than any other knowns. And, you know, I think there’s a lot of other games you can apply this model to successfully too, without any significant impact.
Other than that, though, I don’t want anything changed – and this should be in addition to the current gametypes, not instead of. I’m just a bit tired of admitting defeat and dropping the difficulty so we can get to the finale. Maybe that’s pride talking, but I don’t want to think that Louis, Bill, Francis and Zoey died because I wimped out.
Plans are afoot…
13 December 2008
The latest in a series of dumb experiments with Twitter is nearly complete. The above should give you a bit of a clue; all you need to know is that somewhere in the Twitterverse, it’s the zombie apocalypse, and @bill_l4d, @francis_l4d, @louis_l4d and @zoey_l4d are doing their best to survive. If you think that sounds somewhat similar to Valve’ popular zombie-slaying co-operative FPS, Left 4 Dead… you might be on to something.
You might want to friend them all. More to come, very soon.
-
"Pretty sure I'm not the first person in the universe to come up with this idea, but I've yet to see another connect-the-dots tattoo." Beautiful.
-
"It’s somewhat embarrassing, but that’s how I got into economics: I wanted to be a psychohistorian when I grew up, and economics was as close as I could get." Paul Krugman, you are the best.
-
"The Theory of Interstellar Trade is a paper written in 1978 by economist Paul Krugman…. Krugman analyzed the question of 'how should interest rates on goods in transit be computed when the goods travel at close to the speed of light? This is a problem because the time taken in transit will appear less to an observer traveling with the goods than to a stationary observer.'" Paul Krugman, winner of the 2008 Nobel Prize for Economics, is officially awesome.
-
"The New York Times Magazine food issue had plenty of fun this weekend; Looks like photo editor Kathy Ryan gave photographer Martin Klimas a 22-caliber rifle and told him to embrace his anger. He decimated an ear of corn, an apple and a pumpkin so thoroughly that the editors could not decide on a favorite." Beautiful.
-
Strategy game that requires you to work within the boundaries of limited – but potentially powerful – AI, and act as a guiding "real intelligence" for your ships.
-
"Brownjohn had never worked with live action before, nor had his animation assistant Trevor Bond. Using techniques taught by László Moholy-Nagy, Brownjohn's team beamed light over three separate models; a belly dancer, a snake dancer and a model for close-ups." Short blogpost – with archive behind-the-scenes images – on creating the title sequence for Goldfinger.
-
"LittleBigPlanet lets [players] run wild, with unprecedented results, but it locks the majority out of the creative process, because it's time-consuming and simply not very enjoyable. We hoped it could do both those things. That it doesn't isn't the let-down it might have been, thanks to the untamed community of brilliant nutjobs that's already out there, appending their DIY masterpieces to this beautiful, mildly flawed, magnificently multiplayer platform game. We salute them, we salute Media Molecule for making it possible for them, and we salute Sony for its total commitment to this brave, hare-brained project. But mostly, we're just happy to see a flagship game for a modern system that's about running from left to right and jumping over things."
-
"I've just added a new feature to the site: maps showing many places at once. They allow you to, for example, see all the churches in London Pepys has mentioned in one glance. Or London streets, or places outside Britain, and more." Some fantastic maps-and-pins from Phil and Sam.
-
"The series "A New Taxonomy of Gamers" wrapped up last Friday. For your convenience, here are the links to all 11 parts in one convenient post." Oh, this looks good.
-
Heard some of this last night; a superb BBC documentary about Brian Wilson and some of his production techniques that shaped the Beach Boys' albums. Some great interviews, and lovely musical deconstruction of harmony and voicing. Obviously, as a "listen again" programme, it's only around for six days – so get listening!
-
"Hired as visual artist in the summer of 2006, my challenge was not only to clearly present Braid's mechanics and behaviors, but to help tell a story that was anything but literal: part anecdote, part artifice, part philosophy. This article explains the process of developing visuals for a nearly-complete game with a highly idiosyncratic identity, the challenges encountered, and some of the nuts-and-bolts of our methods and tools." David Hellman on his work on the art of Braid.
-
Man, SIGGRAPH papers have the best titles. This is a lot of seriously hardcore, cutting edge, graphic-programming nous. Also: "jiggly fluids".
-
"The negative side of this, as your experience illustrates, is that Braid just lacks any immediate sense of fun. It does not set out to entertain you, and with the exception of some pretty aesthetic moments it makes you earn the pleasure you take from it. (Portal, which makes for a good point of comparison, wants the player to like it and desires to be understood in a way that Braid does not.)" I think Pliskin is spot on, here
-
"An interesting article at Rock, Paper, Shotgun tackles BioWare's tackling of issues tackling modern society, tackling one of my Mass Effect plots in the process. I responded in the comments, and after looking at how much I yammered on, I figured it was worth posting here as a look inside how these things get into the game, and why some things that seem dumb get done." Patrick Weekes follows up the RPS post criticising his own plot elements with some frank self-criticism, and some interesting explanations; a reminder of how hard creating any kind of meaningful choice can be.
-
Yes.
-
A blog from Tom, Flora, and no doubt shortly et al, about life in Hackney.
-
Now this *is* interesting: a comments thread in which Michael Abbott's readers put questions to Iain Lobb, one of the designers behind Meta4orce… and he answers them candidly and informatively. Interesting stuff about the limitations of building games around TV shows for public service broadcasters.
-
"I thought it was a parking ticket, and was annoyed. But up close, I saw it was just an empty envelope someone put there…" I'll let you click through for the punchline. Delightful, nontheless.
-
Great selection of posts on how brands need to behave (and how they sometimes fail to do so) from Grant McCracken.
-
Narrative-driven flash game from BBC Switch. Combines animated cut-scenes with minigames representing key plot aspects; as such, it's very linear. Script by Peter Milligan, though! It looks expensive; I'd be interested to know how successful it's been. As it stands, it's a little bit Freakangels-lite, a little bit Torchwood. And yes, I know how that sounds.
-
A nice article about context, contracts, and a few other things related to game AI design. If you're interested in the field at all, it's a nice read.
-
"I believe that the “auteur” school of game development is not only outmoded, but dangerous to the vitality of the medium. Instead, we must pursue deeply collaborative work styles and seek out diverse teammates if indie game development is ever to reach new heights and thrive beyond its current audience." I need to come to a better understanding about auteurship in this field; I'm not entirely convinced by this article.
-
"I don't begrudge Blow an attempt at addressing important historical events, but the weight of the atomic age seems too much to address with a few lines of text that feel incongruous with the rest of the production." This is, I think, a worthwhile point. I'll be returning to the whole "atomic bomb" question in a blogpost soon, I hope.
-
"Given that Valve is being forced to charge for the update, they wanted to ensure that 360 owners were getting their money's worth." Such a shame they have to charge for it – but still, more TF2 on 360, and that's a good thing from my perspective.
-
A nice simple explanation of what using Git is really like.
-
"What the hell is wrong with me? There are a lot of ways to win at Civilization Revolution that do not involve taking a happy, peaceful city and reducing it to a smoldering gravesite filled with radioactive trinitite." Clive Thompson on a case of Walter Mitty syndrome.
-
"Keldon Jones has published an artificial intelligence opponent for the game Blue Moon with an user interface written with GTK+ toolkit. This is a native Mac OS 10.5 version of the game written with Cocoa, so there's no need to install X11 and GTK+ libraries. It runs straight out of the box (on Leopard)." Heck yes.
-
"This is a write-up of my diploma project in interaction design from the Oslo School of Architecture and Design. The project is entitled ‘Adventures in Urban Computing’ and this weblog post contains a brief project description and a pdf of the diploma report." Well worth a read, and beautifully presented. I need to chew over this more.
-
"It's a shame to me that a game with Braid's narrative, artistic, and aesthetic aspirations is inaccessible to so many people hungry for exactly those things." Yes. Much as I adore it, Braid can be awful hard at times. A smart game for smart gamers, alas.
-
"A popular misconception about agile is that it doesn’t allow for plans. This isn’t true. Agile focuses on the activity of planning rather than focusing on a fixed plan."