Binary Biology and Gameboy OS in Bash assembler

This is a note about a mad science project I discovered, the works of a Japanese researcher who runs a single-person collective called Henyapente.

Why a collective? In Japan there’s a tradition of hobby interest groups called Doujin (同人 meaning “same people”).

A doujin is a group of people who share an interest, activity, or hobby.

The word is translated into English as clique, fandom, society, or circle (as in “sewing circle”). Self-published creative works produced by these groups are also called doujin, including manga, magazines, novels, music, anime, merch, and video games (“doujin soft”).

It originated as literary circles in the Meiji period (late 19th to early 20th century) of like-minded poets and novelists who self-published literary magazines, some of which are still active. Many modern Japanese writers came from such literary circles. After World War II, manga artists who make comics and graphic novels formed doujin groups as a way to cultivate young talent and as a channel for amateurs to enter the commercial market. This movement culminated in Comiket (“comic market”) of Tokyo, which is now a huge convention with a hundred thousand visitors. It’s famous for indie art, fan fiction, and super-niche zines.

Doujin conventions usually require applications to be submitted as a group, even for an artist to participate. Such single-person groups are called 個人サークル, “individual circle”, an organization of one. Henyapente is a research group created by an independent computer science researcher to publish their work online, and at conventions and conferences.

The research is delightfully weird, going back to a series of small operating systems written from scratch, including OS5 (the fifth self-made OS - the previous four were never finished) with various low-level programming experiments on BIOS, UEFI, bootloader, kernel. During this time an idea emerged of generating a 512-byte master boot record (MBR) through genetic algorithms; then later “cultivating” executable binaries in virtual ecosystems.

Binary Biology is the lecturer’s neologism that considers executable binaries as biological organisms. It involves evaluating and giving feedback on compiled binaries using systems, allowing them to evolve and develop desired functions like living organisms.

In this lecture, we introduce how small executable ELF binaries can be treated as single-celled organisms, and then use the experimental environment “daisy-tools” based on such binary biology concept to conduct experiments where small ELF executables acquire new functions through evolution. While still in a research stage lacking practical utility, this approach differs from traditional manual development methods, offering an opportunity to consider how executable binaries can autonomously evolve to gain functionality.

The above screenshot is from Daisy World, where species of cells live/die/multiply according to rules about ambient temperatures.


At one of the doujin events, he bought a Gameboy cartridge and a writer to flash the ROM. This inspired him because now he could write low-level programs to run directly on a physical machine. And it enabled him to distribute his programs as cartridges alongside books and zines with in-depth technical articles.

Gameboy is a popular platform with mature emulators, which let him experiment in quick iterations on a desktop computer. He started writing primitive “operating systems” or binary ecosystems, GUI, file system, hex editor.. And eventually developed a unique technique of generating machine language instructions using Bash shell scripts. Here’s an assembler that writes instructions for Gameboy’s Sharp LR35902 CPU. Later he used similar methods to write programs for PDP-7 and game consoles such as Mega Drive and Sega Saturn. He has published several doujin zines that document his approach.

rpgos

The newest project is RPG-OS (RPG stands for “role-playing game”). It starts as a classic shell prompt interface, but the command SHOWINSIDE reveals the inner mechanism: a game world with characters that walk around and move symbols to perform computation. On the right side is system input, where every character comes in; on the left side is the shell application processing them. For the ECHO command, you can see an avatar carrying letters to system output.

One of his motivations has been to explore ways to “directly speak to the CPU and create executable binaries without using a programming language”. From writing machine code by hand, he arrived at the insight that as long as it can generate a sequence of bytes as instructions, the method can be anything: shell scripts, cellular automata, or a game-like user interface.

5 Likes

Universal Search and the Gödel Machine. It turns out growing programs in a virtual environment is not a far-fetched idea, one might even say it’s the natural thing to do.

Universal or Levin Search is an algorithm for solving inversion problems, devised by Leonid A. Levin (1973, 1984). It is related to the concept of Kt or Levin complexity, a computable, time-bounded version of algorithmic complexity.

The method consists in interleaving the execution of all possible programs on a universal Turing machine, sharing computation time equally among them, until one of the executed programs manages to solve the given inversion problem.

http://www.scholarpedia.org/article/Universal_search

Originally it wasn’t exactly growing them but rather brute-forcing all variations until one works. What a mathematician’s approach to programs, by treating them as an exhaustive set of combinations. (Or perhaps programmers have lost touch with this way of thinking about programs, its mathematical roots.)

Universal Search is an iterative search algorithm for solving inversion problems. Given a universal Turing machine, at iteration i , it executes each possible program p∈{0,1}i of length l(p)≤i , for 2i2−l(p) steps. The algorithm halts when one of the programs writes a solution x and verifies that ϕ(x)=y , otherwise it moves to the next iteration, incrementing i:=i+1 .

The concept was further developed to add an aspect of selective evolution, so that more fit programs survive to the next iteration.

Universal search allocates computation time according to a uniform distribution over programs. A number of more practical variations are adaptive, in the sense that the distribution used for allocating time to candidate solvers is updated in an incremental fashion, based on the results over a sequence of related and increasingly difficult problems.

So the system “learns” over time through feedback to optimize for a better solution.

A Gödel Machine (Schmidhuber, 2006) is a hypothetical self-improving computer program that solves problems in an optimal way. It uses a recursive self-improvement protocol in which it rewrites its own code when it can prove the new code provides a better strategy.

[It] is a general paradigm for solving arbitrary problems, including optimization problems and reinforcement learning. Inspired by the work of Kurt Gödel, it is based on a set of axioms and a programming language for encoding and deriving formal proofs.

The machine interacts with an environment, through a dedicated hardware and software system, and its aim is to maximize a reward over a possibly limited lifetime.

I see it’s actually an intuitive technique to “grow smarter algorithms” by designing evolutionary pressures and processes.

The Gödel machine starts its interaction with the environment according to some initial program; in the meantime, a proof search algorithm, is used to find provably optimal modifications of the machine’s software. In other words, a Gödel machine can rewrite any part of its software.

Software rewriting itself is a neat topic on its own, useful in various situations from ingenious to malicious. With language models generating increasing amount of code, which then goes through “reinforcement learning” by human feedback..

Perhaps soon computers will be designing newer better computers - and innovating other kinds of technology. Or rather, we might be growing new computers, software, and technology. I can see why some people imagine the feedback loop could spiral beyond our control. But it’s part of a larger historical and natural process that was never under control anyway, since humans - and the phenomenon of life itself - are collectively a kind of brute-force algorithm trying variations over generations of thinking and acting on the world and each other.

Cryptography rearranges power: it configures who can do what, from what. This makes cryptography an inherently political tool, and it confers on the field an intrinsically moral dimension..

I call for a community-wide effort to develop more effective means to resist mass surveillance. I plead for a reinvention of our disciplinary culture to attend not only to puzzles and math, but, also, to the societal implications of our work.

– The Moral Character of Cryptographic Work

Schools and startup incubators are similar setups of growing and evolving successful “organisms” in an environment designed for that purpose. Society in general could be seen that way, where billionaires and mega-corps are the “fittest” in terms of reward, dominating the ecology and its resources, and in turn re-designing the world, rewriting the software (language, media, culture, government) that runs humanity.

There’s a related thread with directed evolution in medical research, including gain-of-function and protein engineering. It’s a form of domestication and breeding.


Xenobiology is a subfield of synthetic biology, the study of synthesizing and manipulating biological devices and systems.

The study of Xenonucleic acids (XNAs) is not intended to give scientists a better understanding of biological evolution as it has occurred historically, but rather to explore ways in which humans might control and reprogram the genetic makeup of biological organisms in future.

“All life is an experiment. The more experiments you make the better.”
– Ralph Waldo Emerson

XNA has shown significant potential in solving the current issue of genetic pollution in genetically modified organisms.

While DNA is incredibly efficient in its ability to store genetic information and lend complex biological diversity, its four-letter genetic alphabet is relatively limited. Using a genetic code of six XNAs rather than the four naturally occurring DNA nucleotide bases yields greater opportunities for genetic modification and expansion of chemical functionality.

A fundamental aim of synthetic biology involves reprogramming the genetic code of cells to allow incorporation of non-canonical amino acids, with new and diverse properties, into proteins, to allow production of a wide range of new molecules that could have benefits to medicine and biotechnology.

There’s a parallel with synthetic psychology and memetic pollution, where the collective mind is increasingly mixed with machine-generated thoughts, words, images, experiences. It’s a grand experiment of concentrated mutagenesis.

To call it directed evolution though, it sounds like we have a clear direction in mind, optimizing for a defined goal. If life is an iterative search algorithm, what is it that we’re solving for - what is our universal search.

1 Like

Although this concerns the overhyped subject of language models, I’ll venture a post on recent advancements in evolutionary approaches to growing better programs.

How do we teach machines to discover algorithms? Traditional approaches rely on hand-crafted heuristics, exhaustive search, or gradient-based optimization. But what if we could harness the creative potential of large language models (LLMs) within an evolutionary framework?

OpenEvolve: Teaching LLMs to Discover Algorithms Through Evolution


AlphaEvolve orchestrates an autonomous pipeline of LLMs, whose task is to improve an algorithm by making direct changes to the code. Using an evolutionary approach, continuously receiving feedback from one or more evaluators, the system iteratively improves the algorithm, potentially leading to new scientific and practical discoveries.

When applied to optimizing critical components of large-scale computational stacks at Google, AlphaEvolve developed a more efficient scheduling algorithm for data centers, found a functionally equivalent simplification in the circuit design of hardware accelerators, and accelerated the training of the LLM underpinning AlphaEvolve itself.

Furthermore, AlphaEvolve discovered novel, provably correct algorithms that surpass state-of-the-art solutions on a spectrum of problems in mathematics and computer science.

AlphaEvolve: A coding agent for scientific and algorithmic discovery (Jun 2025)

Its general nature means it can be applied to any problem whose solution can be described as an algorithm, and automatically verified. We believe it could be transformative across many more areas such as material science, drug discovery, sustainability and wider technological and business applications.


ShinkaEvolve is inspired by AlphaEvolve and the Darwin Gödel Machine. It maintains a population of programs that evolve over generations, with an ensemble of LLMs acting as intelligent mutation operators that suggest code improvements.

The framework supports parallel evaluation of candidates locally or on a Slurm cluster. It maintains an archive of successful solutions, enabling knowledge transfer between different evolutionary islands.

ShinkaEvolve: Towards Open-Ended And Sample-Efficient Program Evolution

Inspired by Darwinian evolution and open-endedness research, the system maintains an archive of generated coding agents. It grows the archive by sampling an agent from it and using a foundation model to create a new, interesting, version of the sampled agent.

This open-ended exploration forms a growing tree of diverse, high-quality agents and allows the parallel exploration of many different paths through the search space.

Darwin Godel Machine: Open-Ended Evolution of Self-Improving Agents


Is any of this malleable and convivial technology? No, this is cutting-edge corporate research that will replace the human workforce with a swarm of pseudo-intelligent slurm. Yes the planet got destroyed, but for a beautiful moment in time we created a lot of value for shareholders.

2 Likes