Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
60a7185
initial wrapper over hill_climbing optimizer
gauravmanmode Jul 27, 2025
c101bd8
Merge remote-tracking branch 'upstream/main' into gradient_free_optim…
gauravmanmode Jul 27, 2025
fdc8097
lazy_loading import and add docstrings for class and helper func
gauravmanmode Jul 27, 2025
a37771a
fix path in docs
gauravmanmode Jul 28, 2025
d190062
add base class for common options , add pso optimizer
gauravmanmode Aug 1, 2025
67d9904
grid points can be pytree
gauravmanmode Aug 2, 2025
cfe87f8
Merge branch 'main' into gradient_free_optimizers
gauravmanmode Aug 3, 2025
e5e5175
add test, n_init option
gauravmanmode Aug 4, 2025
23dc21d
add hillclimbing derivatives and docs
gauravmanmode Aug 4, 2025
27d0b1b
add tests
gauravmanmode Aug 5, 2025
73946de
remove pso
gauravmanmode Aug 5, 2025
9948a8b
refactor test_many_algorithms new
gauravmanmode Aug 10, 2025
90694b8
tune gfo algorithms temp to pass tests
gauravmanmode Aug 10, 2025
a1cd6cd
add sphereinternaloptimizationexample with converter
gauravmanmode Aug 10, 2025
c2958fd
pytree tests for gfo
gauravmanmode Aug 10, 2025
17bce2e
run new test_many comment old test_many
gauravmanmode Aug 10, 2025
d341b47
mypy override gfo
gauravmanmode Aug 10, 2025
312ded8
tune gfo to pass tests
gauravmanmode Aug 10, 2025
45f86e6
set accuracy of local from 4 to 3 temp
gauravmanmode Aug 10, 2025
a95a826
rename to gfo_optimizers, rename simplex parameters, add to ignore mypy,
gauravmanmode Aug 12, 2025
deae6c0
pass common_options as first argument to reduce clutter, rename to te…
gauravmanmode Aug 12, 2025
fb3ba70
negate fun value
gauravmanmode Aug 12, 2025
d55d8e0
test_many_algorithms add finite case for binding bounds, precision lo…
gauravmanmode Aug 12, 2025
290c88f
to default values
gauravmanmode Aug 13, 2025
3bdde60
tree bounds in sphereexamplewithconverter
gauravmanmode Aug 13, 2025
0512957
pass self directly in common_options
gauravmanmode Aug 14, 2025
3cfc2c1
add_other_algos
gauravmanmode Aug 18, 2025
f9405ab
only local opts, rename to extra_strat_points, and add warm_start opt…
gauravmanmode Aug 22, 2025
6eceedb
docs, add experimental field
gauravmanmode Aug 23, 2025
38f2db0
merge from gfo_pop, tests, renaming
gauravmanmode Aug 27, 2025
8d76a16
Merge branch 'main' into gradient_free_optimizers
gauravmanmode Aug 27, 2025
a013de4
Wrap gradient_free_optimizers (pop_based) (#636)
gauravmanmode Aug 28, 2025
16680b9
lower stopping maxtime to 1 sec
gauravmanmode Aug 28, 2025
b287027
pre-commit fixes
gauravmanmode Aug 28, 2025
3c6f6b1
Merge remote-tracking branch 'upstream/main' into gradient_free_opti…
gauravmanmode Aug 28, 2025
bef8ecd
Merge branch 'main' into gradient_free_optimizers
janosg Aug 28, 2025
68f25d0
update type hints
gauravmanmode Aug 30, 2025
daa9dbe
dont expose commonoptions
gauravmanmode Aug 30, 2025
5ff94d9
update docstring hillclimbing , stochastchillclimbing
gauravmanmode Aug 31, 2025
efe6dc1
fix in sphereexmaplewithconverter
gauravmanmode Aug 31, 2025
451de8c
self suff examples
gauravmanmode Aug 31, 2025
b0b70aa
Merge branch 'main' into gradient_free_optimizers
gauravmanmode Sep 13, 2025
e9659e0
Merge branch 'main' into gradient_free_optimizers
gauravmanmode Sep 19, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
240 changes: 240 additions & 0 deletions docs/source/algorithms.md
Original file line number Diff line number Diff line change
Expand Up @@ -4652,6 +4652,227 @@ Optimizers from the
package are available in optimagic. To use it, you need to have
[gradient_free_optimizers](https://pypi.org/project/gradient_free_optimizers) installed.

```{eval-rst}
.. dropdown:: gfo_hillclimbing

**How to use this algorithm.**

.. code-block:: python

import optimagic as om
import numpy as np
om.minimize(
fun=lambda x: x @ x,
params=[1.0, 2.0, 3.0],
algorithm=om.algos.gfo_hillclimbing(stopping_maxiter=1_000, ...),
bounds = om.Bounds(lower = np.array([1,1,1]), upper=np.array([5,5,5]))
)

or using the string interface:

.. code-block:: python

om.minimize(
fun=lambda x: x @ x,
params=[1.0, 2.0, 3.0],
algorithm="gfo_hillclimbing",
algo_options={"stopping_maxiter": 1_000, ...},
bounds = om.Bounds(lower = np.array([1,1,1]), upper=np.array([5,5,5]))
)

**Description and available options:**

.. autoclass:: optimagic.optimizers.gfo_optimizers.GFOHillClimbing
:members:
:inherited-members: Algorithm, object

```

```{eval-rst}
.. dropdown:: gfo_stochastichillclimbing

**How to use this algorithm.**

.. code-block:: python

import optimagic as om
import numpy as np
om.minimize(
fun=lambda x: x @ x,
params=[1.0, 2.0, 3.0],
algorithm=om.algos.gfo_stochastichillclimbing(stopping_maxiter=1_000, ...),
bounds = om.Bounds(lower = np.array([1,1,1]), upper=np.array([5,5,5]))
)

or using the string interface:

.. code-block:: python

om.minimize(
fun=lambda x: x @ x,
params=[1.0, 2.0, 3.0],
algorithm="gfo_stochastichillclimbing",
algo_options={"stopping_maxiter": 1_000, ...},
bounds = om.Bounds(lower = np.array([1,1,1]), upper=np.array([5,5,5]))
)

**Description and available options:**

.. autoclass:: optimagic.optimizers.gfo_optimizers.GFOStochasticHillClimbing
:members:
:inherited-members: Algorithm, object
:member-order: bysource

```

```{eval-rst}
.. dropdown:: gfo_repulsinghillclimbing

**How to use this algorithm.**

.. code-block:: python

import optimagic as om
import numpy as np
om.minimize(
fun=lambda x: x @ x,
params=[1.0, 2.0, 3.0],
algorithm=om.algos.gfo_repulsinghillclimbing(stopping_maxiter=1_000, ...),
bounds = om.Bounds(lower = np.array([1,1,1]), upper=np.array([5,5,5]))
)

or using the string interface:

.. code-block:: python

om.minimize(
fun=lambda x: x @ x,
params=[1.0, 2.0, 3.0],
algorithm="gfo_repulsinghillclimbing",
algo_options={"stopping_maxiter": 1_000, ...},
bounds = om.Bounds(lower = np.array([1,1,1]), upper=np.array([5,5,5]))
)

**Description and available options:**

.. autoclass:: optimagic.optimizers.gfo_optimizers.GFORepulsingHillClimbing
:members:
:inherited-members: Algorithm, object
:member-order: bysource

```

```{eval-rst}
.. dropdown:: gfo_simulatedannealing

**How to use this algorithm.**

.. code-block:: python

import optimagic as om
import numpy as np
om.minimize(
fun=lambda x: x @ x,
params=[1.0, 2.0, 3.0],
algorithm=om.algos.gfo_simulatedannealing(stopping_maxiter=1_000, ...),
bounds = om.Bounds(lower = np.array([1,1,1]), upper=np.array([5,5,5]))
)

or using the string interface:

.. code-block:: python

om.minimize(
fun=lambda x: x @ x,
params=[1.0, 2.0, 3.0],
algorithm="gfo_simulatedannealing",
algo_options={"stopping_maxiter": 1_000, ...},
bounds = om.Bounds(lower = np.array([1,1,1]), upper=np.array([5,5,5]))
)

**Description and available options:**

.. autoclass:: optimagic.optimizers.gfo_optimizers.GFOSimulatedAnnealing
:members:
:inherited-members: Algorithm, object
:member-order: bysource

```

```{eval-rst}
.. dropdown:: gfo_downhillsimplex

**How to use this algorithm.**

.. code-block:: python

import optimagic as om
import numpy as np
om.minimize(
fun=lambda x: x @ x,
params=[1.0, 2.0, 3.0],
algorithm=om.algos.gfo_downhillsimplex(stopping_maxiter=1_000, ...),
bounds = om.Bounds(lower = np.array([1,1,1]), upper=np.array([5,5,5]))
)

or using the string interface:

.. code-block:: python

om.minimize(
fun=lambda x: x @ x,
params=[1.0, 2.0, 3.0],
algorithm="gfo_downhillsimplex",
algo_options={"stopping_maxiter": 1_000, ...},
bounds = om.Bounds(lower = np.array([1,1,1]), upper=np.array([5,5,5]))
)

**Description and available options:**

.. autoclass:: optimagic.optimizers.gfo_optimizers.GFODownhillSimplex
:members:
:inherited-members: Algorithm, object
:member-order: bysource

```

```{eval-rst}
.. dropdown:: gfo_powells_method

**How to use this algorithm.**

.. code-block:: python

import optimagic as om
import numpy as np
om.minimize(
fun=lambda x: x @ x,
params=[1.0, 2.0, 3.0],
algorithm=om.algos.gfo_powells_method(stopping_maxiter=1_000, ...),
bounds = om.Bounds(lower = np.array([1,1,1]), upper=np.array([5,5,5]))
)

or using the string interface:

.. code-block:: python

om.minimize(
fun=lambda x: x @ x,
params=[1.0, 2.0, 3.0],
algorithm="gfo_powells_method",
algo_options={"stopping_maxiter": 1_000, ...},
bounds = om.Bounds(lower = np.array([1,1,1]), upper=np.array([5,5,5]))
)

**Description and available options:**

.. autoclass:: optimagic.optimizers.gfo_optimizers.GFOPowellsMethod
:members:
:inherited-members: Algorithm, object
:member-order: bysource

```

```{eval-rst}
.. dropdown:: gfo_pso

Expand All @@ -4660,6 +4881,7 @@ package are available in optimagic. To use it, you need to have
.. code-block:: python

import optimagic as om
import numpy as np
om.minimize(
fun=lambda x: x @ x,
params=[1.0, 2.0, 3.0],
Expand All @@ -4682,6 +4904,9 @@ package are available in optimagic. To use it, you need to have
**Description and available options:**

.. autoclass:: optimagic.optimizers.gfo_optimizers.GFOParticleSwarmOptimization
:members:
:inherited-members: Algorithm, object
:member-order: bysource

```

Expand Down Expand Up @@ -4717,6 +4942,9 @@ package are available in optimagic. To use it, you need to have
**Description and available options:**

.. autoclass:: optimagic.optimizers.gfo_optimizers.GFOParallelTempering
:members:
:inherited-members: Algorithm, object
:member-order: bysource
```

```{eval-rst}
Expand Down Expand Up @@ -4750,6 +4978,9 @@ package are available in optimagic. To use it, you need to have
**Description and available options:**

.. autoclass:: optimagic.optimizers.gfo_optimizers.GFOSpiralOptimization
:members:
:inherited-members: Algorithm, object
:member-order: bysource
```

```{eval-rst}
Expand Down Expand Up @@ -4783,6 +5014,9 @@ package are available in optimagic. To use it, you need to have
**Description and available options:**

.. autoclass:: optimagic.optimizers.gfo_optimizers.GFOGeneticAlgorithm
:members:
:inherited-members: Algorithm, object
:member-order: bysource
```

```{eval-rst}
Expand Down Expand Up @@ -4816,6 +5050,9 @@ package are available in optimagic. To use it, you need to have
**Description and available options:**

.. autoclass:: optimagic.optimizers.gfo_optimizers.GFOEvolutionStrategy
:members:
:inherited-members: Algorithm, object
:member-order: bysource
```

```{eval-rst}
Expand Down Expand Up @@ -4849,6 +5086,9 @@ package are available in optimagic. To use it, you need to have
**Description and available options:**

.. autoclass:: optimagic.optimizers.gfo_optimizers.GFODifferentialEvolution
:members:
:inherited-members: Algorithm, object
:member-order: bysource

```

Expand Down
2 changes: 1 addition & 1 deletion docs/source/how_to/how_to_bounds.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.16"
"version": "3.12.11"
}
},
"nbformat": 4,
Expand Down
Loading
Loading