In this work we study the Antiferromagnetic Ising model with an imaginary magnetic field i\theta at \theta=\pi in two and three dimensions. For this purpose we develop a new algorithm that is not affected by the sign problem that give us the possibility to perform numerical simulations.