⚡ Optimization
Evolve optimization strategies to minimize benchmark functions.
Prerequisites
-
VEOX Server: Start the local VEOX server (requires Docker):
See the Quick Start for detailed server setup, health checks, and Docker Compose instructions.docker run -d \ --name veox-enclave-server \ -p 8090:8090 \ 714044927654.dkr.ecr.us-east-2.amazonaws.com/doug/single_enclave/veox-enclave-server:latest -
Python SDK: Install the
veoxpackage via PyPI:
What It Does
The optimization family evolves multi-stage optimization pipelines that discover the global minimum of mathematical benchmark functions:
Uses server-side benchmark functions (Rastrigin, Ackley, Rosenbrock, etc.).
Quick Start
from veox import VeoxEvolver
evolver = VeoxEvolver("optimization")
evolver.fit(max_generations=5, population_size=30)
print(f"Best Value: {evolver.best_fitness_:.6f}")
print(f"Pipeline: {evolver.best_pipeline_}")
Full Example
from veox import VeoxEvolver
# 1. Connect
evolver = VeoxEvolver("optimization", api_url="http://127.0.0.1:8090")
evolver.health_check()
# 2. Evolve
evolver.fit(
max_generations=10,
population_size=50,
timeout_per_eval=60,
max_poll_time=600,
)
# 3. Inspect
print(f"Best Value: {evolver.best_fitness_:.6f}")
print(f"Pipeline: {evolver.best_pipeline_}")
print(f"Evaluations: {evolver.result_.total_evals}")
# 4. Save
evolver.save("optimization_results.json")
from veox import VeoxEvolver
# 1. Connect
evolver = VeoxEvolver("optimization", api_url="http://127.0.0.1:8090")
evolver.health_check()
# 2. Evolve
evolver.fit(
max_generations=10,
population_size=50,
num_islands=4, # 💎 PRO FEATURE: 4 parallel islands
timeout_per_eval=60,
max_poll_time=600,
)
# 3. Inspect
print(f"Best Value: {evolver.best_fitness_:.6f}")
print(f"Pipeline: {evolver.best_pipeline_}")
print(f"Evaluations: {evolver.result_.total_evals}")
# 4. Save
evolver.save("optimization_results.json")
Live dashboard — objective value minimization, champion trend, and metaheuristic pipeline leaderboard.
Fitness Configuration
| Parameter | Value |
|---|---|
| Primary Metric | Best function value (lower = better) |
| Direction | Minimize |
| Max function evals per candidate | 2000 |
| Exception Penalty | +1e9 |
💎 VEOX Pro Activation
To unlock VIP Evaluators and Pro Algorithms (like PaperKit and Generative routines), you must authenticate your local node with a VEOX License Token.
from veox import VeoxEvolver
evolver = VeoxEvolver("optimization", api_url="http://127.0.0.1:8090")
# 1. Fetch your unique Hardware Fingerprint
fingerprint = evolver.get_system_fingerprint()
print(f"My VEOX Node Fingerprint: {fingerprint}")
# Example Output: My VEOX Node Fingerprint: 476ad03474b31e3c84d07df9088d93f0
# 2. Provide this fingerprint to your VEOX Admin to receive a JWT Token
jwt_token = "eyJ0b2tlbiI6ICJVRExK...EXPIRES" # Replace with your token
# 3. Activate the Enclave
if evolver.activate_license(jwt_token):
print("VIP Features Unlocked!")
# evolver.fit(...) will now utilize full Pro capabilities
Tips
- Server-side benchmarks: Uses 100+ Python objective functions on the server.
- Quick test:
max_generations=1, population_size=10for a smoke test. - Dimension: Default 10D; the engine configures dimensionality from the benchmark.