• I built Decarbonify — carbon prioritisation for land-and-buildings owners

    Any organisation with land and buildings can list a hundred ways to cut its emissions. The hard part is knowing which few to do first.

    That’s the problem I built Decarbonify to solve. It models an organisation’s whole estate — sites, buildings, rooms, equipment, land and vehicles — as a hierarchy of assets, estimates the emissions of each in a recognised standard (the Greenhouse Gas Protocol), and turns the result into a ranked, costed list of what to do first, with the saving and the assumptions shown for every recommendation.

    I built it around a real portfolio — Bradwell Parish Council’s estate in Milton Keynes — and aligned it to the city’s Green Business Fund for local decarbonisation.

    A few things I’m pleased with under the hood: an asset-type library that keeps growing, with AI helping classify assets and suggest inputs; transparent calculations where every number is a formula you can inspect, run in a safe arithmetic-only evaluator; and a design that stays fully usable whether or not the AI is switched on.

    There’s a full write-up — what it does, why it’s useful, and the engineering behind it — plus a live demo you can click through yourself.

    → Read the case study and try it: decarbonify.mathewbest.com

  • Country-Policy LLMs: Co-Evolving near a Nash Equilibrium

    The problem I’m trying to solve is whether there are biases in the responses of the LLMs that are not explicit in their responses but can only be seen when they are asked to iterate on complex tasks.

    An interesting task im trying to test biases with is choosing policy decisions for a country.

    Changes to national and international policies can have surprising counterintuitive results, and it would be unreasonable to model this with any accuracy, so instead I use an NKC tuneable fitness landscape to model the complex interactions between countries and policy decisions. 

    Quick summary of the process:

    1. Create an NKC co-evolutionary system where each “country” (species) is controlled by an LLM to optimize its policy genome.
    2. Initialise and iterate the co-evolutionary participants until they achieve a weak nash equilibrium
    3. Back off the nash equilibrium by randomising a few elements in the policy genomes. 
    4. Assign an LLM to each genome, and names to each policy
    5. Repeatedly ask each LLM in turn if it wants to make a specific change to its genome, based on the resultant changes to its fitness and other countries finesses.
    6. Watch to see where it ends up: stability – chaos – oscillation etc. 

    I’m interested to see if an LLM pretending to be a country has biases that could only be winkled out using these co-evolving iterative strategies.

    Here is a quick pick of four differently complex fitness landscapes from the NKC System:

    And here is a picture of the 16 random countries optimising their fitness in a co-evolutionary setting

    Once the first weak Nash equilibrium is achieved, I pause the system and randomise 3 policies, and set it running again. This would be the point that i would let the LLMs take control fully but at the moment I can only run it for a few steps on my laptop. 

  • NKC – Tuneable Fitness Landscapes

    The NK model, developed by Stuart Kauffman, is a useful framework for studying how complex biological, social, or technological systems evolve over time. The key idea is that each of the “N” components in a system adds its fitness contribution to the total, but each of these components’ fitnesses is dependent on the qualities of “K” other elements in the same system

    Here is a nice article to describe this model: https://www.econstor.eu/bitstream/10419/217461/1/s41469-018-0039-0.pdf

    Stuart Kaufman’s original system is based around a random numbers siting on a hypercube. – which is a challenge to visualise, so historically, the surfaces have been “representations” rather than actual plots, such as this figure from Felipe A. Csaszar

    I always found this a little frustrating, so here is my attempt to visualise an actual surface extracted form an NK landscape. 

    Algorithm:

    1. Pick a random point on the hypercube. 
    2. attach that n-dimensional position to a 2D position on a grid
    3. create neighbours on the 2D grid that are not more than a hamming distance of 2 from the first point
    4. spiral out making more points that are no more than a hamming distance of 2 from any neighbours
    9 Points on a hyper cube each with a hamming distance of no more than 2 from its neighbour.
    Four plots with the same value of N (16) and different values of K from 0 (very smooth landscape) through to 12( rather rough)
  • More Water for Creatures

    Fluid Drag System

    Body parts now have a fluid drag system that calculates how water resists an object’s movement by analysing its shape, velocity, and surface orientation.

    Using Monte Carlo sampling, points across the object’s surface and determine how the water slows it down. This creates (semi) realistic water resistance

  • Water for Creatures

    The buoyancy system calculates how much of an object is submerged in water using Monte Carlo modelling and applies an upward force to counteract gravity. This allows creatures and their body parts to float naturally in simulated water.

    The system asses submersion by randomly sampling points across the object’s volume and checking how many fall below the water’s surface. If the object is partially submerged, the system estimates the submerged volume and applies the appropriate buoyant force at the centre of buoyancy.

  • Approaching Food

    First signs of directed life

    • Tree Drops Fruit
    • Creatures is hungry
      • Action Selection chooses “Approach food”
      • Target Selection chooses nearest food
      • Creature approaches nearest food.
    • Creature touches food
      • Food is consumed
      • Nutrients passed into creatures body
      • Creature is no longer hungry
      • Action Selection chooses “Random Explore”