Changing my vote to an AK47.
Why you ask?
I really think the AR15 is the more accurate, and all round better rifle. BUT - I also feel that the gas-piston operation of the AK is more reliable (no hot carbon-filled gasses hitting the mechanism, less chance for dirt fouling things up). In a SHTF situation that's pretty important. There's a good chance you won't be able to get hold of too much cleaning solution. You need a gun that, above all else, is reliable. Doesn't matter how accurate it is, if the marauding crowds are banging at your door and your rifle jams, or is in pieces been cleaned - you are screwed. I also think the extra power of the 7.62mm round will be a big plus.
In peace time - the AR15 is, of course, much better.
I disagree on the DI gas "problem." If one's AR stops working just because of carbon deposits after a few hundred rounds, your rifle is broken and needs repair, or you're running some really bad ammo, or both.
A bigger argument can be made, however, against the AR in terms of external foreign matter getting into the rifle.
Case in point- My AR has gone like 700+ rounds and I haven't cleaned it yet. It hasn't jammed, hesitated, or done anything to make me think it would. On the same token I know if I took a handful of sand, opened the bolt, and tossed it in there, that I probably would have big problems.
In some ways even piston driven AR's don't really address this problem that well, because they use (basically) the same bolt carrier that DI gas ARs use; while the force cycling the action might be greater from the piston rifle, you could still jam up a piston AR by getting the bolt carrier region dirty enough- there isn't exactly a ton of clearance in this area. Compare this to an AK where the carrier/bolt has a lot of mechanical slop/room to spare, and the rifle locks up in this group instead of in the AK's barrel extension area.
A piston driven AR might be more reliable than a DI gas one, but it will never be as reliable as an AK, unless you get away from the standard AR upper receiver configuration.
This is also proved out in the sand tests someone posted... where the HK-416 still did "better" in the sand test than a DI gas ar, but still an order of magnitude worse compared to other designs which got away from the AR
upper configuration.
-Mike