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

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

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 : )

Schultzer

Schultzer

There might be a lot to gain with leveraging tinygrad GitHub - tinygrad/tinygrad: You like pytorch? You like micrograd? You love tinygrad! ❤️ for the backend of the computation and if you like cutting edge stuff, there is outside of the mainstream light checkout: Predictive Vision in a nutshell – Piekniewski's blog

Elixir/Erlang are great for writing lexer, parser and compilers in. Although the VM sucks at anything math heavy. Like gemm.

Nezteb

Nezteb

I noticed that the project was archived as “failed AI slop”? :sweat_smile:

Where Next?

Popular in RFCs Top

pepicrft
Hey folks :wave: I implemented a library that uses macros extensively, and I’d appreciate feedback from people that are more versed at w...
New
sleipnir
Hey! Want to contribute to a cool compiler project? Check out the good first issues in the Honey Potion Compiler! Honey Potion is a com...
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
bortzmeyer
Not a replacement for serious authoritative DNS servers, of course, but useful for some uses (such as returning the IP address of the DNS...
New
bluzky
Hi everyone, I would like to introduce my new project OrangeCMS, it’s an application that help you to create/edit content post for your ...
New
puemos
Hey everyone :waving_hand: Code: GitHub - puemos/overbooked: Overbooked is a self-hosted flexible workplace platform for indie co-wor...
New
alisinabh
Hey everyone :wave: I was recently working on a hobby project that I have deployed on a platform that did not provide quick and easy acc...
New
Hedgehog-ai
Hello I would like feedback on an experimental neuroevolution (including substrate encoding) library called Bardo based on the amazing wo...
New
ca1989
Hi all, this week I played a bit with Phoenix and Elm. I ended up with this POC: https://github.com/carlotm/elmex The repository cont...
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

Other popular topics Top

belgoros
I’m not a pro in using Regex and can’t figure out why the following behaviour happens, especially if we take into account the difference ...
New
peerreynders
Manning 2016 Halloween weekend sale via Deal of the Day Friday, October 28 - Half off all MEAPs - code WM102816LT Saturday, October 29 ...
326 29600 154
New
senggen
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] 15:22:35.803 [error] gen_event {lager_file_backend...
New
yawaramin
In the Dialyzer docs ( http://erlang.org/doc/man/dialyzer.html#requesting-or-suppressing-warnings-in-source-files ), there is a way to tu...
New
nsuchy
Hi. I’ve noticed that Windows Powershell has it’s own IEX command and you cannot access Elixir’s IEX due to the conflict. This isn’t a cr...
New
script
If I have a string “1000 cfu/ml” . I want to remove the characters and / and space . So the string is like this "1000" What is the ...
New
danschultzer
None of the current solutions worked well for me, so I went ahead and built a user management system from scratch. This project took far...
548 27727 240
New
lucidguppy
I have a super simple question about elixir - how would I take a file like this foo bar baz and output a new file that enumerates th...
New
AstonJ
by Lance Halvorsen Elixir and Phoenix are generating tremendous excitement as an unbeatable platform for building modern web application...
460 27162 124
New
siddhant3030
Hi, I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New

We're in Beta

About us Mission Statement