weasel

package module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 14, 2021 License: MIT Imports: 1 Imported by: 0

README

go-weasel

GoDoc Go Report Card Build Status codecov

Weasel program.

Installation

$ go get github.com/irenicaa/go-weasel/...

Usage

$ go-weasel -h | -help | --help
$ go-weasel [options]

Options:

  • -h, -help, --help — show the help message and exit;
  • -sample STRING — target string (default: METHINKS IT IS LIKE A WEASEL);
  • -rate FLOAT — mutation rate (default: 0.05);
  • -population INTEGER — population size (default: 100).

Output Example

0 WIAKYMUAFZISJOGLNHBBPJFUNYLL
10 WETHYVKSFITSO GLNLT PLLANSEL
20 WETHIVKS IT OSGLMKT ALDAVSEL
30 WETHINKS IT OS LMKE APWAVSEL
40 WETHINKS IT IS LIKE APWWVSEL
50 WETHINKS IT IS LIKE A WWVSEL
60 WETHINKS IT IS LIKE A WWVSEL
70 WETHINKS IT IS LIKE A WEASEL
80 YETHINKS IT IS LIKE A WEASEL
90 PETHINKS IT IS LIKE A WEASEL
100 SETHINKS IT IS LIKE A WEASEL
110 SETHINKS IT IS LIKE A WEASEL
114 METHINKS IT IS LIKE A WEASEL

License

The MIT License (MIT)

Copyright © 2021 irenica

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Fitness

func Fitness(text string, sample string) int

Fitness ...

func Initial

func Initial(length int) string

Initial ..

func Mutate

func Mutate(text string, rate float64) string

Mutate ...

func Populate

func Populate(text string, rate float64, count int) []string

Populate ...

func Search(variants []string, sample string) string

Search ...

Types

This section is empty.

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL