# \[ANN\] PolyStep.jl: Gradient-free optimization with batched evaluations - v0.3.0

**URL:** <https://discourse.julialang.org/t/ann-polystep-jl-gradient-free-optimization-with-batched-evaluations-v0-3-0/142784>\
**Category:** Package Announcements\
**Created:** [November 5, 2026, 11:56am UTC](https://discourse.julialang.org/t/ann-polystep-jl-gradient-free-optimization-with-batched-evaluations-v0-3-0/142784 "2026-11-05T11:56:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![anindex](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/anindex/32/225042_2.png) [@anindex](https://discourse.julialang.org/u/anindex)\
**Post date:** [November 5, 2026, 11:56am UTC](https://discourse.julialang.org/t/ann-polystep-jl-gradient-free-optimization-with-batched-evaluations-v0-3-0/142784/1 "2026-11-05T11:56:09Z")

</div>

Hi everyone!

I’d like to share **PolyStep.jl** , a gradient-free optimizer for general black-box objectives in Julia.

It works directly with function evaluations, so you can use it with smooth, nonsmooth, or piecewise-constant objectives without providing gradients. This can be useful when your objective involves a simulation, an `argmax`, or a combinatorial solver, or when computing gradients is inconvenient.

The package is **registered and MIT-licensed** , and integrates with **Optimization.jl** through `PolyStepOptimizer`.

To install:

```julia
using Pkg
Pkg.add(["Optimization", "PolyStep"])

```

Here’s a simple example minimizing a smooth objective:

```julia
using Optimization, PolyStep, Random

f(u, p) = sum(abs2, u)
prob = OptimizationProblem(f, fill(5.5, 10))

sol = solve(
    prob,
    PolyStepOptimizer(epsilon = 0.1, step_radius = 1.0);
    maxiters = 100,
    batched = X -> vec(sum(abs2, X; dims = 1)),
    rng = Xoshiro(0),
)

(sol.objective, sol.retcode)

```

The optional `batched` keyword lets you evaluate all candidates in a round with a single call. If you have a vectorized implementation of your objective, you can pass it in here.

The integration also supports bounds, maximization through `MaxSense`, `maxiters`, `maxtime`, and callbacks.

I’d love to hear what people try it on, whether that’s parameter tuning, simulation-based optimization, or objectives with discrete decisions inside them. If you give it a go, I’d love feedback on what works, what’s tricky, and what could be easier to use.
