Genetic algorithms using Golang Generics

Package genetic

Package genetic implements genetic algorithms using Golang's Generics support.

What are Genetic Algorithms?

Genetic algorithms are a form of machine learning software inspired by the process of natural selection. GA's can quickly approximate solutions for problems with very large search spaces. They are often used to tackle NP problems whose solutions can vary in levels of quality. In these kinds of problems, measuring a solution's validity and quality are fast, but yet there is no easy way to determine the optimal solution without guessing and checking. Genetic Algorithms provide a means to get a pretty good solution to any such problem. Examples include:

  • Transportation routing & logistics
  • Storage Optimization (Knapsack Problem)
  • 'Travelling Salesman' problems
  • Machine Learning meta-parameter tuning
  • Hardware and Engineering Design optimization
  • Scheduling
Owner
Similar Resources

Simple gc using integer vectors to simulate

gcint Simple gc using integer vectors to simulate Iterate primarily over what should be the shorter vector (readers) removing unused references in fro

Nov 24, 2021

Bcfm-study-case - A simple http server using the Echo library in Go language

Bcfm-study-case - A simple http server using the Echo library in Go language

Task 1 Hakkında Burada Go dilinde Echo kütüphanesini kullanarak basit bir http s

Feb 2, 2022

Naive Bayesian Classification for Golang.

Naive Bayesian Classification Perform naive Bayesian classification into an arbitrary number of classes on sets of strings. bayesian also supports ter

Dec 30, 2022

Ensembles of decision trees in go/golang.

Ensembles of decision trees in go/golang.

CloudForest Google Group Fast, flexible, multi-threaded ensembles of decision trees for machine learning in pure Go (golang). CloudForest allows for a

Dec 1, 2022

Golang Neural Network

Golang Neural Network

Varis Neural Networks with GO About Package Some time ago I decided to learn Go language and neural networks. So it's my variation of Neural Networks

Sep 27, 2022

Golang implementation of the Paice/Husk Stemming Algorithm

##Golang Implementation of the Paice/Husk stemming algorithm This project was created for the QUT course INB344. Details on the algorithm can be found

Sep 27, 2022

Golang HTML to PDF Converter

Golang HTML to PDF Converter

Golang HTML to PDF Converter For reading any document, one prefers PDF format over any other formats as it is considered as a standard format for any

Dec 15, 2022

A high-performance timeline tracing library for Golang, used by TiDB

Minitrace-Go A high-performance, ergonomic timeline tracing library for Golang. Basic Usage package main import ( "context" "fmt" "strcon

Nov 28, 2022

Gota: DataFrames and data wrangling in Go (Golang)

Gota: DataFrames, Series and Data Wrangling for Go This is an implementation of DataFrames, Series and data wrangling methods for the Go programming l

Jan 5, 2023
Comments
  • feat: FitnessFunc can be dynamic with changing gene pool

    feat: FitnessFunc can be dynamic with changing gene pool

    Summary

    Currently the fitness function signature only allows for static fitness functions which are deterministically derived from the genome itself. But in situations where genomes must compete for scarce resources, like natural selection, the fitness of any one genome is mutually dependent on the fitness of every other genome.

    Details

    This PR changes the function signature of FitnessFunc[T].

    Old:

    type FitnessFunc[T any] func(genome T) int
    

    New:

    type FitnessFunc[T any] func(allGenomes []T, fitnesses []int)
    

    This way, fitness functions now have full context on the population, and can calculate fitness of each genome in a dynamic and customizable way. The results should be stored in the given fitnesses slice.

    For old-fashioned static fitness functions, a utility is available to convert them to the new FitnessFunc[T] type, optimizing to avoid recalculating the fitness of any cached elite genomes.

    // StaticFitnessFunc is a utility which maps a static non-competitive fitness function,
    // whose output is not dependent on other competing genomes, into a FitnessFunc[T].
    // Use this if your genomes' fitnesses are measured independently of the wider population.
    func StaticFitnessFunc[T any](fitness func(T) int) FitnessFunc[T]
    

    Compatibility

    This change is backwards and forwards incompatible with master; this will need a new major version release.

Golang Genetic Algorithm
Golang Genetic Algorithm

goga Golang implementation of a genetic algorithm. See ./examples for info on how to use the library. Overview Goga is a genetic algorithm solution wr

Dec 19, 2022
Genetic Algorithm and Particle Swarm Optimization

evoli Genetic Algorithm and Particle Swarm Optimization written in Go Example Problem Given f(x,y) = cos(x^2 * y^2) * 1/(x^2 * y^2 + 1) Find (x,y) suc

Dec 22, 2022
k-modes and k-prototypes clustering algorithms implementation in Go

go-cluster GO implementation of clustering algorithms: k-modes and k-prototypes. K-modes algorithm is very similar to well-known clustering algorithm

Nov 29, 2022
Collaborative Filtering (CF) Algorithms in Go!

Go Recommend Recommendation algorithms (Collaborative Filtering) in Go! Background Collaborative Filtering (CF) is oftentimes used for item recommenda

Dec 28, 2022
Evolutionary Algorithms in Go

Evo Evo is a framework for implementing evolutionary algorithms in Go. go get github.com/cbarrick/evo Documentation https://godoc.org/github.com/cbar

Dec 12, 2022
face detction/recognization golang lib using tensorflow facenet
face detction/recognization golang lib using tensorflow facenet

Golang lib for detect/recognize by tensorflow facenet Prerequest libtensorfow 1.x Follow the instruction Install TensorFlow for C facenet tenorflow sa

Sep 23, 2022
Go package for OCR (Optical Character Recognition), by using Tesseract C++ library

gosseract OCR Golang OCR package, by using Tesseract C++ library. OCR Server Do you just want OCR server, or see the working example of this package?

Jan 3, 2023
Spice.ai is an open source, portable runtime for training and using deep learning on time series data.
Spice.ai is an open source, portable runtime for training and using deep learning on time series data.

Spice.ai Spice.ai is an open source, portable runtime for training and using deep learning on time series data. ⚠️ DEVELOPER PREVIEW ONLY Spice.ai is

Dec 15, 2022
Incentivized AI Training Casino using ISCP for the Agri-D Hackaton!
Incentivized AI Training Casino using ISCP for the Agri-D Hackaton!

Welcome to the Wasp repository! Wasp is a node software developed by the IOTA Foundation to run the IOTA Smart Contract Protocol (ISCP in short) on to

May 15, 2022
Advent of Code 2016 in Go using only GitHub Copilot

Advent of Gopilot Solutions to Advent of Code 2016 in Go using only GitHub Copilot. "Rules" The idea is to have GitHub Copilot generate all the actual

Nov 16, 2021