🚀. Socket Launch Week Day 2:Introducing Manifest Alerts.Learn more
Sign In

@thi.ng/gp

Package Overview
Dependencies
Maintainers
1
Versions
264
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@thi.ng/gp

Genetic programming helpers & strategies (tree based & multi-expression programming)

npmnpm
Version
1.0.57
Version published
Weekly downloads
95
-71.64%
Maintainers
1
Weekly downloads
 
Created
Source

@thi.ng/gp

npm version npm downloads Mastodon Follow

[!NOTE] This is one of 215 standalone projects, maintained as part of the @thi.ng/umbrella ecosystem and anti-framework.

🚀 Please help me to work full-time on these projects by sponsoring me. Thank you! ❤️

About

Genetic programming helpers & strategies (tree based & multi-expression programming).

This package does not (yet) provide a complete GP framework and is largely focused on the following operations:

  • General GP setup configuration
  • Genotype / chromosome / AST generation
  • Phenotype / chromosome translation
  • Offspring generation
    • Crossover (single-point, uniform)
    • Mutation

Does not specifically deal with:

  • Population management
  • AST evaluation
  • Fitness computation

References:

Status

ALPHA - bleeding edge / work-in-progress

Search or submit any issues for this package

  • @thi.ng/defmulti - Dynamic, extensible multiple dispatch via user supplied dispatch function.
  • @thi.ng/pointfree - Pointfree functional composition / Forth style stack execution engine
  • @thi.ng/sexpr - Extensible S-Expression parser & runtime infrastructure
  • @thi.ng/shader-ast - DSL to define shader code in TypeScript and cross-compile to GLSL, JS and other targets
  • @thi.ng/zipper - Functional tree editing, manipulation & navigation

Blog posts

Installation

yarn add @thi.ng/gp

ESM import:

import * as gp from "@thi.ng/gp";

Browser ESM import:

<script type="module" src="https://esm.run/@thi.ng/gp"></script>

JSDelivr documentation

For Node.js REPL:

const gp = await import("@thi.ng/gp");

Package sizes (brotli'd, pre-treeshake): ESM: 1.28 KB

Dependencies

Note: @thi.ng/api is in most cases a type-only import (not used at runtime)

Usage examples

One project in this repo's /examples directory is using this package:

ScreenshotDescriptionLive demoSource
Evolutionary shader generation using genetic programmingDemoSource

API

Generated API docs

TODO

Authors

If this project contributes to an academic publication, please cite it as:

@misc{thing-gp,
  title = "@thi.ng/gp",
  author = "Karsten Schmidt",
  note = "https://thi.ng/gp",
  year = 2019
}

License

© 2019 - 2026 Karsten Schmidt // Apache License 2.0

Keywords

agent

FAQs

Package last updated on 26 Apr 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts