There's a difference between collecting the maximum amount of stones and collecting more stones than the opponent. I suspect the winning program also tries to minimize the stones the opponent will be able to collect, thus preserving its marginal advantage.
Edit: Apparently colanderman beat me to it.