Installation#
Surfaces is designed to be lightweight. The core installation requires only numpy as a dependency.
Core Installation#
pip install surfaces
This gives you:
All Algebraic test functions (1D, 2D, N-D)
All BBOB functions (Black-Box Optimization Benchmarking)
All CEC functions (Competition on Evolutionary Computation)
All Engineering design problems
Requirements:
Python 3.10 or higher
NumPy >= 1.18.1
That’s it. No heavy dependencies, fast installation, CI/CD friendly.
Optional Features#
Add features only when you need them:
Additional setup for CEC benchmark suites. Some CEC functions require extra configuration.
pip install surfaces[cec]
ML-based test functions using scikit-learn, XGBoost, and other ML libraries.
pip install surfaces[ml]
Pre-trained surrogate models for fast evaluation of expensive functions.
pip install surfaces[surrogates]
Surface plots, contour plots, and interactive visualizations.
pip install surfaces[viz]
Full Installation#
Install everything at once:
pip install surfaces[full]
This includes all optional features: ML functions, surrogates, and visualization.
Installing from Source#
For the latest development version:
git clone https://github.com/SimonBlanke/Surfaces.git
cd Surfaces
pip install -e .
For development with all dependencies:
pip install -e ".[dev,test]"
Verifying Installation#
import surfaces
print(f"Surfaces version: {surfaces.__version__}")
# Test a simple function
from surfaces.test_functions.algebraic import SphereFunction
func = SphereFunction(n_dim=2)
result = func({"x0": 0.0, "x1": 0.0})
print(f"Sphere(0, 0) = {result}") # Should print 0.0
Platform Support#
Surfaces is tested on:
Linux (Ubuntu)
macOS
Windows
Troubleshooting#
Import Errors#
If you get import errors for specific features:
# For ML functions
pip install surfaces[ml]
# For visualization
pip install surfaces[viz]
# For surrogates
pip install surfaces[surrogates]
Version Conflicts#
Try a fresh virtual environment:
python -m venv surfaces-env
source surfaces-env/bin/activate # Windows: surfaces-env\Scripts\activate
pip install surfaces
Getting Help#
Check the FAQ for common problems
Search existing issues
Open a new issue on GitHub