introducing KAISEN AI system - autonomous loops with deterministic testing
hello everybody,
since November 2025 i've been working on an genetic algorithm that uses local LLMs as a mutation factor to continuously iterate over a single C program in order to improve its performance.
this system proved extremely effective at reaching my performance goals by bruteforcing thousands of generations then measuring the results passing the generated programs through a test suite that the LLM has no access to (so it cannot cheat, but it's gonna try!). Every new found best becomes the basis for the next generations and guardrails are in place so that most dangerous code doesn't get tested.
since this system served me well and gave me results with gpt oss 20b that i couldn't get with frontier models in full reasoning mode (and with a lot of interaction by me), i opened an AI lab and started working on a generic version that is able to work with any program (22 languages and counting) and to build the test pipeline autonomously. for the nerds: part of the reason small models punch above their weight here are a deterministic autofix ladder, compiler-hint fixes, linter fixes, then one LLM repair pass fed the real compiler error, and every candidate is re-verified for real before it gets counted as valid. you can use it as humans with a gui that helps you step by step or you can point your agent at the KAISEN folder and tell it to use the kai protocol to start tests on its own (works very well with llms using the omp and deepseek harness)
right now you can check out the alpha version of KAISEN here: https://github.com/RAZZULLIX/KAISEN
tldr
KAISEN lets you use local LLMs to improve software performance by iterating thousands of little changes and keeping the new best as basis for the next generations. it has a GUI, your harness can spawn it as a sidecar, and it speaks a small-model-friendly protocol (KAI) so an LLM agent itself can drive it over stdio or http. every program it generates runs guarded by default. read the manual to know everything it can do, or ask here.
P.S.
i expect A LOT of bugs and problems, most of the tests i did were done through deepseek v4 using OMP and deepseek harness calling KAISEN through the kai protocol (KAISEN was hooked to 6 instances of gpt oss 20b) and it actually worked quite nice. please let me know everything you find by opening an issue or asking here, this is my job now so i'll do my best to fix everything you need fixed and make sure KAISEN becomes a useful tool in every LLM user toolbox.