I recently did a weekend hackathon with Sinem Erisken and Pandelis Mouratoglou. We investigated the behaviour Llama, a popular LLM, under various conditions. Our paper won 3rd place!
You can see our paper, the code or watch this 6-minute summary:
I’m releasing a new open source library, RuleBook. Inspired by Inform 7‘s rulebook feature, it’s a way to make functions by defining a set of rules to evaluate. RuleBooks let you define functions are easy to mod and update at runtime.
What are rulebooks?
Rulebooks are essentially a fancy form of C#’s Func<>
and Action<>
generics.
Func<>
and Action<>
can hold a reference to a C# method, or an lambda expression/statement. But the thing they hold is essentially a black box – you cannot do much with it except run it, or check equality.
RuleBook provies FuncBook<>
and ActionBook<>
, which work similarly to their counterparts. But these rulebook objects are built out of individual rules, which can be individually inspected and mutated.
Overall, rulebooks give a systematic way of handling a bunch of useful programming patterns, including events, multiple dispatch, modding and code weaving.
Rulebooks are not an elaborate rules evaluation engine, it’s a lightweight way of stitching together bits of functionality.
This is a experiment I tried out for ProcJam 2023. I wasn’t getting great results from it and got bored after a few days, but I’ve decided to share what I did manage.
The rules of the hackathon were changed this year, ruling out most forms of AI. I was thinking – what’s the furthest I can push that rule without crossing the line?
In the end, I designed a system where we used AI to design and build a standalone classical generator.
Continue readingEver struggled to figure out all the possible combinations of tiles you need to put together for autotiling? I’ve create a tool answers that question for a variety of cases, with visualizations.
I’ve created a new open source library.
I’ve been learning quite a bit about AI and AI Alignment recently. A few weeks ago I joined the Interpretability Hackathon. Sadly my contributions were minimal as I had to leave halfway through, but doing it made me appreciate how bad the tooling is in this area.
So I’ve created nice-hooks, a library for working with pytorch hooks and activations more effectively.
I’ve released a new library, Sylves that handles the geometry of grids for C# or Unity. I’ve basically distilled all my knowledge from several different grid projects, and made a solid base for anything you might want.
I was discussing how AI text generation, such as ChatGPT, might end up getting used in computer games. So far, designers are fairly reluctant to adopt the technology. One of the key problems is that you just can’t control the output enough. Language models will break character or respond in inappropriate and toxic ways. Finding a good solution to this is a huge research field, and not likely to get cracked soon.
For the foreseeable future, AI in games is much more likely to be used offline – assets and dialog generation generated up front, so it can be vetted before being integrated into the game.
But it got me thinking, can we vet the AI’s output in advance, but still get the benefits of intelligent decision making at runtime? It turns out, we can! I doubt it’ll be useful in every circumstance, but I can certainly see uses for it, like chatbots, games.
The code and demonstration for this article is available here.
Continue readingI’ve relased a new library, VoronatorSharp.
VoronatorSharp is a C# library that computes Voronoi diagrams. The Voronoi diagram for a collection of points is the polygons that enclose the areas nearest each of those sites.
Voronoi diagrams have applications in a number of areas such as computer graphics.
This library features:
n log(n)
sweephull algorithm.As a side-project of a side-project, I’ve made a little painting program. It’s like a normal paint program, only you paint on a tile grid instead of pixels. You can create mosaic and stained-glass style images.
Continue readingBack in 2017, I described a method of random path generation called Chiseling. It gives very nice wiggly paths, but I was never satisifed with the performance. I later revisited it, and found a faster algorithm, but it was a bit complicated to implement.
I’m pleased to say that I think I’ve finally found a way of implementing it that is both fast and simple.
Continue reading