Quote of the Week #103

Well, Mr. Frankel, who started this program, began to suffer from the computer disease that anybody who works with computers now knows about. It’s a very serious disease and it interferes completely with the work. The trouble with computers is you play with them. They are so wonderful. You have these switches — if it’s an even number you do this, if it’s an odd number you do that — and pretty soon you can do more and more elaborate things if you are clever enough, on one machine.

– Richard Feynman

Comments Off

What’s in a name?

“Soon” this blog will be moving to a new server. The hosting itself is all lined up, but now I need a domain name. (OK, technically I don’t need one, but it’d be very nice to have.)

I have lots of ideas for good domain names. Alas, most of them are already taken. Here’s what I’ve considered (and, as appropriate, reasons they’ve been rejected). If you’ve got any other suggestions, post them!

Already taken. No surprise there.
Available, but let’s be honest, why not get a domain name that people can actually spell? Say….
Already taken.
Available, but unspellable.com is a generic squatter site. Not exactly someone I want to be namespace neighbors with.
Or, “k, nine letters, z” (see also: i18n, l10n, m17n, a11y, etc.). Taken, surprisingly. That’s probably for the best, though — k9z.org sounds like a site about dogs written by someone who considers -z an acceptable suffix for making a noun plural.
Statistically speaking, this is how my last name is most commonly pronounced. Alas, this domain name is also taken.
Available, but a bit longer than I’d like.
Also available, and this one might actually be acceptable.
As much as I’d like to make anyone who visits my website lose The Game, it’s already taken by a squatter.

And… nothing else springs to mind at the moment. I’m open to suggestions; otherwise, I’ll probably end up going with captderiv.org.

Quote of the Week #102

The truth is that we all do have something to hide, not because it’s criminal or even shameful, but simply because it’s private. We carefully calibrate what we reveal about ourselves to others. Most of us are only willing to have a few things known about us by a stranger, more by an acquaintance, and the most by a very close friend or a romantic partner. The right not to be known against our will — indeed, the right to be anonymous except when we choose to identify ourselves — is at the very core of human dignity, autonomy and freedom.

George Radwanski

Comments Off

Emulate Good Times, Come On

The crazy genetic-algorithms-v.-Super-Mario-Bros. project isn’t dead.

Wallace Preview

As you can see, I’ve successfully done a basic port of the FCE Ultra NES emulator to GTK/GNOME. It’s lacking lots of the crazy advanced features of FCEU, but the important ones are there:

  • (Unscaled) video output.
  • Audio output.
  • Keyboard input.
  • Joystick input.
  • Save states.
  • Movie recording and playback.
  • And a few other things.

It’s nothing fancy, but it’s definitely usable. It does have one advantage over the Linux version of FCEU, however:

Wallace Preview - Input Dialog

Look, it’s a way to configure your input settings without running the emulator with a special command-line switch that takes you through a series of text-based prompts for your input settings! You can’t see it in the above screenshot, but all you need to do is edit the cell with the input binding you want, and then press a key or move the joystick.

Although the source code for FCEU can be pretty ugly, it does have a pretty nice separation of the emulation code itself from the user interface, which helped a lot. Actually running the emulator is quite simple: you make a loop that calls a function that advances the emulation one frame, and gives you back the new screen contents and audio samples. (OK, it’s a bit more complicated than that, but you get the idea.)

So now “all” that’s left is the interesting part of actually using genetic algorithms to play a game. As you may recall, the two main things we need are a representation of a candidate solution (i.e., the series of controller inputs), and a fitness function to decide which candidate solutions are better than the others.

As mentioned in the above feature list, FCEU supports recording and playing back movies. These aren’t ordinary multimedia files, however — they’re a dump of the initial emulator state (essentially no different from a save state), followed by a series of controller inputs and timings. But that’s exactly what we need to represent candidate solutions! So, for generating solutions, we just need to take some initial state, generate a random series of controller inputs, write that out to a movie file, and feed that into the emulator.

The movie file format also looks to be quite amenable to the various mutations, cross-overs, and other genetic reassortments that will be necessary. The basic unit of information in a movie file is a single button change followed by a time (possibly 0) between this input change and the next one. (Or the time might preceed the input instead; I’m not entirely sure which, but it really doesn’t matter for our purposes.) With this representation, we can easily mutate fields and shuffle things around both within and between movies. If a movie file is DNA, then these little chunks are the individual nucleotides.

Of course, the tricky part will still be specifying a fitness function to use. I’ve got some ideas for how to do that, but I’ll save it for a later post.

Quote of the Week #101

I’m not a child anymore, I’m an adult! I can buy my own insurance and everything!

Commander Amarao (FLCL)

Comments Off

what is delicious

You know how for some accounts you set up online, they want you to choose a question they’ll ask you to verify your identity in case you forget your password?

Well, right now I’m looking at one such form that gives me about two dozen choices for questions, and some of them are quality. They’re not quite at the level of “what is delicious“, but still, take a gander at these:

  • “What room do you want to decorate?” I can just see someone asking themselves, “what room did I want to decorate in my old apartment five years seven months and fourteen days ago?”
  • “What is the color of your favorite flower?” Because, you know, asking for your favorite flower would be too easy for someone else to figure out, but the extra level of indirection will stop them in their tracks.
  • “What is your favorite day of the week?” Nothing says security like a 14% chance of guessing correctly. And that’s assuming people’s favorites are evenly distributed. I’m sure just as many people like Monday as like Friday, right?
  • “What is your favorite past time?” Not to be confused with your favorite pastime, of course. How can I be sure that it isn’t just a typo? Because there’s also…
  • “What is your favorite hobby?”
  • “What is a type of food you enjoy?” Not your favorite, mind you, just one you like. Why narrow it down? It’s not like you’ll have to remember your precise choice in the future. Oh, wait.

Quote of the Week #100

I do not believe in inheriting your position in society based on what womb you come from.

– Warren Buffett

Comments Off

Quote of the Week #99

Yes, regulation to keep the Internet open is regulation. And mostly, the Internet thrives on lack of regulation. But some basic values have to be preserved. For example, the market system depends on the rule that you can’t photocopy money. Democracy depends on freedom of speech. Freedom of connection, with any application, to any party, is the fundamental social basis of the Internet, and, now, the society based on it.

Tim Berners-Lee


You know how electronics stores like to ask you for your phone number when you buy something, even though they have no good reason to have it?

Well, I know have empirical evidence that at least two people give out the first ten digits of pi when the cashier asks for their number.

Exercise for the reader: why is it guaranteed that nobody’s phone number actually is the first ten digits of pi?