Does A/B testing hurt creativity?

I have this intuition for some time that there is a trade-off between strict design methodologies like A/B testing and creativity. I couldn’t quite put my finger on it, until a couple of days ago, when I realized that A/B testing is an evolutionary algorithm. Maybe things became more clear then because evolutionary algorithms are familiar territory to me.

Evolutionary computation consists of a family of algorithms inspired by biological (Darwinistic) evolution. You are looking for a solution in a problem domain. You randomly generate populations of solutions, measure the quality of each individual (we call that fitness) and then generate the next population by creating variations of the individuals on the initial one. The higher the fitness of an individual, the more likely it is to be selected to generate offspring. Hopefully, the best fitness found so far will tend to increase as you generate more populations. There is a very large body of research on this topic and I’m hand-waving many important details. But this is the gist of it.

A/B testing can be seen as one of these algorithms. It lies one the extreme case where each population only has two individuals (A and B). You measure their performance somehow, and then choose the best one. Again you try to improve the best one by introducing some tweak, rinse and repeat. Another difference to typical evolutionary algorithms is that in A/B testing, mutations are not random. They tend to be intentional, driven by the mental model of a human designer.

So why do evolutionary algorithms typically use populations much larger than 2? They need to maintain diversity to avoid local maxima. There is a fitness landscape that you are searching, and it’s shape is unknown. You’re looking to climb to the highest possible point. The problem is that, many times, the landscape is full of small, sub-optimal hills – local maxima. If your search method is too eager to go up as soon as possible, disregarding other options, it will get stuck on one of those hills. A/B testing is extremely eager to climb.

This eagerness arises from two factors: the very small population that does not protect us against lack of diversity and the mutation process. The mutations performed in A/B testing are far from random: they are designed. It is unlikely that they will stray far from current wisdom. After all, they are just small theories created by some human designer with some model of reality. The beauty of evolution is how the crazy mutations sometimes pay off big time.

So my point is this: A/B testing should probably be reserved to optimizing a design when you already know you’re in the right hill. If you want to create something truly new, you need to go crazy with your mutations. You need to work in solutions that are moving away from the hills you can see around you. Only when you find a new and interesting hill, should you apply strict methodologies like A/B testing to climb it.

Posted in Uncategorized | 2 Comments

My poster at ECCS11

My poster at the European Conference on Complex Systems 2011 is called “A Process for Mapping Large Directed Networks to 2D Images and its Applications”.

20110913-112654.jpg

Posted in Uncategorized | Leave a comment

Deleting a Django Database

While developing an application with Django, it may take some time for the database model to stabilize. It’s common that you’ll want to add new columns to existing tables. Unfortunately, the ./manage.py syncdb command will not be sufficient in this case. If the database doesn’t contain any important data, a simple solution is to remove the existing database and create it again. But Django’s ./manage doesn’t directly include a command to remove the database. However, this is fairly simple to do by chaining two commands like so:

./manage.py sqlclear appname | ./manage.py dbshell

You’ll have to substitute “appname” with the name of your Django app, of course. The first command prints the sequence of SQL commands necessary to drop all tables for the given app. You then just have to pipe these SQL commands to Django’s database shell.

Then you can create the database again with the usual:
./manage.py syncdb

I like to program iteratively, and to increasingly add layers of complexity to my program, so having this sort of loop in place is very important for me.

Posted in Django, Python | 2 Comments

Installing NumPy and matplotlib on OS X

Given that OS X provides you with Python, you would expect it to be easy to install Python libraries on a modern Mac. Unfortunately, that’s not always true. Case in point: NumPy and matplotlib. These are my favorite tools nowadays for generic scientific computation and visualization. Going through the process of getting them to work for the nth time on a Mac, I decided to document the easiest way I found to do it, for my own future reference and in the hope that it helps someone.

Disclaimer: I’m doing this installation on Leopard (OS X 10.5) with Python 2.6.*. I assume the same procedure applies to later versions of OS X (yes, I’m a late adopter) and the Python 2 series.

I think if you have a good understanding of computer software then you really will have not trouble what so ever with this. Using a high speed internet connection, perhaps broadband from O2 or from elsewhere then you will be capable of downloading the following. It was important to me to find the easiest way of doing this. No one wants to spend hours installing software and hopefully with my help you won’t have to.

So there are many ways to go about it, but this is the simplest one I found. It’s completely based on binary .dmg files:

Step 1: Download and install the latest “Python 2.6.* Mac OS X Installer Disk image” from the official python.org download pages.

This gives you an up-to-date python installation that doesn’t interfere with the system’s one.
To test, type

python --version

on the command line, and the version of Python you just installed should be reported.

Step 2: Download and install the latest Numerical Python .dmg binary for OS X and Python 2.6 from NumPy’s sourceforge download page.

To test, start a python interpreter and try this:

>>> import numpy
>>> numpy.__version__

Step 3: Download and install the latest matplotlib .dmg binary for OS X and Python 2.6 from matplotlib’s sourceforge download page.

To test, start a python interpreter and try this:

>>> import matplotlib
>>> matplotlib.__version__

Et voilá, this should do the trick.

Extra tip: If you use the shebang:

#!/usr/bin/env python

instead of:

#!/usr/bin/python

the version of python you want will be automatically used when you run your script from the command line.

Posted in Python, Science, Tech Stuff | Tagged , , , , , , | 2 Comments

The One Bit Turing Test

The other day I was thinking about the Turing test and its implications. I like the Turing test more for its value as a thought experiment than has a real goal for Artificial Intelligence. My problem with it is that, short of synthesizing or emulating a human being, the only way to pass it is through deception. I find it perfectly conceivable that a high level, generic AI can be built that is not human-like. That sort of AI would not pass the Turing test. An AI could be more intelligent than any human alive and still not pass the Turing test, because it would lack the scope of experiences of human beings. It could be argued that such an high level AI could take the challenge of passing the test as a game, but it would still be a game of deception. I find that to be a rather contrived and inelegant goal.

Still I like to think about the Turing test, because it makes us question what we mean by intelligence. So I think of possible interesting modifications to the test. One thing I think about is simplifying the interface, so that human beings have less of an advantage. I imagine this interface where the only thing you see is a light that can be on or off. You have a button that activates the light of your interlocutor. The One Bit Turing Test. And we can make the light look like HAL 9000 for extra effect.

As it turns out, I found out after a bit of googling that the idea is not that original. User jutta at Halfbakery proposes a similar test, where you still have a text interface but you are only allowed to use 0s and 1s. I still like my version better, because of its temporal aspect. You can tap rhythms with the lights. You can try to be playful or annoying. You can try to see if you can get the entity on the other side to be bored or if you can get it to understand and start a game. In short, you would be looking for features that are likely universal to high level intelligences, instead of specific to us, the ultra-evolved apes.

Sure, it would still be possible to leak some broad human knowledge into the system. You could try to start tapping well known rhythms and see if the other side can complete them. But that seems way, way easier to achieve than to emulate all the knowledge, cultural context and emotional responses associated with natural languages.

How easy would it be to pass the one bit Turing test? What would you come up with to test for humanness on the other side?

Posted in Artificial Intelligence, Ideas, Philosophy | Tagged , , | Leave a comment