Never wrong so far, I thought at first it was an eye thing cuzz your eye is pulled to a certain one because of the colors, then I thought it calculated the time you looked at it and figured it out by odds, not sure exactly now, will have to look at the code.
Unreal, play it 10 times (and don't pick 2 cards.....it'll still know the first one you picked!!! lol )
http://www.ebaumsworld.com/trick1a.html