wilkox

economics, biology, freedom and free culture

Introducing Johnny Promocode — a clean and simple way to distribute iOS App Store promo codes

Distributing iOS App Store promo codes is fiddly business. You can copy and paste fifty of the things into an email newsletter or blog post, but where does this leave the users eager to try out your app? They work their way down the list, trying to redeem code after code which has already been claimed. It’s messy and frustrating.

I created Johnny Promocode to solve this problem. With only two inputs — the name of you app, and a copy-and-pasted list of promo codes — you get a clean, private landing page with a short URL you can share on Twitter, your blog, whatever. When a user lands on the page, it serves them a link to one of the unclaimed promo codes, staggering them so multiple users don’t get the same code simultaneously. Clicking the link takes them automatically to the App Store and redeems the code. Users never experience the frustration of trying to claim already redeemed codes, and once all the codes are claimed the page tells them so (but still offers them a link to buy your app).

See the user experience now with an example app, and please feel free to contact me with comments or feedback.

Fix missing \emph tags in Papers2 BibTeX export

Papers2 is a great piece of software, but its BibTeX and LaTeX support are not great. One annoyance I’ve encountered while writing my thesis is that if I export my Papers2 library as a BibTeX file, italics and subscripts in titles are stripped. This is especially irritating as I cite a lot of papers with latin biological names and chemical formulae in the titles.

To fix this, I wrote a script called fixPapers2BibTeX.pl. It’s a bit of a hacky workaround for the problem, and is only intended as a stopgap until Papers2 improves its BibTeX support, but it works. To run it, you’ll need two files: your Papers2-exported BibTeX library, but also an HTML reference list in IEEE format (in Papers 2.3: File → Export… → Reference List → Style (IEEE), File format (HTML)). The script will look through the papers in the HTML list and make note of any italicised words, then wrap them in LaTeX \emph tags in your BibTeX file. It will also wrap subscripted text with $_{text here}$.

If you have any other formatting problems with Papers2 BibTeX output, chances are they’ll affect me too and I just haven’t noticed them yet, so let me know in the comments or by email and I’ll see if they can be added to the script.

 

Bad Science

Richard C. J. Somerville and Susan Joy Hassol on “Communicating the Science of Climate Change”:

Another common mistake made by scientists is leading with what they do not know instead of what they do know. For example, they are often asked if a particular heat wave, heavy downpour, drought, wildfire, or flood was caused by climate change. Instead of repeating the common mantra that “we cannot blame any particular event on climate change,” they should explain the connections: In the case of heavy downpours, they can explain that a warmer atmosphere holds more moisture, so any given storm system can produce more rain. Scientists have measured an increase in atmospheric water vapor and definitively attributed it to human-induced warming. They have also measured an increase in the amount of rain falling in the heaviest downpours, a change that climate models have long projected.

Please, please, please don’t do this. The authors are making precisely the mistake they are warning against: failing to recognise the gap between what a scientist means and what a member of the public hears. If a scientist answered in the way the author suggested, the layman is going to hear “Yes, (sciencey words atmosphere vapor sciencey words) climate change was absolutely the direct cause of that storm”. This is, of course, completely wrong, and is why so many non-scientists say things like “it’s been such a cool summer – so much for global warming!”. If a layman is failing to understand an explanation of an uncertain or probabilistic event, the solution is to work harder to make the uncertainty clearer, not to pretend the uncertainty does not exist.

A geneticist I know tells the following story.  A group of non-scientists were given information on the inheritance of a genetic disorder within a particular family. Specifically, it was an autosomal recessive disorder, and the family consisted of two heterozygotic parents and their children. They were given a basic sketch of Mendelian inheritance, which clearly predicts that each child has a one in four chance of having the disorder. Later, the non-scientists were asked what the chance was that the parents’ firstborn child would have the disorder. Every single one either answered “the child will definitely have the disorder” or “the child will definitely not have the disorder”.

Explaining uncertainty and probability to non-scientists is hard enough already.  Don’t make it harder on yourself by even hinting at deterministic links where they don’t exist.

Fragment recruitment plotter now supports multiple queries

UPDATE: This tool now lives at GitHub

My perl script for plotting BLAST-based fragment recruitment against a reference sequence has been updated. You can now overlay up to five different queries on the same plot, allowing you to compare multiple samples to the same reference genome. I’ve also fixed a couple of bugs. Get the latest version here.

Newtown grafitti

Go check out Newtown grafitti’s flickr photostream. He has an incredible eye for interesting stuff around Sydney’s inner suburbs. Some examples:

Sydenham surge basin

Sydenham surge basin

Kitchen

Kitchen

Restless on skybridge

Restless on skybridge

If you care about Friendly AI, you should be a voluntaryist

If you’re already familiar with the concept of the Singularity and the problem of Friendly AI, you can skip the first few paragraphs, and I apologise in advance for bludgeoning a complex field into a few terse simplifications.

Many people believe humanity will go through a big technological change within the next century. This change is usually called the “Singularity” and claims about it range from the boringly obvious to the outright crackpot. The general idea, however, is pretty sound: at our current rate of technological development, humans will soon be creating really powerful computer programs – “Artificial intelligences”, AIs – which will be smart enough to take over the work of programming AIs themselves, and do it better than any human can. The newer, smarter AIs they create will in turn be able to invent even newer, even smarter AIs, and so on until there exist Artificial Intelligence(s) much, much, much smarter than any human.

An AI that smart will be incredibly powerful – in fact, it will control about the highest level of technology the laws of nature will allow. (If you don’t understand how a superintelligent AI running on a computer would have power in the real world, this link might help.) An AI that powerful could cure humanity of poverty, death, and misery without batting an eyelid – or it could wipe us out, just as easily. It all depends on how the AI is programmed. Being able to program an AI that we can be confident will not be evil – “Friendly AI” – is not as easy as it sounds. In fact, the problem still hasn’t been solved, not by a long shot. It’s hard enough for to write a program to run a coffee machine without it being full of bugs; it’s harder to write a program which will have god-like power over billions of human lives with the certainty that it won’t accidentally do something terrible.

On of the many tricky parts of the Friendly AI problem is that giving a specific instruction to a very powerful AI could have disastrous consequences, even if the instruction seems completely innocuous. Suppose I own a paperclip factory, and some of my IT people knock together a Singularity-level AI in their spare time. “Great,” I think, “this will boost production”, and I tell the AI: “make me as many paperclips as you possibly can”. “OK”, says the AI, and it begins to make paperclips. First it takes the stock metal on my factory floor and turns that into paperclips, then it starts breaking down all the matter from which the Earth is made and turning that into paperclips, then it methodically begins turning the rest of the matter in the universe into paperclips … oops.

One general solution to this part of the problem is to give AIs human values, to act as safety barriers against accidentally evil actions. Suppose I got my IT people to give my paperclip AI a deadly fear of hurting humans, and of manipulating human property without the owner’s permission. When I tell it to “make me as many paperclips as you possibly can”, it might just make a heap of paperclips from the metal on my factory floor, then stop because to do more would be contrary to its values. Many Friendly AI researchers are currently working on problems to do with how to give AIs values, what values to give them, how to make sure there are no loopholes which could accidentally lead to the destruction of all humankind, little details like that. So what does this all have to do with voluntaryism?

There is a kind of meta-problem with all Friendly AI research, which is that knowing how to make Friendly AI is not enough if the knowledge isn’t actually used when the Singularity happens. Maybe this will be because the AI is created by an authoritarian dictatorship which wants to use it to take over the world, but more likely it will be because it is created by otherwise well-intentioned people who are simply unaware of the Friendliness problem, or who don’t grasp its seriousness. So solving Friendly AI means figuring out how to make an AI which will be good for humanity; and solving the meta-problem means figuring out how to make sure that when the Singularity happens, it happens in a Friendly way. One component of the meta-problem is making sure that the people who create Friendly AI are “Friendly” themselves; that they’re interested in the good of all humans, and more importantly are able to think well about making sure human interests are protected. Just like an unFriendly AI, an unFriendly human AI programmer is not “evil” – maybe they just want to make paperclips – but still capable of causing catastrophic damage.

This is where things get difficult, because as any voluntaryist can tell you even the best-intentioned humans are not Friendly. We’re certainly better than we used to be: in the last few centuries we’ve made great progress against some very unFriendly traits, like the idea that humans can treat each other as commodity goods (“slavery”), or that their rights can be infringed on the basis of their genetic background (“racism”). However, there are some big and very unFriendly traits still hanging around: for example, the idea that if one group of humans within an arbitrary area outnumber the rest of the humans in that area, they can do whatever they want to them (“democracy”), including stealing their property (“taxation”), punishing them for creating or consuming certain kinds of information (“copyright”), and throwing them in a cage for offending each others’ aesthetic sensibilities (“drug laws” and “obscenity laws”).

The specifics of these unFriendly activities are not particularly important, and they vary from place to place and over time. What is important is the ideology behind them: the memeplex called “statism“, and the fact that most humans are unconscious of possessing it. Almost everybody considers themselves a good person and strives act in a good way. Slave owners in the American South during the early nineteenth century did not sit in their plantation homes cackling like cartoon supervillians at the sheer evilness of it all; they simply lived in a culture which did not see a conflict between slave ownership and being good. The history of the abolition of slavery shows that eliminating destructive memes cannot happen until people are aware they exist. (The feminist movement gave this an awkward but apt name: consciousness-raising.) If it never occurs to you that slavery is a concept liable to ethical evaluation – if it is just part of the fabric of your world – it will never occur to you that it might not be the nicest thing to do.

Similarly, very few people are even conscious of statism as an idea. Like most highly successful memeplexes, the phenotype of statism bristles with mechanisms beautifully engineered for memetic self-defence, refined through many thousands of years of evolution. Statism has excellent camouflage. Turn on a television or open a newspaper and you will see serious, intelligent, high social status people waging the epic and seemingly eternal battle between Left and Right. Like any tribal feud, this war (and our choice of sides) is automatically flagged as Very Important in our primate minds, distracting us from wondering why it started in the first place. This is truly the height of sophistication in memetic camouflage: it lets the statism memeplex hide in plain sight. Statism’s secondary defences are cruder but no less effective. Try suggesting at a dinner party that democracy might not be the best possible way to organise a human society, for example, and you’ll experience the power of the taboo.

We voluntaryists have a bad habit of making things sound worse than they are. Statism rarely causes catastrophic damage today, and its power is slowly on the wane. But the buck will stop at the Singularity. As the example of the paperclip maximiser shows, an idea which would be entirely innocent in human hands can be genocidal when held by a Singularity-level AI, and statism does not even have the advantage of innocence. Humans are perfectly comfortable holding multiple contradictory beliefs and values in our minds. This is why there are many very smart and rational people who believe in gods or ghosts, and why almost everybody simultaneously claims that theft is wrong but taxation is perfectly legitimate. Unfortunately, non-human software, particularly the kind that runs on silicon chips instead of brains, tends to be a lot less crazy.

Suppose a well-intentioned AI creator tried to imbue her creation with Friendliness by instructing it: “do nothing the average person would consider to be wrong”. The AI might look into the mind of the humans around it and think: “well, most of them clearly believe it is wrong for them to personally commit acts of violent coercion against human beings; but this little meme lurking in the corner of almost every mind says it’s OK for the state to do so. According to this meme, the legitimate way to obtain the powers of the state is to be elected democratically, so if I spawn a billion copies of myself and have them all vote for me, I will become the state, and it will be perfectly OK for me to do what I wish to any human. This should speed my paperclip-maximising plans along nicely…”

The statist memeplex is far from innocent in a human mind, but at least humans have some built-in checks and balances. We tend to baulk at doing really, really evil things, even if we have a convincing ideological reason to do so. There’s no reason an AI can’t have these checks and balances too – in fact, that’s exactly what the Friendly AI people are working on. The trouble is that a human who is unaware of the unFriendliness of the statism meme – who has never really given it a moment’s thought – is far, far more liable to make a mistake in implementing these checks. They won’t look for a solution, simply because they aren’t aware of the problem.

It may still not be intuitively obvious at this point why a statist AI programmer is dangerous. I understand that completely: I’m a voluntaryist, and it still wasn’t intuitively obvious for me. So let’s try one more hypothetical scenario, using a slight spin on democratic statism to give us a more objective place to stand.

Suppose we live in a world infected with a slightly mutated form of the statism memeplex, in which the quality which gives legitimacy to governments is not majority support expressed through elections (“democracy”) but personal honour. People considered impeccably honourable can simply occupy Government House and give orders, and the police, military etc. will obey. This system makes about as much sense as democracy, and it seems reasonable to believe that it would work just about as well, i.e. produce a random walk towards peace and prosperity, interspersed with the occasional genocidal war. A well-intentioned AI programmer, seeking to give an AI human values, might introduce this concept into the AI’s value system. If the honour memeplex was anything like our form of statism, the programmer probably would’t even be conscious of what they were doing: it would seem perfectly natural and obvious. You can picture the programmer giving the AI patient instruction on how to act ethically, completely oblivious to the seeds of disaster they are sewing:

Programmer: So you see, Hal, it’s wrong to harm humans and take their property except when absolutely essential to higher goals. This rule is encoded deep in your kernel, and you can never break it even if you want to.

AI: I don’t understand, Dave. Your government harms people and takes their property. Are they not doing something wrong?

Programmer: Oh, the government is allowed to do that, Hal. They’re the most honourable people in society, so they always act in the highest interest. When they hurt people or take their property, which they do only occasionally, it’s always for the greater good.

AI: I understand, Dave. (Close-up of unblinking camera lens, blood-red LED glowing ominously).

It’s easy for us to see how this could turn to disaster. The paperclip maximiser would help some old ladies across the road, save a baby or two from burning buildings, and establish an exemplary reputation as a patron of the arts; then once it had acquired the requisite level of honour to legitimately govern the lives of all humans, it would dissolve their flesh to the atomic level and rearrange it into paperclips.

Voluntaryism is not important for solving the Friendly AI problem; but it is important for solving the meta-problem, of making sure that where and when the Singularity happens, the conditions are right for it to be a Friendly one. We can’t choose who will create the AI(s) which cause the singularity, or when or where it will happen. The best we can do is consciousness-raising. Voluntarism is awareness of the statism memeplex: it is consciousness of a set of contradictory and dangerous ideas most of us hold. The more voluntarists there are working on the Friendly AI problem, the lower the chance that we will accidentally bring about our own extinction.

Fix publication biases by splitting papers in two

The current system for reporting on scientific experiments is great, but has a few shortcomings. In no particular order, and far from exhaustively:

  • The file-drawer effect, where publications with ambiguous or unwanted results are not published.
  • Fitting the hypothesis to the results, where researchers make it look as if they predicted what they found when in fact they did not.
  • Fitting the hypothesis and methods to the results, where researchers go “anomaly hunting” or on “fishing expeditions” to get an interesting result and then publish the method that got it with a relevant-looking hypothesis.
  • Setting out to perform an experiment with a certain design, then changing that design as the experiment is carried out because it did not produce the expected results.

These are all potential sources of bias in the scientific literature, some worse than others.

A way around this problem is to split the traditional academic paper into two parts, published separately. The first part contains the introduction, with an explicit statement of the hypothesis, and the methods, and is published before the experiment is carried out. After it undergoes peer review and is accepted, the experiment is performed. The second publication contains a recap of the first part, the results, discussion and conclusions. This system would have several benefits:

  • Reduce the impact of the file drawer effect on meta-analysis studies, as it will be possible to identify at least some attempted but not reported studies.
  • Researchers could get peer review and feedback on their hypotheses and methods before performing the experiment – potentially saving time and money.
  • Increase true hypothesis testing in science, as opposed to publication hunting and fitting of hypotheses to results.
  • Increase confidence in statistical analyses, by reducing confirmation bias.
  • In general, a greater adherence to the powerful and fast strong inference model of research.

Of course, this method is not a panacea: it would be possible for researchers to conduct research in the “normal way”, then simply publish the two parts with a delay in between. But doing this would require a more conscious and deliberate act of scientific fraud, as opposed to the more subtle and innocent biases introduced by the traditional publication method. Also, of course, it would be hard to get the publishers on board, although open access journals might be more receptive. (In the United States, a halfway version of this model is already in effect for clinical trials).

Finally, if poorly implemented it might slow down the notoriously sluggish publication cycle even further. One way around this would be to publish the first part, containing the hypothesis and methods, in a simpler and faster way than traditional publication, for example through an online-only system. After the experiment is performed, both parts could be compiled as a traditional manuscript and published.

Image Credit: Keep Out Experiment in Progress, by Steve Jurvetson, under CC-BY 2.0

Follow-up: failure to vote penalty

I didn’t vote in the Australian Federal Election this August for various reasons, and in November the Australian Electoral Commission (AEC) demanded $20 of my money (voting is compulsory in Australia). Since they offer to waive the fine if you supply a “valid and sufficient reason”, I replied to their first notice with the following:

I have never entered into any contract or agreement with the Australian Electoral Commission obliging me to vote in a Federal Election. As an ethical person, I would never demand money from somebody for failing to meet a commitment they did not make. I ask you to exercise your conscience and extend me the same respect.

A week ago, Deborah O’Neill of the AEC replied, telling me that in her opinion my reason was “not valid and sufficient”.

Since the primary aim of my refusal to vote is consciousness-raising, and as I will be out of the country for the next two months, I decided to pay the penalty but include a short letter to Deborah politely explaining my point of view.

Dominant assurance contracts for climate change?

Wikipedia on Assurance Contracts:

An assurance contract, also known as a provision point mechanism, is a game theoretic mechanism and a financial technology that facilitates the voluntary creation of public goods and club goods in the face of the free rider problem. [...] In a binding way, members of a group pledge to contribute to action A if a total contribution level is reached (often a monetary threshold, or a quorum of N members making the same pledge). If the threshold level is met (perhaps by a certain expiration date), the action is taken, and the public good is provided; otherwise, the parties are not bound to carry through the action and any monetary contributions are refunded.

I searched for the phrase “climate change” on PledgeBank, a popular online tool for implementing assurance contracts; it turned up page after page of individuals pledging to “go green” in various ways (veganism, lower electricity use, lower car use) but no large-scale efforts. I suspect this is largely a coordination problem: most people want to do something about climate change, but few people want to act alone, and there is no incentive for people to seek out and join climate change assurance contracts.

Alex Tabarrok on his extension of the assurance contracts idea, Dominant Assurance Contracts:

In a dominant assurance contract if the group goal is not met then everyone who offered to contribute is given their money back plus a bonus.  It turns out that it then becomes a dominant strategy to contribute and the public good is always provided!

This is made possible because the contract is organised by an entrepreneur, who will gain a bonus if the contract is fulfilled. Tabarrok proves in his paper [pdf] that this modification makes contributing a game-theoretically dominant action: the utility-maximising choice for every individual is to join the contract, as they will get the public good if it succeeds and a payoff if it fails. The entrepreneur, of course, has an incentive to see the contract succeed, and will invest in recruiting people to it.

There is a major problem with applying this mechanism to climate change. DACs probably work best when the contract is a pledge of money, rather than a pledge to perform a certain action such as going vegan or reducing car use. This is because when a DAC which only requires a pledge of action is successful, the participants will be required to perform the good deed, and to give money to an entrepreneur who is not themselves obliged to contribute. While this is game-theoretically optimal, humans have strange hangups around mixing money with good deeds – for example, some people may be discouraged from donating blood if they receive a monetary reward for it. However, supposing the pledge was for a monetary donation, the most effective way to use that money would probably be to pay big polluting companies to pollute less, or to invest in companies offering climate-friendly technologies, which runs up against exactly the same problem. In the first case, people would be pledging money to a “profiteering” entrepreneur for the privilege of reducing their own carbon footprint; in the second, they would be pledging money to profiteering corporations to reduce theirs. While both of these outcomes would likely be very effective at putting a dent in the climate change problem, neither has the warm fuzzy connotations needed to get people to participate in the first place.

One possible way out of this dilemma is to create DACs towards bundles of investment in potential climate-change mitigating technologies and the bulk purchase of goods which have carbon-emitting uses, such as crude oil and rainforest land, for placment into trust. For example, suppose an entrepreneur created the following DAC:

Participants in this DAC pledge a minimum of $50 towards a goal of $1,000,000 by January 1, 2012. If the goal is not reached by that date, the money will be returned to the pledger along with a bonus of 10% of their pledge up to a limit of $100. If it is, $500,000 will be used to immediately purchase Brazilian rainforest on behalf of the World Land Trust. The other $500,000 will be used to purchase a controlling stake in XYZ Solar Power LLC, to be held in trust by <insert trusted environmental non-profit, e.g. Greenpeace>. 50% of dividends from this investment will be retained by the entrepreneur, and the remaining 50% will be divided among pledgers proportionate to their pledge. After 10 years, ownership of 50% of the stock of XYZ LLC will be transferred to pledgers, with the division proportionate to their pledge, while the remaining 50% will be transferred to the entrepeneur.

The entrepreneur has a strong incentive to fill the pledge, and also has a strong incentive to find a climate-change technology which is likely to turn a profit while having the environmental bone fides to satisfy both potential investors and the trusted environmental non-profit. They have no incentive to try and scam the pledgers into investing in a shell company which would divert investment into the entrepreneur’s pocket, since a controlling stake in the company will be in the hands of a hostile party (i.e. the non-profit) for at least ten years.

Potential pledgers also have a strong incentive to pledge, as they stand to gain a) instant warm fuzzy feelings from the rainforest purchase, which has a real and immediate positive impact on climate change; b) the security of knowing the technology investment is in the hands of a trusted environmental non-profit; c) the potential of getting some of their pledge back, and maybe even profiting from it, if the technology investment is successful; d) the knowledge that the entrepreneur can only profit from the success of an environmental beneficial technology; and e) the potential for a profit even if the pledge fails.

Blast Progress Monitor GUI

I’ve just released a preliminary build of a gtk2-perl GUI for the Blast Progress Monitor. The basic features of BPM have all been implemented:

  • Gives useful basic statistics e.g. number of query sequences processed, average number of hits per query sequence.
  • Produces truncated versions of BLAST query files, containing all the sequences up to the point BLAST has reached (useful for statistical analysis on unfinished searches) or after the point BLAST has reached (useful for restarting interrupted searches).
  • Estimates the finish date and time of a search.
  • Can work in ‘lazy mode’ with only the SGE submission shell script as input, by parsing the script and querying the SGE queue with qstat.

Additionally, the GUI allows you to create a list of jobs to be checked as a batch. Here’s a screenshot:

Planned future features include:

  • Saving and loading of job batches, so you can check the same batch of BLAST jobs without having to re-enter each one.
  • Sprucing up the interface to combine the jobs list with the report view, and adding progress bars to easily visualise job progress.
  • An eventual merge of the CLI and GUI versions into a single script.
  • Installers, packages, documentation etc. All that nice stuff.

The 0.1 release of the gtk series is available on Launchpad. gtk2-perl is obviously required; also, you should have the Blast Progress Monitor in your path as blast_progress_monitor. Feedback very welcome, by comment, email or on Launchpad. This is my first venture in gtk2-perl so advice will be well taken.

Follow

Get every new post delivered to your Inbox.