Black-Box Optimization Toolkit
Overview
Features highly configurable search spaces via the 'paradox' package and optimizes every user-defined objective function. The package includes several optimization algorithms e.g. Random Search, Iterated Racing, Bayesian Optimization (in 'mlr3mbo') and Hyperband (in 'mlr3hyperband'). bbotk is the base package of 'mlr3tuning', 'mlr3fselect' and 'miesmuschel'.
- fix:
ArchiveAsync$best()withn_select > 1no longer reorders the task cache of rush in place, which changed the order of$finished_dataand$datafor all later calls (#387). - fix:
ArchiveBatch$add_evals()now checks thatxss_trafoedhas one element per row ofxdt, which silently corrupted thex_domaincolumn before (#366). - fix:
as.data.table(mlr_optimizers, objects = TRUE)now returns the optimizer in theobjectcolumn instead ofbase::t()for all optimizers but"chain"(#368). - fix:
assert_terminable()now decides whether an instance is single or multi-criteria from the codomain of the objective instead of the class of the instance, so terminators are checked correctly forOptimInstanceAsyncMultiCrit(#375). - fix:
$assign_result()and$result_yof the multi-criteria instances now only expect and return the target values of the codomain. A codomain with additional non-target parameters made$optimize()fail (#372). - fix:
assign_result_default()now raises a readable error when the terminator is already terminated before the first evaluation instead of failing withcolumn not found(#377). - fix:
bb_optimize()now creates a single-criteria instance for a codomain with one target and additional non-target parameters instead of a multi-criteria instance (#373). - fix:
branin()now adds thenoiseargument to the function value, which was ignored (#369). - fix:
context$xdtcan now be replaced by assignment in theon_optimizer_before_evalstage of aCallbackBatch, and the replaced points are both evaluated and written to the archive (#374). - fix: The C code of
local_search()now raises R errors instead of usingassert(), which aborted the R session and vanished entirely in a build with-DNDEBUG(#382). - fix:
local_search()now recognizes the termination condition raised by a terminator. The condition was re-raised and the RNG state was never written back, so all random numbers drawn in the C code were lost (#378). - fix:
local_search()now writes the RNG state back before it calls the objective, so an objective that draws random numbers no longer receives the numbers the C code consumed for mutation (#379).
Show all changes in 1.13.1Hide the rest of the changes in 1.13.1
- fix:
local_search()now compares parameter names, column names, list element names, and factor levels exactly instead of by prefix. A parameter or level whose name was a prefix of another one aborted the R session or made mutation a silent no-op (#380). - fix:
nds_selection()now only accepts aminimizeargument of length 1 or of the number of objectives, and rejects points with missing values (#365). - fix:
Objective$eval_many()no longer multiplies the number of rows when the objective returns an extra that is an atomic vector of length greater than one (#367). - fix:
optimize_async_default()now checks the instance and the properties of the optimizer before the workers are started, so unsupported parameter classes, dependencies, single or multi-criteria mismatches, and missing packages are reported in the main process instead of crashing the workers (#386). - fix:
optimize_async_default()now stops the workers on every exit path, including errors and interrupts. A failing optimization left the workers running before (#384). - fix:
OptimizerBatchChainnow runs the optimizers on the instance itself instead of on a clone. The terminator of the instance sees all evaluated points, so the overall budget is no longer exceeded, and points that were already evaluated before the chain started are no longer duplicated in the archive (#364). - fix:
OptimizerBatchIracenow passes thedigitsparameter to irace instead of always using 15 digits (#362). - fix:
OptimizerBatchIracenow writes the actual step of a race into thestepcolumn of the archive, which was always1(#363). - fix:
OptimizerBatchNLoptrno longer overwrites themaxeval,maxtime, andstopvalparameters. The internal termination criteria set by the user are now passed on tonloptr::nloptr()(#361). - fix:
OptimizerBatchRandomSearchrejects abatch_sizesmaller than 1, and$eval_batch()errors on an emptyxdtunless the search space is empty.opt("random_search", batch_size = 0)looped forever before (#370). - fix:
options(bbotk.debug = TRUE)no longer hangs when the optimizer returns before the terminator is satisfied, e.g. when the design ofOptimizerAsyncDesignPointsis exhausted (#385). - fix:
$result_yof the single-criteria instances now only returns the target values of the codomain. It errored for a codomain with additional non-target parameters (#371). - fix:
shrink_ps()now expects the point to shrink around on the scale of the search space instead of the transformed scale, and theuniroot()based inversion of the trafo is removed.OptimizerBatchFocusSearchshrunk the search space around the wrong point whenever the search space had a trafo (#360). - fix:
TerminatorRunTimenow reports an integer number of steps, so a fractionalsecsvalue no longer breaks$optimize()when progressr is loaded (#376).
From NEWS.md in the release
Install
Health
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK14 OK2026-04-16
- WARNING9 OK, 4 NOTE, 1 WARNING2026-03-21
- NOTE13 OK, 1 NOTE2026-03-17
Show 1 earlier changeHide 1 earlier change
- OK14 OK2026-03-10
Documentation
- Help pages
- 87 (13 internal)includes a package overview page
- Examples that run
- 100%50 run in a plain check
- Exported functions with examples
- 59%
- Documented parameters
- 100%
- Return-value docs
- 21%
- Help pages citing references
- 0%
Downloads
Repository
- PRs merged (all time)
- 93%
- Median days to close, 50 most recently updated closed issues
- 5
- Median days to close, 50 most recently updated closed PRs
- 13
Stars over time
Forks over time
Releases over time
Issues over time
PRs over time
Commits over time
16 development-tooling and community-health practices detected across 6 families in the upstream repository
Checks run against github.com/mlr-org/bbotk on 2026-10-18.
The R CMD check workflow runs on Linux, and on R-devel
Funding links: GitHub Sponsors
The repository owner accepts GitHub Sponsors
GitHub Pages site last deployed 2026-09-18 · The repository has a site deploy workflow
pkgdown site last built 2026-09-18
Show all practicesHide 2 practices
This repository shows signs of AI coding tools.
- Claude Codefirst seen on or before 2025-11-26Seen in the repository: .claude, CLAUDE.mdNamed in .Rbuildignore: .claude, CLAUDE.mdNamed in .gitignore: .claude, CLAUDE.mdPull request it wrote: opened by a project memberCommits: at least 42 crediting it in the message
- Cursorfirst seen 2026-03-05Named in .Rbuildignore: .cursor
- Gemini CLIfirst seen 2026-03-18Config: a file or ignore line, not recorded which
- GitHub Copilotfirst seen on or before 2026-06-11Commits: at least 1 crediting it in the message
- Codexfirst seen 2026-09-17Seen in the repository: .codexNamed in .Rbuildignore: .codex
- Claude Opus 530 commits · Aug to Sep 2026
- Claude Opus 4.86 commits · Jun to Jul 2026
- Claude Opus 4.62 commits · Mar 2026
- Claude Fable 51 commit · Jul 2026
- Claude Fable 5.11 commit · Sep 2026
1 more model not listed.
Dependencies
Installing bbotk adds 13 packages (9 with compiled code, 11 MB of source tarballs). Heaviest: data.table 5.7 MB, moocore 1.9 MB, rbibutils 1.1 MB.
Show all 22 packagesHide all 22 packages
Code & Tests
People & History
Pick two releases to compare their code metrics.
- 1.13.1Latest
- 1.13.02026-09-02 · diff ↗
- 1.12.02026-07-17 · diff ↗
- 1.11.02026-06-26 · diff ↗
- 1.10.12026-06-13 · diff ↗
- RR 4.6.0 released · 2026-04-24
- 1.10.0
- 1.9.02026-02-28 · diff ↗ ·
added 4 exports
EvalInstance, choose_search_space, error_bbotk, error_bbotk_terminated - 1.8.12025-11-26 · diff ↗
- 1.8.02025-11-06 · diff ↗
- 1.7.12025-10-24 · diff ↗
- 1.7.0
- 1.6.02025-06-03 · diff ↗
- RR 4.5.0 released · 2025-04-11
- 1.5.0
- 1.4.12024-11-27 · diff ↗
Show 30 earlier eventsHide 30 earlier events
- 1.4.0
- 1.3.02024-11-07 · diff ↗
- 1.2.02024-10-25 · diff ↗
- 1.1.12024-10-15 · diff ↗
- 1.1.02024-09-09 · diff ↗ ·
removed 1 export
evaluate_queue_defaultadded 2 exports
OptimizerBatchLocalSearch, TerminatorStagnationHypervolume - 1.0.12024-07-24 · diff ↗
- 1.0.02024-06-28 · diff ↗ ·
removed 13 exports
ArchiveBest, CallbackOptimization, ContextOptimization, OptimizerCmaes, OptimizerDesignPoints, OptimizerFocusSearch, OptimizerGenSA, OptimizerGridSearch, OptimizerIrace, OptimizerNLoptr, OptimizerRandomSearch, callback_optimization, optimize_defaultadded 45 exports
ArchiveAsync, ArchiveBatch, CallbackAsync, CallbackBatch, ContextAsync, ContextBatch, OptimInstanceAsync, OptimInstanceAsyncMultiCrit, OptimInstanceAsyncSingleCrit, OptimInstanceBatch, OptimInstanceBatchMultiCrit, OptimInstanceBatchSingleCrit, OptimizerAsync, OptimizerAsyncDesignPoints, OptimizerAsyncGridSearch, OptimizerAsyncRandomSearch, OptimizerBatch, OptimizerBatchCmaes, OptimizerBatchDesignPoints, OptimizerBatchFocusSearch, OptimizerBatchGenSA, OptimizerBatchGridSearch, OptimizerBatchIrace, OptimizerBatchNLoptr, OptimizerBatchRandomSearch, as_terminator, as_terminators, assert_archive, assert_archive_async, assert_archive_batch and 15 more - RR 4.4.0 released · 2024-04-24
- 0.8.02024-02-29 · diff ↗
- 0.7.32023-11-13 · diff ↗
- RR 4.3.0 released · 2023-04-21
- 0.7.22022-12-08 · diff ↗
- 0.7.12022-11-30 · diff ↗
- 0.7.0
- 0.6.02022-10-25 · diff ↗ ·
added 6 exports
CallbackOptimization, ContextOptimization, callback_optimization, clbk, clbks, mlr_callbacks - 0.5.4
- 0.5.32022-05-04 · diff ↗
- RR 4.2.0 released · 2022-04-22
- 0.5.22022-04-04 · diff ↗
- 0.5.12022-02-25 · diff ↗
- 0.5.02022-01-19 · diff ↗ ·
removed 2 exports
assert_codomain, mult_max_to_minadded 3 exports
Codomain, branin, nds_selection - 0.4.0
- RR 4.1.0 released · 2021-05-18
- 0.3.22021-03-18 · diff ↗
- 0.3.12021-03-12 · diff ↗
- 0.3.0
- 0.2.2
- 0.2.12020-09-05 · diff ↗
- 0.2.02020-07-24
- RR 4.0.0 released · 2020-04-24
Package metadata
- First published
- 2020-07-24
- Total releases
- 39 / 6 yrs
- License
- LGPL-3 OSI
- Minimum R
- ≥ 3.1.0
- Download size
- 184 KB
Cite
Cite this package
Run in R for the authors' entry:
citation("bbotk")The package provides a citation file, so citation() returns the authors' own entry.
It points to 10.5281/zenodo.20669808.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-21, which the citation names so these numbers can be found later. More on citing and the projects behind them.