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
Most Liked
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.
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
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 : )
Popular in RFCs
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #elixirconf-us
- #advent-of-code
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #hex









