We develop a nature-inspired stochastic population-based algorithm and call it discrete particle swarm optimization tofind extended two-stage adaptive optimal designs that allow three target response rates for the drug in a phase II trial.Our proposed designs include the celebrated Simon’s two-stage design and its extension that allows two target responserates to be specified for the drug. We show that discrete particle swarm optimization not only frequently outperformsgreedy algorithms, which are currently used to find such designs when there are only a few parameters; it is also capableof solving design problems posed here with more parameters that greedy algorithms cannot solve. In stage 1 of ourproposed designs, futility is quickly assessed and if there are sufficient responders to move to stage 2, one tests one ofthe three target response rates of the drug, subject to various user-specified testing error rates. Our designs aretherefore more flexible and interestingly, do not necessarily require larger expected sample size requirements thantwo-stage adaptive designs. Using a real adaptive trial for melanoma patients, we show our proposed design requires onehalf fewer subjects than the implemented design in the study.