May 16, 2020No Comments

In wildness

Some musings I had while out for a run the other day.

There’s not a huge amount to say about running other than that I have ‘discovered’ it over the last two years it’s a now thing that I seem to be partially dependent on. When I fall out of the routine, say due to illness or tiredness from going out too late, everything seems to begin slowly unravelling. There are obviously many worse things to be hooked on so I’m not that worried about it but still it is an addiction of sorts.

Running is also the only time I really get to myself where I’m not busy, mentally speaking, with something. It is good thinking time, although this can unfortunately lead to blog posts.

...

Some time around 2005 I was traveling by plane on my own. I was reading Richard Dawkins’ 1986 book The Blind Watchmaker. I studied A-level biology so know a bit about the mechanics of genetics (dominant and recessive alleles, experiments with fruit flies and so on) but had never really thought about it deeply or philosophically. And the book does go quite deep.

I came to a particularly astonishing passage in the book describing and explaining how all life is really connected. And it is connected in the scientific sense, not just as some vague hippie sentiment. I had a moment of sudden insight (exactly what the author intended to convey), framing all life on Earth as genetically related, interconnected, and symbiotic. Seeing life forms as essentially different configurations of vehicle for the replication of DNA. And while each species is opinionated about how best to go about the mission, all of us have (in a reduced and ultimate way) exactly the same mysterious end goal of keeping life going.

Naturally Dawkins put it much better than me, and I don’t have the book to hand, but I do remember that when the concept sank in the hairs on my arms and the back of my neck stood on end, and I lowered the book to my lap, stared out the window at the Earth from above for a moment and mouthed the words ‘fucking hell’.

One of those moments, anyway.

...

So a few days ago I was out running. I nearly always take my Bluetooth headphones and distract myself from the exertion of it all with an audiobook or podcast but on this occasion I’d been having problems with the Audible app and it was stuck in some kind of loop syncing to my watch. This was holding me up so I decided to leave the headphones at home and go ‘unplugged’. It was early. I took a route further out of town than usual, one I’d only cycled or driven before.

The weird atmosphere of the COVID lockdown has been commented on at length, but that morning the whole area felt particularly deserted. As I ran the weather started to turn. The wind picked up and whirled around so I was being rained on from all sides. It was the sort of weather that, had I just been walking, would have been miserable but I don’t mind the rain when I’m running because I get hot and so it’s refreshing (within reason).

There is not really a point or conclusion to this post, nor do I wish to imply pretentiously that I had any particularly special or unique revelation. It’s just... because I had so much time to think after the moment had passed, as I ran home, I resolved to write it down if only because it was interesting to me at the time and I want to remember it. A personal experience.

I had not passed a single person for at least half an hour. I was completely drenched but warm and in that running zone where you start to feel like a well oiled machine that could keep on going forever.

Everything seemed wilder and more overgrown than usual, brambles snaking aggressively out of hedgerows. Of course this could have just been down to the changing season and the amount of both sun and rain there had been recently but my imagination was wandering.

There was this sense of the very beginnings of nature reclaiming the land, which of course it always is until we cut it back. The trees seemed huge and impressive, twigs swishing noisily through the air as the branches swayed around. The birds were singing loudly in the canopy overhead. The wind seemed to get stronger, whipping the trees more violently, and due to the air swirling in different directions there was, I thought, a slight doppler effect applied to the birdsong which mixed in with the rain gave it a dreamlike sense.

And all of this brought me back to that moment on the plane in that way that you sometimes remember a feeling.

Yes it does sound a bit pretentious but, hell, whatever. Nature is pretty amazing.

I suppose the lesson is that I should leave my headphones at home more often, and also maybe that the most obvious outdoor weather: a nice sunny day, is not necessarily the most interesting.

May 3, 2020No Comments

Thanks for the donations

My little 26 mile challenge this week has so far raised £918 for Cancer Research UK (£1,037.75 including GiftAid) which is really great. Thanks to everyone who made a donation, or shared, liked, commented on my posts about it, it all helps! Should you wish to donate, my JustGiving page is still open here.

I have combined all three running routes just to see it all together on the same map. Red, then green then blue.

Strava links: Run 1 Run 2 Run 3

April 28, 20201 Comment

Running a marathon (well, sort of)

Donate to Ade’s 2.6 (x10) Challenge

I’m not a long distance runner, but for the last 18 months or so I have been getting into doing a few short runs a week - usually about 5km and more recently sometimes up to about 9km.

Basically I’m pretty happy running for up to about an hour, but I’ve not tried slowing it down and going much further.

Two Point Six Challenge

Last Sunday would have been the day of the London Marathon had it not been cancelled due to the Coronavirus pandemic. The Marathon usually raises a lot of money for charities through sponsorship so in light of it being cancelled they came up with #TwoPointSixChallenge the idea being for people to raise some money doing their own challenges based around the number 26.

Pre run selfie

Some people are running 2.6 miles, some are cycling or doing other sports or activities. Everyone's level of ability is different and difficulty is relative. Certainly I could not have run 2.6 miles 18 months ago, but given that I run often it would not have been difficult enough now. So I decided to run all 26 miles this week.

I’m doing it to raise some money for Cancer Research UK. If you would like contribute to you can donate on my JustGiving page.

We have already raised £336 £566 £722 (including Facebook donations) which is amazing, so thank you to everyone who has donated.

The main reason for this blog post is because I think giving it one last push could help it reach a few more people who might want to donate to Cancer Research.

Social Media

Social media is proving to be a difficult way of reaching everyone. A friend I chatted to today said they weren’t aware I am doing it, despite me going on about it constantly online for the past two days! I am battling against the algorithms.

So if you would like to donate then that would be amazing. But even if you don’t (which really is fine) then it could help loads if you could like, share or reply to or otherwise react to my social media posts about it – as that will help to convince the algorithms that it’s interesting.

Please see: this tweet or this Facebook post.

Progress

I went a bit overboard and ran 9 miles on Monday and 10 miles today so I have about 7 miles left to do. So I’m doing a marathon in three days.

Monday was all things idyllic and sunny but today was pretty hard going and in relentless driving rain. Also I foolishly took a right turn up the steepest hill in the area which goes on LITERALLY FOREVER. So now I’m feeling a bit broken. You can see my routes here and here on Strava.

I cannot fathom how people run a whole marathon in one session at any sort of speed!

Progress update 2 (29/03)

I completed it this morning. Day 3 was not too bad! What have I learned? I could probably manage a half marathon.

Please help share this!

Any shares likes, retweets and comments et cetera help more than you might realise. It would be great to get to £400. Donations are now at £722. I will top it up by an extra £100 as well. The current (and of course very serious) virus problems aside cancer remains one of the highest causes of suffering and death, and science and research are how we will eventually solve it.

And if you do want to donate please click the big banner at the top or below. And if not please do consider sharing.

Thank you!

Donate to Ade’s 2.6 (x10) Challenge

February 14, 2020No Comments

Meat alternatives

I’ve lately seen a lot of convincing cases made to go meat-free. First there was The Game Changers which I watched on Netflix back in November. It did come across as fairly heavy pro-vegan propaganda, but then I thought about the old adage “follow the money”, and figured that if anyone was going to be pushing a dodgy agenda then surely the meat industry is prime suspect here. So maybe what it is, is that we’ve been hammered by pro-meat propaganda for decades and The Game Changers is a fair and timely pushback.

Anyway, it’s worth a watch, and presents some pretty convincing arguments, endorsed by Arnold Schwarzenegger and Lewis Hamilton among others. If I had any critique I would say it is largely anecdotal. These are high profile case studies. But evidently at least some top athletes are succeeding without any animal products in their diets. So on balance it makes a good case for veganism.

Personally while I do occasionally enjoy a burger or a steak it’s now only roughly once every six months. Health and nutrition arguments aside, surely – given the terrible environmental cost of cattle farming – we can at least cut down and start to see beef as more like a delicacy rather than something that has to be on every plate. Obviously there’s also the amount of milk we consume to to take into account. I’ve been using almond and hazelnut milk (the latter of which is great in tea!) recently but then there was that story about bees so as usual nothing is simple.

People argue at great length about nutrition and organic and so on and in my view a lot of what gets claimed is bullshit, in part because it’s hard to prove or disprove what actually happens inside your digestive system and beyond. I find Snopes good for fact-checking this kind of stuff. It seems to me that the human body is impressively versatile at dealing with whatever you chuck down your throat. But of course over the long term a healthy diet is going to be better for you than an unhealthy one. Surely the odd bad thing now and then isn’t a disaster unless perhaps you’re a high performance athlete. Everything in moderation.

Anyway, burgers aside I don’t think I’ll be giving up chicken or fish anytime soon but we do have a lot of vegetarian meals during the week and options are getting better. Quorn mince seems as good if not nicer than meat for making meals like chili con carne (technically chili sin carne I suppose).

Today this (apparently not sponsored) video by Mark Rober (remember the glitter bomb guy?) popped into my feed and I have to say those Beyond Meat burgers look very tasty. And I’ve just been informed on Facebook that they are available in Tesco. So I’m going to pick some up later and give them a try.

February 12, 2020No Comments

Week 07

On being a creative person trapped inside a technical person’s brain

Read more

January 31, 2020No Comments

DJ mix of my tracks

I have just recorded this DJ mix, with a selection of firstperson tracks from 2017-2018. Putting it all together feels like a good way of closing this chapter. I am pretty proud of a handful of these tracks for personal reasons. YMMV of course. Learned lots and now it’s time to do something a bit different... and perhaps more considered.

People in the US might not be able to play it on Mixcloud owing to the fact they have to process a waiver form saying that I produced all of the tracks in the mix. So just under the Mixcloud embed please find a direct link to the MP3 file.

Selected Firstperson Tracks 2017-2019

Selected Tracks 2017-2019.mp3 (direct link)

January 29, 2020No Comments

For The Future

Further to the previous post, here’s some new music! As usual it’s on SoundCloud which is embedded below.

Just under that is the Bandcamp release where you can buy an uncompressed WAV copy (sounds much better) for just £3.

‘For The Future’ on SoundCloud

‘For The Future’ on BandCamp

January 27, 2020No Comments

Spouting music into The Void

This tweet by Ron S. of Anode Records encapsulates well how it often feels to share your music online. For me it’s borderline embarrassing to announce to the world your own creative work. And the way it goes is that you build it up… and spend days (sometimes weeks) fussing over details and over-listening until you have pretty much no idea if it’s any good or not any more.

So after all that, and even though you primarily make music for your own enjoyment, it would seem a shame to just leave it on your own hard drive forever, never to be heard by anyone else. And if you’re me (which I am) then you know full well that it’s amateur dad-techno which probably has niche appeal to a handful of your also-40+ cohorts. But… well maybe those people would like to hear it. It would be great to get a bit of feedback too. Is it any good? Do you like some bits? Does this have any merit at all? So you send it privately to ten or so friends and family. Be honest, tell me if it sucks. Anything!

But you don’t hear back for a few days so whatever... out goes the Tweet and a Facebook post. May as well throw it out there.

But then still nothing. No interactions or responses. Awkward.

So you then worry that everyone thinks it’s so terrible that they don’t know what to say. So you look at the stats and, no, that seems not to be the case because because, well, twitter gives you tweet analytics:

  • Impressions: 179
  • Likes: 1 (thanks bro)
  • Retweets: 1 (my other account)
  • Link clicks: 1

And Facebook:

  • 3 people reached
  • 0 engagements

So one person clicked through and listened to the track on SoundCloud. In 36 hours. The tweet is now well buried.

The reality seems to be that it’s pretty difficult to get people to hear what you’ve recorded. Is nobody interested in this sort of music any more? Or are they just busy? (probably this) Is it because there’s a zillion hours of free music uploaded every minute? Or is it the algorithm making it essentially hidden? (could be) Is social media just a bad way of sharing music unless you’re Calvin Harris with 12.6M followers?

If the problem was just that the music is crap I would expect a lot of clicks but no likes. But there are near zero clicks. Nobody is hearing it to begin with.

This, in part, led me to giving up for 18 months. What’s the point? But then I missed doing it and got quite low because I wasn’t doing anything creative in my life (work is mostly technical these days).

So it’s 2020 and I’m starting up again. And it’s not at the standard I would like yet. So the answer is to make more and more stuff. But then to be more selective. Fail lots and get better. I’ll continue to share it because why not. But like Ron, above, I won’t expect any of these tweets to blow up anytime soon.

p.s. Ron S’s Planet Z tracks are pretty great. And thanks to anyone who did spare a few minutes to listen to my new tracks (thanks Tom, Ben + Daniel!) And thanks Dad for buying a copy on Bandcamp 🙂

January 4, 2020No Comments

Noughts and Crosses

TLDR: play it here

Between Christmas and New Year this year, as every year, the Royal Institute Christmas Lectures took place. This year they were presented by Hannah Fry and the title was ‘Secrets and lies: The hidden power of maths’ (here on BBC iPlayer).

Our boy is now seven so we were keen to sit him down to watch the lectures. I remember being at school and struggling a bit with the “why” of maths. Understanding how maths is applied in the real world can really bring it to life. This year’s lectures did exactly that and he loved them!

In one of the lectures Matt Parker demonstrated a machine called MENACE created by Matt Scroggs (a copy of Donald Michie’s 1961 MENACE). MENACE is built out of matchboxes and can effectively play noughts and crosses:

Matt also made this this JavaScript version of MENACE.

I found this totally fascinating and decided to make my own version, basically as a learning exercise. It had never previously occurred to me that building reinforcement-based machine learning code might be something within the reach of my capabilities.

My version

Play it here – Hint: when you first load it you are playing a complete beginner. Click the green button to load a pre-trained computer player.

It is built in AngularJS which is a framework I know well, so I could quickly put together the basic game mechanic. AngularJS provides a code-light way of binding data to an interface.

The first (and easiest) part was to make a noughts and crosses game engine. This is fairly straightforward because it's such a simple game. Initially the game was just for two human players.

The second (and more interesting) part of the task was to make the computer player itself. The computer player is separate from the game program, and is notified by a window event when it is its turn to go. The game controller has a public method so the computer can ask it for the board configuration, and another method for the computer to make its turn (also used by the human player).

The computer player is in not programmed to play noughts and crosses, it has to learn how to play it from scratch. The only thing it gets told is where it can go, so it doesn't try to go in places that are already taken.

The computer player deals quite abstractly with a flat array of positions that it calls the 'stateArray'. For basic play it doesn't even need to "know" that these are arranged in a square. The process is:

  • Get the state array from the game controller
  • Find which places are free
  • If it's the first time it's seen this configuration: Generate an object representing an equal chance of going in each free position. Otherwise: Fetch from memory the existing object representing this configuration.
  • Pick a position at random from a pool of choices where the number of each choice in the pool is determined by the weightings (so for the first time it sees any given configuration there are an equal number of choices for each position).
  • Make its move
  • Remember where it moved and what the board configuration was at the time
  • At the end of the game, for each move made, create or update a permanent record of the configuration at that time updating the weighting according to whether it won, lost or drew the game. In other words if it won it will be much more likely to make that move again. If it lost it will be less likely to make that move again (and eventually the chance will be zero) and if it drew it will be just slightly more likely to repeat the move.

Rotations

All of the above can be done without the computer player needing any sense of it being a square board. However an extra level of complexity was required for it to work like MENACE – namely rotations (technically rotations and flips). So in addition to the above I added a rotations handling service. This needs to know the board width and height. Essentially it turns that flat state array into a two dimensional array (rows and columns). These 2D boards can then be rotated or flipped. For any given board configuration the rotations service works out all the equivalent rotations that are unique on the fly. So for some configurations there would be no equivalents (e.g. a blank board, or only one item in the middle). It mirrors and flips the board so there are up to eight equivalents for any board layout (see this Google sheet).

The mirrors service itself took me about a day to grapple with, it's complicated because we need to:

  • Get all rotations of the current board
  • Search our history for the 'keys' of those rotations (to see if we have seen any of those rotations before)
  • On finding a match get the move weighting of that match.
  • 'Unrotate' the matched move weighting object (reverse the process) so it aligns to the 'real' board
  • Pick a move using the unrotated weighting and make our move
  • Finally re-rotate our actual move position so we can update the chance of going there again in the context of the rotated version in the history

This mirrors service itself ran to 250 lines of code. There are probably ways to do this more simply, perhaps by people more adept at maths! I got there eventually but this was by far the most complicated party of the work and took a day to write (this file and the integration with it back inside the computer player module).

I made the rotations module separate from the computer player to keep things flexible. It does not have the board dimensions hard-coded, so it could be used for other games too.

Summary

Take a look at the source code here on Github

This was great fun to build. Noughts and Crosses is of course a very trivial game with only a few hundred possible board configurations (and even fewer due to the rotations) but even so building a computer player that learns how to play it was surprisingly complicated.

I am now wondering if I can repurpose the computer player to learn how to play a simplified version of Pontoon (i.e. should it stick or twist for any given hand?). And I am also thinking about a way of building a player for Connect 4.

Connect 4 has many more places and possible configurations so it might require a different approach but I will see where I get to. The key differences are:

  • In Connect 4 you can only pick a column to move in, not a row (pieces always fall to the bottom and do not float)
  • In Connect 4 we can't rotate the board as it is bound in one orientation by gravity. However we could most definitely half the configurations (and must do to speed up learning) by flipping horizontally.
  • The number of possibly configurations is vastly greater than in noughts and crosses so we might not be able to store every possible state, in part due to memory limitations and in part due to this being inefficient. Given that we only need to worry about rows, columns or diagonals of length 4 it might be sufficient to only consider configurations within 4x4 squares regardless of where they are on the board. This should reduce the amount of unique patterns to store. I will report back once I get going with it.

Anyway let me know what you think. Or if you have any ideas on how to simplify or improve the code let get in touch and / or make a pull request.

February 19, 2018No Comments

Mid-late 90s techno records for sale

I may come to regret this, say, if an electromagnetic pulse from space wipes out all of humankind's digital storage. But I'm selling most of my vinyl records.

You can find them for sale here on Discogs.

Contact

© 2022 Ade Rowbotham Ltd