Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

binary-breeder

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

binary-breeder

Breeds the specified number of offspring from two parent strings of binary digits with the possibility of random mutation.

  • 0.1.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

binary-breeder

Breeds the specified number of offspring from two parent strings of binary digits with the possibility of random mutation.

npm Coverage Status Build Status

Installation

npm install binary-breeder

Dev Setup

npm install -g mocha
npm install -g istanbul

Unit Tests

npm test

Coverage

npm run cover

Usage

var reproduce = require('binary-breeder');

var numOffspring = 5;
var mutationChance = 0.002;
var parentChromosomes = [
    '000011001101100101',
    '110010100110110100'
];

var offspring = reproduce(parentChromosomes, numOffspring, mutationChance);

/*
sample output

[ '000010100110110100',
  '110011001101100101',
  '110010100111100101',
  '000011001101110100',
  '110011001101100101' ]
*/

Keywords

FAQs

Package last updated on 14 Sep 2015

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc