I'm dropping this thing because I thought it was going to be a one weekend project but ended up taking me an entire week and I have to ditch like half of the features I had in mind when I began. Maybe someone here can use it as inspiration for something better.
The idea was basically to have a base program that runs a simulation and can execute arbitrary planning algorithms, which are isolated from the simulation code. In this case I decided to use Zig for the base program and Lua-JIT for the planning scripts because it is easy to embed. Maybe Julia or Python would have been better choices, but I didn't want additional dependencies.
https://git.leftychan.net/sbhr/econ