The hmep package

[ Tags: ai, bsd3, library, program ] [ Propose Tags ]

A multi expression programming implementation with focus on speed.

https://en.wikipedia.org/wiki/Multi_expression_programming


[Skip to Readme]

Properties

Versions 0.0.0, 0.0.1, 0.1.0, 0.1.1
Change log CHANGELOG.md
Dependencies base (>=4.7 && <5), hmep, mwc-random, primitive, probable, statistics (>=0.10 && <0.14), vector [details]
License BSD3
Copyright 2017 Bogdan Penkovsky
Author Bogdan Penkovsky
Maintainer dev at penkovsky dot com
Category AI
Home page https://github.com/masterdezign/hmep#readme
Source repo head: git clone https://github.com/masterdezign/hmep
Uploaded Sun Oct 8 17:56:57 UTC 2017 by penkovsky
Distributions NixOS:0.1.1
Executables hmep-demo
Downloads 621 total (28 in the last 30 days)
Rating 2.0 (votes: 1) [estimated by rule of succession]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2017-10-08 [all 1 reports]
Hackage Matrix CI

Modules

[Index]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees


Readme for hmep-0.1.0

[back to package description]

Multi Expression Programming

You say, not enough Haskell machine learning libraries?

Here is yet another one!

History

There exist many other Genetic Algorithm (GA) Haskell packages. Personally I have used simple genetic algorithm, GA, and moo for quite a long time. The last package was the most preferred, but the other two are also great.

However, when I came up with this MEP paper, to my surprise there was no MEP realization in Haskell. Soon I realized that existing GA packages are limited, and it would be more efficient to implement MEP from scratch.

That is how this package was started. I also wish to say thank you to the authors of the moo GA library, which inspired the present hmep package.

About MEP

Multi Expression Programming is a genetic programming variant encoding multiple solutions in the same chromosome. A chromosome is a computer program. Each gene is featuring code reuse. For more details, please check http://mepx.org/papers.html and https://en.wikipedia.org/wiki/Multi_expression_programming.

How to build

Use Stack.

 $ git clone https://github.com/masterdezign/hmep.git && cd hmep
 $ stack build --install-ghc

Now, run the demo to calculate cos^2(x) through sin(x):

 $ stack exec hmep-demo

 Average loss in the initial population 15.268705681244962
 Population 10: average loss 14.709728527360586
 Population 20: average loss 13.497114190675477
 Population 30: average loss 8.953185872653737
 Population 40: average loss 8.953185872653737
 Population 50: average loss 3.3219954564955856e-15

 Interpreted expression:
 v1 = sin x0
 v2 = v1 * v1
 result = 1 - v2

Authors

This library is written and maintained by Bogdan Penkovsky