npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

aegis-optimizer

v1.0.0

Published

AEGIS — Autonomous dual-engine optimizer with cross-pollination. The engine that discovered the Unified Field Equation. Zero-config optimization for any objective function.

Readme

@aegis/optimizer

The engine that discovered the Unified Field Equation — now optimize YOUR problem.

AEGIS is a dual-engine, autonomous optimizer with cross-pollination. Drop in any objective function, define parameters, get optimal results. Zero configuration required.

Created by Danny Lee Eldridge — Copyright © 2012-2026


Install

npm install @aegis/optimizer

Quick Start

const { optimize } = require('@aegis/optimizer');

const result = await optimize({
  objective: (p) => (p.x - 3)**2 + (p.y - 7)**2,
  parameters: [
    { name: 'x', min: -10, max: 10 },
    { name: 'y', min: -10, max: 10 },
  ],
});

console.log(result.best); // { params: { x: 3.0, y: 7.0 }, score: ~0.0 }

Constraints

const result = await optimize({
  objective: (p) => -(p.x + p.y),
  parameters: [
    { name: 'x', min: 0, max: 100 },
    { name: 'y', min: 0, max: 100 },
  ],
  constraints: [
    (p) => Math.max(0, p.x + p.y - 50),          // x + y ≤ 50
    { type: 'range', param: 'x', min: 0, max: 30 },
  ],
});

Typed Parameters

const result = await optimize({
  objective: costFunction,
  parameters: [
    { name: 'workers', min: 1, max: 50, type: 'integer' },
    { name: 'material', type: 'categorical', values: ['steel', 'aluminum', 'carbon_fiber'] },
    { name: 'thickness', min: 0.1, max: 10.0 },
  ],
});

Dual-Engine Mode

const { dualOptimize } = require('@aegis/optimizer');

const result = await dualOptimize({
  objective: complexFn,
  parameters: myParams,
  cycles: 10,
});
// result.best, result.aegisBest, result.seekerBest, result.pollinations

Warm Start & Export

const { exportResult } = require('@aegis/optimizer');

// Resume from previous run
const r2 = await optimize({ objective, parameters, warmStart: r1.best });

// Export
console.log(exportResult(result, 'summary'));  // Pretty report
console.log(exportResult(result, 'csv'));       // Spreadsheet-ready

CLI

npx aegis optimize --config myconfig.json
npx aegis dual --config myconfig.json
npx aegis benchmark
npx aegis serve --port 3000

Why AEGIS?

| Feature | AEGIS | scipy.optimize | Optuna | Hyperopt | |---------|-------|---------------|--------|----------| | Zero config | ✅ | ❌ | ❌ | ❌ | | Dual engine | ✅ | ❌ | ❌ | ❌ | | Cross-pollination | ✅ | ❌ | ❌ | ❌ | | Live dashboard | ✅ | ❌ | ✅ | ❌ | | UFE efficiency tracking | ✅ | ❌ | ❌ | ❌ | | Anomaly detection | ✅ | ❌ | ❌ | ❌ | | Auto strategy selection | ✅ | ❌ | Partial | ❌ |

Quick Start

const { optimize } = require('@aegis/optimizer');

const result = await optimize({
  objective: (params) => {
    // Your function to minimize — ANY domain
    return (params.x - 3) ** 2 + (params.y + 1) ** 2;
  },
  parameters: [
    { name: 'x', min: -10, max: 10 },
    { name: 'y', min: -10, max: 10 },
  ],
});

console.log(result.best);
// { params: { x: 3.0000, y: -1.0000 }, score: 0.0000 }

Dual Engine (Cross-Pollination)

Two engines attack your problem from opposite ends — one explores wide, one exploits deep. They share discoveries, leapfrogging each other to converge faster than any single optimizer.

const { dualOptimize } = require('@aegis/optimizer');

const result = await dualOptimize({
  objective: myExpensiveFunction,
  parameters: myParams,
  cycles: 10,
  onCrossPolinate: (event) => {
    console.log(`🧬 ${event.from} → ${event.to}: ${event.score}`);
  },
});

console.log(`Best: ${result.best.score}`);
console.log(`Cross-pollinations: ${result.pollinations}`);

Live Dashboard

const { optimizeWithMonitor } = require('@aegis/optimizer');

const result = await optimizeWithMonitor({
  objective: myFunction,
  parameters: myParams,
  port: 8080,       // Dashboard at http://localhost:8080
  maxEvals: 50000,
});

// Dashboard shows:
// - Real-time convergence curves
// - Strategy effectiveness breakdown
// - UFE efficiency tracking
// - Anomaly detection alerts
// - Best parameters with scores

API Reference

optimize(options)

Single-engine optimization.

| Option | Type | Default | Description | |--------|------|---------|-------------| | objective | Function | required | (params) => number to minimize | | parameters | Array | required | [{name, min, max}] | | maxEvals | number | 5000 | Max function evaluations | | explorationRate | number | 0.5 | 0 = pure exploit, 1 = pure explore | | strategies | string[] | all | Strategy subset to use | | silent | boolean | true | Suppress console output | | seed | number | auto | RNG seed for reproducibility | | onProgress | Function | null | Progress callback |

Returns: { best: { params, score }, totalEvals, runtime, ufe }

dualOptimize(options)

Dual-engine with cross-pollination.

| Option | Type | Default | Description | |--------|------|---------|-------------| | cycles | number | 5 | Full explore/exploit cycles | | onCrossPolinate | Function | null | Called when engines share data |

Returns: { best, aegisBest, seekerBest, totalEvals, pollinations }

optimizeWithMonitor(options)

Single-engine with live web dashboard.

| Option | Type | Default | Description | |--------|------|---------|-------------| | port | number | 5555 | Dashboard HTTP port |

Returns: { best, dashboardUrl, stop() }

Available Strategies

| Strategy | Best For | |----------|----------| | random | Initial exploration, high-dimensional spaces | | evolutionary | Complex landscapes, multiple optima | | gradient | Smooth functions, fine-tuning | | annealing | Escaping local minima | | swarm | Parallel search, rugged landscapes | | curiosity | Novel region discovery | | exploit | Final convergence, surgical precision |

Industry Applications

  • 💊 Pharma — Drug dosing, molecule design, clinical trial optimization
  • 💰 Finance — Portfolio allocation, risk calibration, pricing models
  • 🏭 Manufacturing — Process parameters, yield optimization, quality control
  • 🔋 Energy — Battery chemistry, grid scheduling, materials screening
  • 🛰️ Aerospace — Trajectory planning, structural optimization
  • 🧬 Biotech — Protein folding parameters, gene expression optimization
  • 📊 ML/AI — Hyperparameter tuning, architecture search, loss function design

Proven at Scale

AEGIS has been validated on real-world scientific optimization:

  • 15 simultaneous physics tasks running 24/7
  • 73+ observational data points from major astronomical surveys
  • Cross-pollination delivering 40%+ improvement over single-engine
  • Zero NaN/Infinity across millions of evaluations
  • Live monitoring with real-time scoreboard and anomaly detection

License

Commercial license required for production use. Contact: [email protected]

Academic/research use: Free with attribution.


Built by Danny Lee Eldridge | AEGIS — Autonomous Evolving General Intelligence System