| Algorithm 1 Basic evolutionary strategy. | |
| while true do | |
| token, solution ← sampler.ask() | ▹ ask for candidate solution |
| loss ← evaluate(solution) | ▹ evaluate the given solution |
| sampler.update(token, loss) | ▹ give fitness result back to ES |
| sampler.update(token, loss) | |
| if loss < REQUIRED_LOSS then | |
| break | |
| end if | |
| end while | |