Magnetic reversal of artificial spin ice