Hedgehog-ai

Hedgehog-ai

Bardo - neuroevolution (a powerful and underrated type of AI) through Elixir

Hello I would like feedback on an experimental neuroevolution (including substrate encoding) library called Bardo based on the amazing work of Gene Sher.

Neuroevolution is a powerful and underrated type of AI that is well suited to Erlang and Elixir.

Features

  • Topology and Parameter Evolving Neural Networks (TWEANN): Neural networks evolve their structure and weights over time
  • Efficient ETS-based Storage: Simple and fast in-memory storage with periodic backups
  • Modular Sensor/Actuator Framework: Easily connect networks to different environments
  • Built-in Evolutionary Algorithms: Includes selection algorithms and mutation operators
  • Substrate Encoding: Hypercube-based encoding for efficient pattern recognition
  • Example Environments: XOR, Double Pole Balancing, Flatland, and Simple FX simulations

License

Distributed under the Apache License 2.0. See LICENSE for more information.

Acknowledgements

This is a vibe coded port of this project: github - Rober-t/apxr_run

Which was based on this code: Gene Sher - DXNN2

Based on concepts from this amazing book: Handbook of Neuroevolution Through Erlang by Gene Sher.

This is experimental

I’m testing it out some personal projects but I would love feedback and contributors.. it may be totally crap.. so I would appreciate someone who is cleverer than me giving it a go.

I understood everything in Genes book up until substrate encoding where it started getting fuzzy.. so I’m trying to really understand it..

It seems vagually similar to Hierarchical temporal memory - Wikipedia and I wonder it its posssible to create a HTM based substrate encoding using sparse representations of data.. or integrate HTM in some way.

All the best,
hibernatus

https://github.com/hibernatus-hacker/bardo

Most Liked

Hedgehog-ai

Hedgehog-ai

Gene just responded with some really interesting feedback on the DXNN2 github issues : )

I personally find this trend of LLM based agents disconcerting, not least because they are incredibly wasteful and inefficient. Just because we can use the emergent properties of huge natural language / transformer based ML to write code doesn’t mean we necessarily should IMO.

Neuroevolution based agents seem far better than LLM agents for most of the use cases that LLM based agents are being targeted at… NE agents can continuously learn and adapt.. and be evolved to solve a problem efficiently.

LLMs could be used to create scapes, actuators, sensors the initial conditions for an NE system or as part of a fitness function. Either by writing code or using a DSL. There seems to be some great opportunities to combine NE with transformers and other ML that Gene has pointed out.

I do use various AI tooling but I’ve noticed that the agentic LLM based systems use an excessive amount of tokens (a suspiciously large amount of tokens)… tend to diverge and create new work that they have to clean up.. costing more money…

LLMs seem to be a great business model for big tech but will you still use them if we have powerful neuroevolution systems?

NE systems that evolved code and agents to solve a problem without needing to send data to a third party or spend money on tokens.. efficient enough to run on your own infrastructure?

I don’t really care that NE systems are black boxes.. the same is true of any sufficiently powerful ML models.

If anyone else has drank enough of the LLM kool-aid and wants to collab on NE… get in touch.

hibernatus@use.startmail.com

10
Post #3
Hedgehog-ai

Hedgehog-ai

Hey yes.. I’m doing a new version of this that leverages Nx, axon and writing it from scratch by hand… to make sure its high quality. It will take longer but I’ll post the new library in a week or two.. its going really well so far and its so much better actually coding and understanding everything going slowly

I used claude code to port Erlang code to make Bardo. agentic LLM agents are an expensive way to make a mess and I’m now completely against LLM code generators.. rubber ducking is fine.. / AI search.

So yeah its embarrassing but this new library I’m working on will leverage Nx and its really exciting already. At least I made contact with Gene Sher and got some nice feedback and I’m now inspired to share a quality library soon/

Just to give you some details: Using Nx/axon its possible to serialize the NN and I’m experimenting with using it as the phenotype.. then the mutated NN runs and gets the reward / fitness score. It is possible to leverage Nx servings to run many parallel NN for training and the final fittest NN will also be able to run as a distributed Nx serving.

Hedgehog-ai

Hedgehog-ai

There was a port of DXNN2 (mentioned in the readme) and Bardo is a port of that to Elixir with extra bits like a HTM experiment. Its purely for educational use.

I have a new library that uses Nx that I can release it now however I want to test it on some real life use cases. I’ll share it regardless in a few days : )

Where Next?

Popular in RFCs Top

dergraf
Hey everyone! :waving_hand: I’ve been working on a side project for the last 4 months that I’m excited to share—it’s called ProxyConf! P...
New
brettbeatty
At my work we build a lot of mix tasks for backfills and other maintenance tasks. Even with OptionParser we seem to copy a lot of boilerp...
New
UlrikHD
I’ve been wanting to write a library for the lemmy API so that I can port some of my scripts over to elixir. For those unfamiliar with le...
New
KristerV
I got fed up with removing unused aliases manually so made a package for it: GitHub - KristerV/remove_unused_ex: Remove unused aliases an...
New
felix-starman
I’ve noticed that often when I find myself needing to manually set content-disposition - [MDN] the advice is usually to use URI.encode_ww...
New
Billzabob
Hello! I have an idea for an Elixir library I’d like to work on, but wanted to get some thoughts from the community first. It would allo...
New
andreashasse
Hi all, I’ve been working on PhoenixSpectral, a library that makes Phoenix controller @spec annotations drive both OpenAPI generation an...
New
benlime
In the last couple of days I was playing around with LiveView, function components and animations. I ended up with a little prototype whi...
New
tiagodavi
I’ve just created and published my first Elixir library! Ex4j combines the power of Ecto schema with the Bolt protocol + an elegant DSL ...
New
BartOtten
This thread once discussed Routex in it’s early form. It has been repurposed to gather feedback and discusses pre-releases. Currently: p...
New

Other popular topics Top

New
marius95
Hello everyone, I try to use an Javascript Event Handler in my root.html.leex file. Therefore I created a function in the app.js file: ...
New
jononomo
I am trying to figure out how Mix knows whether the environment is test, dev, or prod – where is this set? Thanks.
New
pmjoe
I have a relationship of love and hate with Elixir. Lots of things are just absolutely right, but there are some things that are kind of ...
New
msaraiva
Surface is an experimental library built on top of Phoenix LiveView and its new LiveComponent API that aims to provide a more declarative...
564 43806 214
New
Lily
In templates/appointment/index.html.eex: <%= for appointment <- @appointments do %> <tr> <td><%= appoi...
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New
grych
Hi folks, Few months ago I have announced the proof-of-concept of the library to manipulate the browsers DOM objects directly from Elixi...
639 52774 488
New
rms.mrcs
Hi, I need to transform a list of numbers into a map where the keys are the indexes and the values are the original values of the list. ...
New
jaysoifer
Is there a way to rollback a specific migration and only that one (“skipping” all the other ones)? Would mix ecto.rollback -v 200809061...
New

We're in Beta

About us Mission Statement