Fixed AI attacking algorithm