Find a valid position for an agent in 1000 iterations