(Y)
| 30 | |
| 31 | |
| 32 | def ackley(Y): |
| 33 | X = x_min + (x_max - x_min) * (Y + 1.0) / 2.0 # map to [-5, 10] |
| 34 | part1 = -a * jnp.exp(-b / jnp.sqrt(dim) * jnp.linalg.norm(X, axis=-1)) |
| 35 | part2 = -(jnp.exp(jnp.mean(jnp.cos(c * X), axis=-1))) |
| 36 | return part1 + part2 + a + jnp.e |
| 37 | |
| 38 | |
| 39 | def rastrigin(X): |
nothing calls this directly
no outgoing calls
no test coverage detected