XBBO is an an effective, modular, reproducible and flexible black-box optimization (BBO) codebase, which aims to provide a common framework and benchmark for the BBO community.
This project is now supported by PengCheng Lab.
Overview | Links |Installation | Quick Start | Benchmark |Contributing | License
For more information and API usages, please refer to our Documentation.
Overview
XBBO decouples the search algorithm from the search space and provides a unified search space interface, allowing developers to focus on the search algorithm.
We provide these black box optimization algorithms as follows:
Search Algorithm |
Docs |
Official Links |
BORE optimizer |
|
|
Anneal |
|
|
DE |
|
|
CMA |
|
|
NSGA |
|
|
Regularized EA |
|
|
PBT |
|
|
TuRBO |
|
|
LaMCTS |
|
|
HyperBand |
|
|
BOHB |
|
|
DEHB |
|
|
MFES-BO |
|
|
TST-R |
|
|
TAF |
|
|
TAF(RGPE) |
|
|
RMoGP |
|
|
RGPE(mean) |
|
|
Links
Installation
Python >= 3.7
is required.
Installation from PyPI
To install XBBO from PyPI:
pip install xbbo
For detailed instructions, please refer to Installation.md
Quick Start
note:
XBBO default minimize black box function. All examples can be found in examples/
folder.
import numpy as np
from xbbo.search_space.fast_example_problem import build_space_hard, rosenbrock_2d_hard
from xbbo.search_algorithm.bo_optimizer import BO
from xbbo.utils.constants import MAXINT
if __name__ == "__main__":
MAX_CALL = 30
rng = np.random.RandomState(42)
# define black box function
blackbox_func = rosenbrock_2d_hard
# define search space
cs = build_space_hard(rng)
# define black box optimizer
hpopt = BO(space=cs,
objective_function=blackbox_func,
seed=rng.randint(MAXINT),
suggest_limit=MAX_CALL)
# ---- Use minimize API ----
hpopt.optimize()
best_value, best_config = hpopt.trials.get_best()
print('Find best value:{}'.format(best_value))
print('Best Config:{}'.format(best_config))
Please refer to Quick Start.md for more information.
Benchmark
XBBO provides an easy-to-use benchmark tool, users can easily and quickly test the performance of the variety black-box algorithms on each test problem. Clik here for more information.
Contributing
We welcome contributions to the library along with any potential issues or suggestions.
Please refer to Contributing.md in our docs for more information.
License
This project is released under the MIT license.
TODO