Home

Awesome

Uxnbruteforce

A small C program to optimize little pieces of uxntal code. It is a work in progress, a little bit messy for the moment :)

I had the idea to do this because I remembered seeing this concerning the Joy programming language : A Brute-force Automated Construction Finder And I thought it would be cool to do the same for uxn.

How to use it ?

git clone https://github.com/max22-/uxnbruteforce
cd uxnbruteforce
make run

The current example solves %MIN2 (finds the minimum of 2 shorts). The first solution is not that correct (it generates a correct answer, but jumps in the middle of nowhere...). This one looks better : LTH2k JMP SWP2 POP2

To solve a different problem, you need to edit

A quick and dirty hack is made in uxn-fast.c, to avoid infinite loops. (the main loop in uxn_eval is limited to 100 iterations).

TODO / Ideas

Bugs

Contact

Mastodon: @maxime_andre@mastodon.xyz