← All posts

The First Algorithm

2026-04-19

The first Over 2.5 algorithm was handwritten like it was 1901. It was actually 2024. I wanted focus, so I wanted pen and paper (initially), then I wanted my laptop, soon after I wanted coding agents...

Regular searches on the internet for stats pages found the usual ones, and after exploring them I found one I really liked. It was easy to navigate and rich with statistical fields. I was off and running. Well, I was sat on my backside, obsessively building an algorithm :)

My initial aim was a solid baseline algorithm for forecasting Over 2.5 goals in football games. I wasn't interested in Under 2.5. Who wants to wait for nothing to happen? In time I discovered Under 2.5 can be just as nail biting, especially if it's the last game in a large accumulator! But first off it was the excitement of seeing "Goal!" flash up at least three times, and to know I had predicted it.

So what are the most important stats for this type of forecast?

In my experience, the usual suspects.

Recent, and settled history of the teams involved, together and apart. I usually look for 2-3 years. Long enough for patterns to be stable, but not so far back that football rule changes and club churn change the personality of the teams (usually! lol). H2H at Home Venue. H2H All. BTTS H2H. Average Goals scored. Average concession rates.

You can imagine the eleven I identified? But how to ensure a repeatable accuracy that was worth putting my money on?

Especially as I would be selecting fixtures that were often favourties, often hard favourites just by the nature of the algorithm. As while the fixture may appear lower risk, any failure could potentially write off gains from several successes with short odds.

66% seemed the best minimum value to aim for in the stats, ie, How often does Team X v Team Y at Team X's Home Venue result in Over 2.5? With enough reliability in the H2H history to seem probable the next time they play at that same venue? 66%? That should give me a 2/3's chance of success if the profile was consistently matched? If some outsiders are found alongside the favourites?

And it did.

(Note : When looking at team histories don't just look at goals scored in total. Look at how a team generally plays away and at home. Often a team has two personalities. Aggressive at home and defensively focused away, or vice versa. In this way you can identify fixtures in low-scoring leagues that will go Over 2.5 and give you good value.)

My system won often enough for me to trust it fully - when I was disciplined and stuck to my system...anyone who likes a flutter knows that winning makes getting sloppy in selection easier. Discipline when winning is needed just as much as discipline after a loss.

The original 11 criteria algorithm worked so well I decided it needed coding up, as manually searching through all the fixtures each day, day after day, to select the ones that fit the system, all that analysis, that was time consuming. Add that to waiting on the outcomes and the mental drain was heavy.

And by this stage the algorithm had gained weighting and barriers and filters and omg...so much complexity beyond the initial "Let's just average each 11 criteria, see how many hit or exceed the minimum value, and if enough of the 11 hit, go for it".

I soon discovered attempting to explain my system to anyone else was madness, ie, I looked mad!

"You just take this and put it with this and then you turn it on its head and do this and then you tickle it under its chin and tell it to sit and then you go out of the room and shout here! And then you hide and then you jump out and say Boo! With a Power Ranger mask on and then you simply...see? Easy!"

So much for that. I'll just keep it to myself. I know it works. I wanted to share the algorithm with a select few, two of whom could code...but it was no good - mostly because I couldn't boil my system down in a way that was even vaguely comprehensible to anyone else.

And that's when I decided to talk to coding agents...and they could understand it.

Immediately.

A big pile of computer chips got exactly what I was up to and it was partly because of something I did in that first discussion with a coding agent, that I now do all the time when setting up any project, and didn't realise how useful it was (for another post on The Newbies Guide for Using Coding Agents).

That original algorithm is still the foundation of much of the forecasting work of my models. I have tried to expand it. I spent months fetching years of global football from the API and running it all through Machine Learning models to see if I'd missed any important signals. So far, I haven't. Presumably because football is noisy predictively, can be very messy and so you want a tight selection of signals, not an ever expanding list.

So from pen and paper, to worrying some close friends about my sanity, to coding it up with agents for my own productivity, and on to releasing apps, the first algorithm, conceived to solve a puzzle (just because the puzzle was there) is still working hard today, and begetting other algorithms, and I'm sure in time, its children will have children of their own, and they'll all be football mad!

Privacy policies · Informational content only.