go-eq-gen

command module
v0.0.0-...-1f0185d Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2024 License: MIT Imports: 6 Imported by: 0

README

go-eq-gen

test Go Report Card

A golang demo which explores evolutionary algorithms to generate an equation which solves to a given integer.

Example

Why?

I originally started this project in 2015 to learn the go programming language and a little about generative AI at the same time. At the time, I followed a tutorial on genetic (evolutionary) algorithms with all code examples written in Java and ported the code to go. I've since revisited the project and refactored the original code to be more go idiomatic. The entire project is simply for fun and education.

Known Limitations

Small Target Size

This demo is limited to generating equations which solve to relatively small numbers due to the chromosome length and the current algorithm only allowing single digit operands.

Solving Errors

The sub-operations in the generative equations solve to integers. This leads to potential situations where 9 / 2 = 4. If you encounter a generative equation which is incorrect, this is most likely the cause.

Future Improvements

I have begun work porting the original string gene encoding implementation to a byte encoding implementation. I plan to benchmark the two implemtnations to explore the suspected performance enhancements of the bytes solution.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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