I even clicked through quite a few of those prominent early links and didn't find a code example!
We are working on a new version of the website, with HTTPS, and with better examples and a better layout.
I love your blog posts on LLMs, BTW! We've been experimenting with combining LLMs and miniKanren in various ways.
Lately, I've been playing a lot with the code from Neural Guided Constraint Logic Programming for Program Synthesis [1]. I want to apply it to searching for neural network architectures. Something like:
(define-relation (layero layer in out) ;; [2]
(conde
((== layer `(Linear ,in ,out)))
((== layer `(Relu ,in ,out))
(== in out))
((fresh (percent)
(== layer `(Dropout ,in ,out ,percent))
(== in out)
(countero percent)
(<o '(1) percent)
(<o percent '(0 0 1 0 0 1 1))))))
And a `layerso` that is just a sequence of `layers`. And then use some metric that captures how effective the training run was and use that metric for teaching the search network.I'm sure there's better ways to do it than the way I'm going about it. But it's a fun way to learn a bunch of cool new stuff.
Thanks for getting me started down this path!
[1] https://arxiv.org/abs/1809.02840
[2] https://github.com/eihli/reason/blob/523920773b7040325c8098a...
miniKanren was my introduction to relational programming (SQL aside!), and I had hours of trying to wrap my head around the Reasoned Schemer.
Were you aware a miniKanren-inspired language was the foundation of a large chunk of Amazon's retail data aggregation stack? I'm no longer there, but it might be one of the larger deployments out there. We spent many many hours trying to figure out the best way to run the relational engine at scale and with acceptable performance.
I did several MOOCs on discrete optimization and I understand how a constraint solver works, and how local search works, for example. I also understand how a SAT solver works.
I just do not understand what logic/relational programming does. Is that a constraint solver solving just one kind of constraint, ie logic equations, a bit like a SAT solver?
[Edit] on my side I was really impressed by a paper using Minikanren to generate an algorithm, a sorting function if I remember well. It was about 8 years ago. Tried to fully understand the paper but gave up at some point.