These are all scratch pads of me working out the algorithms for this thing I am trying to build.
Turns out it's a pretty difficult though exercise but actually kind of fun.
I suspect a developer could have knocked this out in a day of billed work but alas, I'm not a developer.