Robopocalypse: A Novel by Daniel H. Wilson
SPOILER
It seems to me that, despite how the turn of events are explained, we'd have no..none, zero, chance at winning that war.