Skip to content
CAI
Software that uses CAICheck a score

ciren/cilib

69.2

Adequate · 20 September 2026

4.6k

lines of production code

Scala

primary language

1

measurement over time

CAI band scale
CAI lens gauges

What this system is

This system is a Scala-based library for evolutionary computation and optimization algorithms, providing implementations for Genetic Algorithms, Particle Swarm Optimization, Differential Evolution, and Evolutionary Distribution Algorithms. It features a modern ZIO-based execution engine that supports streaming data processing, multi-objective evaluation, and Parquet file output. The library manages core optimization primitives such as positions, fitness constraints, and boundary enforcement strategies to facilitate algorithmic search and benchmarking.

How it got here

2005–2012 — Scala 3 and ZIO migration

5 changes.

The project underwent a major modernization by migrating its codebase and build infrastructure to Scala 3 and ZIO 2, replacing legacy dependencies like Scalaz and JUnit 3.8. This effort involved refactoring core data types for performance, removing obsolete algorithms and test suites, and establishing a new multi-module build structure with updated documentation.

2014–2015 — ZIO migration and optimization engine

7 changes.

The project migrated its core library to the ZIO Prelude ecosystem, introducing foundational optimization primitives and a ZIO-based execution engine. This period also saw the extraction of dedicated modules for Genetic Algorithms and Particle Swarm Optimization, along with comprehensive test coverage and multi-objective evaluation support.

2017–2019 — ZIO migration and new optimization modules

5 changes.

The project expanded its optimization capabilities by introducing Differential Evolution and Evolutionary Distribution Algorithm modules, while simultaneously migrating the execution layer to ZIO Prelude for improved type safety and effect handling. This period also saw the addition of Parquet file output support and the establishment of a new Docusaurus-based documentation website.

Features

Add Parquet file output support with configurable write modes

Users can now export measurement data to Parquet files using the new \WriteMode\ abstraction, which supports both creating new files and overwriting existing ones. The \io\ package introduces \parquetSink\ for streaming writes via ZIO and \writeParquet\ for batch operations, both leveraging the parquet4s library with Snappy compression and configurable page/row-group sizes.

io · high confidence

Core optimization primitives and execution engine introduced

The library now provides foundational types for optimization, including \Position\ (with \Point\ and \Solution\ variants), \Interval\ (with \Bound\ types), \Entity\, \Fitness\ (with \Fit\ states for feasible/infeasible/adjusted results), \Constraint\ handling, and \Boundary\ enforcement strategies (clamp, reflect, wrap, etc.). Additionally, a new \exec\ module introduces a ZIO-based \Runner\ for streaming algorithm execution, supporting dynamic environment changes via \Env\ (Unchanged/Change) and iteration-based parameter updates, along with file output capabilities (Parquet/CSV) in example applications.

repository · high confidence

Extracted Genetic Algorithm module

The Genetic Algorithm (GA) logic has been extracted into a dedicated module under \cilib/ga\. This new module provides \GA.ga\ for standard evolutionary steps (selection, crossover, mutation) and \GA.randomSearch\ for random search strategies, both built on the \zio\ and \zio-prelude\ effect types. It also defines a type alias \Individual\[S\]\ as \Entity\[S, Double\]\ to represent population members.

ga · high confidence

Initial EDA structure with ZIO-based implementation

Introduces the core Evolutionary Distribution Algorithm (EDA) implementation in the \eda\ module, providing a stream-based runner that utilizes ZIO and ZIO Prelude for effect handling. The new \EDA\ object exposes an \eda\ function for generic algorithm execution and a \UDMAc\ helper for Univariate Marginal Distribution Algorithm calculations, establishing the foundational logic for this optimization technique.

eda · high confidence

Introduce Differential Evolution optimization algorithm

Adds a new Differential Evolution (DE) implementation in the \de\ package, providing core functions for mutation, crossover, and selection strategies (such as best/1, rand/1, and current-to-best variants) to perform population-based optimization. The module leverages ZIO and zio-prelude for effect handling and type safety, exposing a unified API for users to configure and run DE-based searches.

de · high confidence

Introduce new PSO algorithm variants and topology guides

The PSO module now includes implementations for Von Neumann, PCX, UNDX, and NMPC crossover topologies, along with a charged PSO variant and a heterogeneous PSO framework. Users can now select these specific guide strategies for particle movement and social influence, expanding the available optimization behaviors beyond the standard gbest/lbest models.

pso · high confidence

Multi-objective evaluation support via MultiEval

The \moo\ module now includes a \MultiEval\ class that enables multi-objective fitness evaluation. It accepts a \NonEmptyVector\ of \Eval\ instances and combines their results into a single \RVar\[Objective\]\, allowing users to evaluate positions against multiple objectives simultaneously within the ZIO Prelude context.

moo · high confidence

New Docusaurus-based documentation website

The project now includes a dedicated website directory built with Docusaurus 2, providing a modern static site for documentation and project information. This change introduces the core website infrastructure, including configuration files (docusaurus.config.js, sidebars.js), custom CSS styling, and React-based landing page components. The site is configured to source documentation content from the mdoc generation target and includes assets like the project logo and static images, establishing the foundation for the new documentation experience.

website · high confidence

New optimization algorithm examples and benchmark helpers

The example module now includes a suite of runnable demonstrations for various optimization algorithms, including Genetic Algorithms (GA, Random Search), Particle Swarm Optimization variants (GBest, LBest, GCPSO, Von Neumann, NMPC, PCX, UNDX), and a mixed DE/PSO example. These examples utilize the new ZIO-based execution runner and provide a shared helper object with standard benchmark functions (Ackley, Quadric, Spherical, Absolute Value) to facilitate testing and learning.

example · high confidence

Removals

Removal of Ant Colony Optimization (ACO) algorithm implementation

The entire \net.sourceforge.cilib.ACO\ package has been removed from the source tree. This deletion eliminates the legacy Ant Colony Optimization implementation, including the core \ACO\ algorithm class, the \Ant\ interface, specific algorithm variants like \ASTSP\ and \LumerFaietaClusteringAlgorithm\, and all associated supporting classes such as \GraphOptimisationProblem\, \ClusteringAntDecorator\, and pheromone update logic. Users relying on this specific ACO-based optimization approach will no longer have access to these components.

src/CVS, src/net · high confidence

Behavioural changes

Build infrastructure modernized for Scala 3 and ZIO 2

The project's build system has been updated to support Scala 3.3.7 alongside Scala 2.13.18, with the SBT version bumped to 1.12.9. Core dependencies have been upgraded to ZIO 2.1.25 and ZIO Prelude 1.0.0-RC47, replacing previous ZIO 1.x usage. The build configuration now includes specific compiler options for Scala 3 migration and type explanation, and utilizes sbt-ci-release for publishing.

project · high confidence

CIlib 2.2.0 release with Scala 3 support and ZIO migration

This release introduces support for Scala 3.x and drops support for Scala 2.11 and 2.12, making Scala 2.13 the default version. The library's internal code has been refactored to use ZIO and ZIO Prelude, replacing previous dependencies on Scalaz, Scalaz-Stream, fs2, monocle, refined, and spire. This migration simplifies several data types (such as RVar, Step, and StepS), improves error messages through variance annotations, and replaces the underlying list-like representation of Position with a more performant structure. Additionally, CSV output support has been removed in favor of Parquet, and several ADT classes have been moved to companion objects to clean up the project namespace.

(repo-wide) · high confidence

Core library migrated to ZIO Prelude

The core library has been refactored to use ZIO Prelude, replacing previous functional programming abstractions. This migration introduces new type aliases for randomness (RVar), algorithmic steps (Step, StepS), and non-empty collections (NonEmptyVector), and updates the internal implementation of distributions, selection strategies, and metric spaces to align with the ZIO Prelude ecosystem.

core · high confidence

Migrate exec module to ZIO Prelude

The exec module has been refactored to use ZIO Prelude, introducing a new MonadStep abstraction and updating package objects for Scala 2.12+ and Scala 3 to leverage ZIO's prelude types like ZValidation and Assertion for handling execution steps and data validation.

exec · high confidence

Test coverage

Added comprehensive test coverage for core optimization components; Removal of legacy JUnit 3.8 test suite.

Dependencies

Initial project build configuration and documentation site setup

This change introduces the foundational build infrastructure for the project, including a new \build.sbt\ file that defines the multi-module structure (core, pso, ga, de, etc.) and integrates ZIO-based libraries for the core module. It also adds a new Docusaurus-based documentation website under the \website/\ directory, establishing the necessary \package.json\ and \yarn.lock\ files to manage frontend dependencies for the project's public site.

(dependencies) · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Baseline

  • First survey — no prior run to compare against. CAI 69.

Lenses

  • Code Health 92
  • Architecture 99
  • Maturity 59
  • Readiness 68
  • Security 84

Changes since last survey

  • 300 commits — 294 feature/other, 6 fixes

By area

  • (root) — 91 commits
  • core/src — 53 commits
  • example/src — 31 commits
  • docs/src — 28 commits
  • .github/workflows — 22 commits
  • (repo) — 19 commits
  • tests/src — 9 commits
  • exec/src — 6 commits
  • io/src — 5 commits
  • pso/src — 4 commits
  • .circleci/config.yml — 3 commits
  • project/BuildHelper.scala — 3 commits
  • project/deploy-site.sh — 3 commits
  • .github/CONTRIBUTING.md — 2 commits
  • de/src — 2 commits
  • docs/community-tutorial — 2 commits
  • docs/design — 2 commits
  • project/build.properties — 2 commits
  • project/plugins.sbt — 2 commits
  • .github/CODEOWNERS — 1 commit

Notable commits

  • fix: 2.12 is default, SBT build update and scaladoc link fix
  • fix: Added Step discussion and spelling fixes
  • fix: Fix Euclidean and Manhattan distance metrics
  • fix: Fix step test to use new Eval scheme
  • fix: Lens fixes and testing Fit cases (#291)
  • fix: Trying to fix travis again
  • change: Accept benchmarks in Eval
  • change: Add Traverse1 instance for Position
  • change: Add badges to show versions (#273)
  • change: Add basic parquet file output
  • change: Add example of GCPSO
  • change: Add example of time varying parameters (#289)
  • change: Add example of using a GA to do random search
  • change: Add matrix for scala versions in build
  • change: Add nushell to the development environment
  • change: Add release-drafter for better release information
  • change: Add some additional config for the semanticdb
  • change: Add spectrum badge
  • change: Add the tool pqrs to the development shell
  • change: Add wart detection
  • …and 280 more

Architecture

  • 0 containers · 1 bounded contexts · 0 dependency edges (baseline)

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

ciren/cilib was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 20 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 269b934f4c7f86ae3507bbbe6edbfc6d260cd394 — the exact code this score is about.
  • Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-b51f968c9b10.