Free will vs determinism in the justice system

I find the debate on free will fascinating. The belief that no decision is free of the events that occurred prior to it seems self-evident to me. I can understand the fatalism that such a belief might cause but, thus far, haven’t fallen prey to it. Perhaps it is because I think that knowledge of determinism itself is a factor that could shape societies for the better.

One interesting consequence of accepting determinism is that, some of its proponents suggest, we must also reconsider how we view the justice system. If an individual is never truly free to make the decision to commit a crime, then there is no moral case for a justice system predicated on punishing the perpetrator of a crime.

This seems pretty logical when taken at face value. I do wonder if there might be a hole in this logic however. The use of punishment in the justice system isn’t just about the individual. Although there may not be a moral case for punishing the individual, is there a moral case for punishment as a deterrent?

I suspect from a societal point of view, the answer may be yes. The actions of an individual may be deemed sufficiently dangerous to the collective good that they should be punished to achieve a deterrent effect. Of course, deciding what crimes and what level of deterrent is another matter.

Can this be seen as moral though? If one sees utilitarianism as a moral imperative, then I guess it can. This isn’t me attempting to make a definitive case either way, so much as suggesting that what may seem self-evident from an individual point of view may not necessarily follow in a society governed by external factors.

It’s something to ponder anyway.

Why I’m studying… yet again.

The Computing and IT Degree I’m doing with the OU is actually the fourth HE qualification I’ve completed in my lifetime. Like my first degree, it seems to be following the format of Level 1 being a rehash of A Level standard work, Level 2 being the required modules and Level 3 being where you get to specialise in what interests you. Also like my first degree, Level 2 is where I expect to hit a motivational wall.

My first degree is in Psychology. As a teenager, I was pretty good at Sociology. My Aunt had a PhD in it and my family always discussed politics and society (from a left wing standpoint). It’s a fascinating subject, and is probably the degree I should have done. Instead I became addicted to a TV show called Cracker, about a forensic profiler, and decided I was going to study Psychology.

As a socially awkward teen, not introverted as such (but tending towards geekiness and poor decision making), the lead character of Cracker presented a weirdly admirable personality. Someone who could speak to anyone, was confident, funny, willing to be controversial, yet charismatic. Someone who understands the mind of even the most damaged in society. That was someone I would like to be.

With the naivete of youth, I decided that becoming a profiler would make me that person. That decision steered me towards my first degree, but wasn’t really enough to justify the decision to study Psychology. When I got the taste for the Student Union bar and socialising, then hit a motivational wall during the second year of my degree, it became inevitable that I would graduate with nothing more than a 2:2.

In shock news, I didn’t become a profiler, despite a 2:2 being enough to progress into a career in Forensic Psychology. Instead I fell into teaching, which is what resulted in me completing two additional HE courses. One was the teaching diploma and the other was the Numeracy subject specialism. These were pass or fail, fairly short, and required for my job, so motivation never became much of an issue.

Since then, having been made redundant, I’ve fallen into website development and discovered a love of coding. This has led to me studying PHP with Zend, as well as completing a few FutureLearn courses on the subject of programming. Now, after a few years tinkering around the edges of the subject, I’m completing a degree in Computing and IT part-time, and I’m currently completing my first Level 2 modules.

It’s the Level 2 modules that have gotten me thinking about how I maintain my motivation. I’m completing the third year of a six year degree. I work full time, I have three kids and I’m a Councillor at both Parish and District level. In short, I’m extremely busy (too busy to be writing this really, but…). I therefore have to be mindful of how I continue to balance everything that is competing for my time and attention.

Why, when I’m already busy enough, have I chosen to put myself through another degree? That question needs to be at the centre of my thoughts whenever my motivation lags behind my workload. It is why I’m writing this post. I want something to come back to whenever I get stressed or bored with my studies, or when an assignment doesn’t go well or gets in the way of something I’d rather be doing.

So here we are. Why am I studying? My reasons for doing this degree are outlined below.

My current job role focuses mainly on customer support and frontend development with HTML, CSS and simple WordPress or Symfony function calls. If I want to be able to progress in my new career, especially into full stack development, I need much more practice with PHP, JavaScript and SQL. I wasn’t getting such practice in the unstructured spare time that I had, but my degree studies will require it.

I regret that I wasted the massive opportunity presented by my first degree. Getting a 2:2 reduced my ability to choose. It restricted my options for further HE study, for example. I would love to complete a PhD like my Aunt did, or a Masters like my Father did. Getting at least a 2:1 in this degree will vastly increase the likelihood that I can progress to further HE study in the future.

My career choices to date have been opportunistic, some would say lucky, with a lack of ambition or goals to back them up. Although I had a goal in completing my first degree, it wasn’t well thought out or realistic. This lack of direction has resulted in boredom setting in after a few years in a role and has stymied my work rate and progression in general. I have realistic aims and objectives that this degree supports.

My studies in Computing offer an opportunity to get back into studying Psychology. There is a significant overlap between the two subjects. Theories of memory, the functioning of neurons and Evolutionary Psychology all interested me during my first degree. AI, Machine Learning and Genetic Algorithms are all related to these topics, parts of Computing and IT, and I find them fascinating.

Short of winning the lottery, my chances of owning my own home and living well in retirement are currently minimal at best. When my children study in HE, or want to buy their own homes, I am unlikely to be able to assist them financially. My choice to work in FE for ten years, coupled with my change of career, has left my finances a mess. Careers in Computing and IT pay well if you have qualifications and experience.

Computing and IT is a really interesting subject area. To be able to, using a few well chosen words in a text editor, control a device and make it do something amazing, is wonderful. Technology has the potential to utterly reshape our future. To understand and be a part of that process will be incredible. To contribute code that changes the world for the better would be beyond my wildest dreams.

Code is the future. It will gradually take over our lives, becoming integral to everything we do. I have three children, growing up in uncertain times. Any understanding of computing that they gain will increase the likelihood that they have a bright future ahead of them. This degree gives me a chance to help them get ahead in the world in a way that no other subject area does.

So, there it is. There’s my list. I may add to it in future, but for now the above offers me something to come back to if things become a struggle. I had no such list during my previous studies, or within my previous career. Hopefully I will come back to this list in five or ten years to find that it has acted as a precursor to achieving everything I could possibly dream of. We shall see.

What does a Utopia for Realists mean for the Lib Dems?

The central argument of Rutger Bregman in Utopia for Realists, beyond the solutions he suggests to various worldwide problems, is that left-leaning political thought is stale. Too often we focus in politics on what is deemed possible, at the expense of what is desirable.

I’ve heard it said repeatedly that, in decades gone by, policies dreamed up by the Liberals, derided by those in power, deemed whimsical by many, have gone on to become mainstream. In many ways, the purpose of the Liberals seems to have been to think big.

I look at the Party now, and that kind of thinking seems to have gone the way of the Dodo. There are a variety of fringe groups within the Party that talk the talk, but all too often more experienced politicians counsel that we need power as a precursor to enacting principles.

The problem with this idea is two-fold. Firstly, the true power in this country at the moment is not wielded by those in Parliament. It is wielded by people like Farage, who have taken fringe ideas and made them mainstream. The second is that we don’t need more bland centrism.

Just as the class war of Labour has had its day, so has traditional Orange Book and Social Liberalism. People know that small government leaves us at the whim of a rampant market and they also know that big government tends to paternalism, meddling and inefficiency.

Sitting in the middle of these two extremes and flip-flopping between centre left and centre right won’t be sufficient to give people hope. What we need to do is fight for the type of government we want, which means a radical change of direction in terms of policy and expectations.

A liberal government is about enabling freedom, and there’s a lot in Utopia for Realists that fits those aims. A universal basic income gives everyone freedom from poverty, whilst removing huge swathes of red tape and paternalistic meddling in the lives of those seeking work.

A fifteen hour work week, coupled with redistributive taxes on consumption, wealth and land value, gives people freedom to educate themselves, to do the things they enjoy, to escape from the conformity of the gig economy and the rat race, and to keep working despite the rise of AI.

Completely opening our borders not only gives people a method to escape from absolute poverty, but also lets them escape from oppression and persecution. Coupled with international agreements to end tax avoidance and evasion, it means every country can finally benefit from progress.

The above ideas have something in common. At the moment they are seen as bonkers. They are deemed too expensive and too unpopular, even irrational. Yet a Trump presidency and leaving the EU would have seemed just as outlandish at the start of the last decade.

Power is always a means to an end. As a party, we have become so focused on the power we’ve lost, not to mention the power we believe we need, that we’re giving up on the very ends we desire. We need to remember that change is what really matters, not any specific form of power.

Will xCloud kill Stadia?

I’ve seen a couple of tech Youtubers talking about the release of xCloud as being the death knell for Stadia, and you can sort of understand why. Game Pass Ultimate is a hell of a deal. It covers you on an Xbox, gives you perks for PC, and has hundreds of games. That said, I’m not entirely convinced.

As I understand it, there are basically four game streaming services that are worthy of note, if you include xCloud. PS Now makes sense if you own a PlayStation. You get access to a plethora of games and you can stream them. Game Pass / xCloud makes sense if you have an Xbox, for the same reason.

That leaves GeForce Now and Stadia. If you have a gaming PC, it’s a fair bet you have a Steam account, which is GeForce Now’s selling point. You can essentially take your Steam library into the cloud. So, if we quietly ignore the Switch, we’ve basically covered the main gaming platforms haven’t we?

The thing is, all three of these options rely on expensive additional hardware. Even the lowly Switch is around £300. It’s a safe bet, though, that many of the people that don’t own a console or gaming PC do own a TV, a smartphone, a tablet, some kind of streaming stick and/or a basic laptop.

With some combination of these, Stadia offers a chance to enjoy modern games at a reasonable monthly cost to those who don’t have the time or money to buy more hardware, though they can for up to £89. The selection of games is small at the moment, mind you, but it’s growing fast.

This puts Stadia, ahead of its time, into an interesting niche in the gaming market. Rather than competing with xCloud, PS Now or GeForce Now, all of which are effectively tied to a hardware platform, it is doing something different. It’s offering gaming as a service, rather than as a platform.

Of course, Microsoft seems to be fully aware of this as a direction of travel, which explains why Game Pass has gone cross platform. Also, GeForce Now and PS Now both allow you to play on phones etc. That said, though, all three services are inextricably linked to their originating platform.

Stadia, apart from perhaps being linked to Android and Google, doesn’t really have quite the same baggage. We’re used to our Android / iOS devices supporting software from competing OS or hardware providers, but you wouldn’t expect to see the same occur on an Xbox, PlayStation or even a PC.

This puts Stadia in a powerful position, in my view. I do think all three platform services will be coming for it, but I think it has a reasonable head start as long as the games keep coming. That said, there is another consideration beyond platform. That consideration is cloud infrastructure.

In that space Amazon is the biggest player, with Google second, and Microsoft snapping at its heels. Any game streaming service needs powerful cloud infrastructure behind it, and Google and Microsoft already have that going for them. Sony and Nvidia can’t really compete in that arena.

What does this mean long term then? Firstly, I think Microsoft and Google may well have the strongest cloud gaming services in the next few years. Of course, it’s possible Stadia could be another Google+, but then xCloud could also be another Mixer. I suspect neither company will risk that.

Secondly, I think we should keep a close eye on Apple and Amazon. Apple has the ecosystem, especially now it’s going all Arm, to build it’s own gaming subscription service, even without offering streaming. Amazon, meanwhile, has huge cloud resources and wants to shake it’s boring image.

If the video streaming market is anything to go by, it will take a while before people get subscription fatigue. Already the UK has at least six competing services in Netflix, Prime Video, Now TV, Disney+, Apple TV+ and Britbox. I believe the US has many more such services that manage to compete.

With the above in mind, I don’t think Google Stadia will being going anywhere soon. In fact, I fully expect at least another two services to be successful in the marketplace going forwards, probably provided by Apple and/or Amazon, though we probably shouldn’t count out Epic Games…

Should we ditch human- focused AI?

As it stands, much of AI seems to be focused on developing human like skills. There’s valid reasons for this, not least the potential to support those with specific needs through the provision of various tools. In our quest to develop an AI that can match a human being, perhaps out obsession with building up from the senses is making that harder.

At its core, evolution is about the survival of genes. Those genes that make it easier for an organism to survive to reproduce within its environment are those which are more likely to make it to the next generation. Often such genes relate to inputs and outputs. If the organism is able to perceive its environment, it can better react to it. If it has better reactions, its perceptions or more useful.

What does this have to do with AI though? With AI, we are defining the phenotype, what the genes create in essence, prior to defining the building blocks. We use a simulated environment, and our understanding of what we think the human brain does, to work backwards to create the genes, or code, that cause each outcome. This is problematic because we don’t know enough about what the brain does and why.

Perhaps the solution here is to stop worrying about creating organisms? What if we tried to recreate the things that we, on the surface, appear to understand a little better? If we create programs that could replicate, that contain in essence the hallmarks of single cell DNA based organisms and that are surrounded by an environment that can be considered “earth-like”, perhaps we can then use evolution itself to develop a form of AI.

Such a process would no doubt require an artificial ever changing environment, which would take quite a bit of computing power in itself. We would also probably need to create quite a few “worlds” that we seed with our code-based DNA. What we get would no doubt be something that doesn’t resemble the human brain, but what I hope is that we would get something that matched it for power and self awareness.

I’m sure better minds than mine have thought of this however.

A potential machine learning implementation resulting from Covid-19

It occurred to me this morning that Covid-19 is producing a hell of a lot of data on the spread of viruses in the 21st century. Although the data-set is weakened by the lack of testing in some countries, we can probably improve the data using the death rate and antibody testing.

What’s the use of all this data though? Well, if we couple this with data on the movements of individuals, perhaps we can train a machine learning algorithm to predict the likely spread of future viruses. We might also be able, given the variations in the behaviour of different nations, to predict the effect of different measures on the transmission of a future illness.

Of course it will take a virology expert and someone that knows a hell of a lot more about machine learning than I do (currently) to make it happen. It seems to me to be something important that should be considered, even if it means acquiring anonymised movement data that would normally be regarded as personal data.

An improved script to show the cumulative infection rate

The script I created yesterday was a useful demonstration of reproduction numbers, but wasn’t an entirely accurate depiction of what would happen. Specifically, it only showed the number infected during each generation of infection, which artificially improves the effect of halving the reproduction number.

I’ve therefore added a little bit to the script to more accurately reflect what would happen:


<?php

define("REPRODUCTION_NUMBER", 2.5);
define("HALVED_REPRODUCTION_NUMBER", 1.25);
define("GENERATION_PERIOD", 5);
define("INITIAL_INFECTED", 1);
define("INITIAL_INFECTED_KENT", 79);
define("KENT_POPULATION", 1568600 + 277855);
define("UK_POPULATION", 66436000);

$days = 0;
$infected = INITIAL_INFECTED_KENT;
$cumulative_infected = INITIAL_INFECTED_KENT;
echo "Kent and Medway Population = " . KENT_POPULATION . "

";
echo "Number infected = $infected, days = $days

";

while($cumulative_infected<=KENT_POPULATION) {
$infected = $infected * REPRODUCTION_NUMBER;
$cumulative_infected = $cumulative_infected + $infected;
$days = $days + GENERATION_PERIOD;
echo "Number infected = $infected, days = $days, Cumulative Number infected = $cumulative_infected

";
}

echo "If we halve the reproduction number

";
$days = 0;
$infected = INITIAL_INFECTED_KENT;
$cumulative_infected = INITIAL_INFECTED_KENT;
echo "Kent and Medway Population = " . KENT_POPULATION . "

";
echo "Number infected = $infected, days = $days

";

while($cumulative_infected<=KENT_POPULATION) {
$infected = $infected * HALVED_REPRODUCTION_NUMBER;
$cumulative_infected = $cumulative_infected + $infected;
$days = $days + GENERATION_PERIOD;
echo "Number infected = $infected, days = $days, Cumulative Number infected = $cumulative_infected

";
}

$days = 0;
$infected = INITIAL_INFECTED;
$cumulative_infected = INITIAL_INFECTED;
echo "UK Population = " . UK_POPULATION . "

";
echo "Number infected = $infected, days = $days

";

while($cumulative_infected<=UK_POPULATION) {
$infected = $infected * REPRODUCTION_NUMBER;
$cumulative_infected = $cumulative_infected + $infected;
$days = $days + GENERATION_PERIOD;
echo "Number infected = $infected, days = $days, Cumulative Number infected = $cumulative_infected

";
}

echo "If we halve the reproduction number

";
$days = 0;
$infected = INITIAL_INFECTED;
$cumulative_infected = INITIAL_INFECTED;
echo "UK Population = " . UK_POPULATION . "

";
echo "Number infected = $infected, days = $days

";

while($cumulative_infected<=UK_POPULATION) {
$infected = $infected * HALVED_REPRODUCTION_NUMBER;
$cumulative_infected = $cumulative_infected + $infected;
$days = $days + GENERATION_PERIOD;
echo "Number infected = $infected, days = $days, Cumulative Number infected = $cumulative_infected

";
}

The output changes to the following:

Kent and Medway Population = 1846455

Number infected = 79, days = 0

Number infected = 197.5, days = 5, Cumulative Number infected = 276.5

Number infected = 493.75, days = 10, Cumulative Number infected = 770.25

Number infected = 1234.375, days = 15, Cumulative Number infected = 2004.625

Number infected = 3085.9375, days = 20, Cumulative Number infected = 5090.5625

Number infected = 7714.84375, days = 25, Cumulative Number infected = 12805.40625

Number infected = 19287.109375, days = 30, Cumulative Number infected = 32092.515625

Number infected = 48217.7734375, days = 35, Cumulative Number infected = 80310.2890625

Number infected = 120544.43359375, days = 40, Cumulative Number infected = 200854.72265625

Number infected = 301361.08398438, days = 45, Cumulative Number infected = 502215.80664062

Number infected = 753402.70996094, days = 50, Cumulative Number infected = 1255618.5166016

Number infected = 1883506.7749023, days = 55, Cumulative Number infected = 3139125.2915039

If we halve the reproduction number

Kent and Medway Population = 1846455

Number infected = 79, days = 0

Number infected = 98.75, days = 5, Cumulative Number infected = 177.75

Number infected = 123.4375, days = 10, Cumulative Number infected = 301.1875

Number infected = 154.296875, days = 15, Cumulative Number infected = 455.484375

Number infected = 192.87109375, days = 20, Cumulative Number infected = 648.35546875

Number infected = 241.0888671875, days = 25, Cumulative Number infected = 889.4443359375

Number infected = 301.36108398438, days = 30, Cumulative Number infected = 1190.8054199219

Number infected = 376.70135498047, days = 35, Cumulative Number infected = 1567.5067749023

Number infected = 470.87669372559, days = 40, Cumulative Number infected = 2038.3834686279

Number infected = 588.59586715698, days = 45, Cumulative Number infected = 2626.9793357849

Number infected = 735.74483394623, days = 50, Cumulative Number infected = 3362.7241697311

Number infected = 919.68104243279, days = 55, Cumulative Number infected = 4282.4052121639

Number infected = 1149.601303041, days = 60, Cumulative Number infected = 5432.0065152049

Number infected = 1437.0016288012, days = 65, Cumulative Number infected = 6869.0081440061

Number infected = 1796.2520360015, days = 70, Cumulative Number infected = 8665.2601800077

Number infected = 2245.3150450019, days = 75, Cumulative Number infected = 10910.57522501

Number infected = 2806.6438062524, days = 80, Cumulative Number infected = 13717.219031262

Number infected = 3508.3047578155, days = 85, Cumulative Number infected = 17225.523789077

Number infected = 4385.3809472694, days = 90, Cumulative Number infected = 21610.904736347

Number infected = 5481.7261840867, days = 95, Cumulative Number infected = 27092.630920434

Number infected = 6852.1577301084, days = 100, Cumulative Number infected = 33944.788650542

Number infected = 8565.1971626355, days = 105, Cumulative Number infected = 42509.985813177

Number infected = 10706.496453294, days = 110, Cumulative Number infected = 53216.482266472

Number infected = 13383.120566618, days = 115, Cumulative Number infected = 66599.60283309

Number infected = 16728.900708272, days = 120, Cumulative Number infected = 83328.503541362

Number infected = 20911.125885341, days = 125, Cumulative Number infected = 104239.6294267

Number infected = 26138.907356676, days = 130, Cumulative Number infected = 130378.53678338

Number infected = 32673.634195845, days = 135, Cumulative Number infected = 163052.17097922

Number infected = 40842.042744806, days = 140, Cumulative Number infected = 203894.21372403

Number infected = 51052.553431007, days = 145, Cumulative Number infected = 254946.76715504

Number infected = 63815.691788759, days = 150, Cumulative Number infected = 318762.45894379

Number infected = 79769.614735949, days = 155, Cumulative Number infected = 398532.07367974

Number infected = 99712.018419936, days = 160, Cumulative Number infected = 498244.09209968

Number infected = 124640.02302492, days = 165, Cumulative Number infected = 622884.1151246

Number infected = 155800.02878115, days = 170, Cumulative Number infected = 778684.14390575

Number infected = 194750.03597644, days = 175, Cumulative Number infected = 973434.17988219

Number infected = 243437.54497055, days = 180, Cumulative Number infected = 1216871.7248527

Number infected = 304296.93121318, days = 185, Cumulative Number infected = 1521168.6560659

Number infected = 380371.16401648, days = 190, Cumulative Number infected = 1901539.8200824

UK Population = 66436000

Number infected = 1, days = 0

Number infected = 2.5, days = 5, Cumulative Number infected = 3.5

Number infected = 6.25, days = 10, Cumulative Number infected = 9.75

Number infected = 15.625, days = 15, Cumulative Number infected = 25.375

Number infected = 39.0625, days = 20, Cumulative Number infected = 64.4375

Number infected = 97.65625, days = 25, Cumulative Number infected = 162.09375

Number infected = 244.140625, days = 30, Cumulative Number infected = 406.234375

Number infected = 610.3515625, days = 35, Cumulative Number infected = 1016.5859375

Number infected = 1525.87890625, days = 40, Cumulative Number infected = 2542.46484375

Number infected = 3814.697265625, days = 45, Cumulative Number infected = 6357.162109375

Number infected = 9536.7431640625, days = 50, Cumulative Number infected = 15893.905273438

Number infected = 23841.857910156, days = 55, Cumulative Number infected = 39735.763183594

Number infected = 59604.644775391, days = 60, Cumulative Number infected = 99340.407958984

Number infected = 149011.61193848, days = 65, Cumulative Number infected = 248352.01989746

Number infected = 372529.02984619, days = 70, Cumulative Number infected = 620881.04974365

Number infected = 931322.57461548, days = 75, Cumulative Number infected = 1552203.6243591

Number infected = 2328306.4365387, days = 80, Cumulative Number infected = 3880510.0608978

Number infected = 5820766.0913467, days = 85, Cumulative Number infected = 9701276.1522446

Number infected = 14551915.228367, days = 90, Cumulative Number infected = 24253191.380611

Number infected = 36379788.070917, days = 95, Cumulative Number infected = 60632979.451529

Number infected = 90949470.177293, days = 100, Cumulative Number infected = 151582449.62882

If we halve the reproduction number

UK Population = 66436000

Number infected = 1, days = 0

Number infected = 1.25, days = 5, Cumulative Number infected = 2.25

Number infected = 1.5625, days = 10, Cumulative Number infected = 3.8125

Number infected = 1.953125, days = 15, Cumulative Number infected = 5.765625

Number infected = 2.44140625, days = 20, Cumulative Number infected = 8.20703125

Number infected = 3.0517578125, days = 25, Cumulative Number infected = 11.2587890625

Number infected = 3.814697265625, days = 30, Cumulative Number infected = 15.073486328125

Number infected = 4.7683715820312, days = 35, Cumulative Number infected = 19.841857910156

Number infected = 5.9604644775391, days = 40, Cumulative Number infected = 25.802322387695

Number infected = 7.4505805969238, days = 45, Cumulative Number infected = 33.252902984619

Number infected = 9.3132257461548, days = 50, Cumulative Number infected = 42.566128730774

Number infected = 11.641532182693, days = 55, Cumulative Number infected = 54.207660913467

Number infected = 14.551915228367, days = 60, Cumulative Number infected = 68.759576141834

Number infected = 18.189894035459, days = 65, Cumulative Number infected = 86.949470177293

Number infected = 22.737367544323, days = 70, Cumulative Number infected = 109.68683772162

Number infected = 28.421709430404, days = 75, Cumulative Number infected = 138.10854715202

Number infected = 35.527136788005, days = 80, Cumulative Number infected = 173.63568394003

Number infected = 44.408920985006, days = 85, Cumulative Number infected = 218.04460492503

Number infected = 55.511151231258, days = 90, Cumulative Number infected = 273.55575615629

Number infected = 69.388939039072, days = 95, Cumulative Number infected = 342.94469519536

Number infected = 86.73617379884, days = 100, Cumulative Number infected = 429.6808689942

Number infected = 108.42021724855, days = 105, Cumulative Number infected = 538.10108624275

Number infected = 135.52527156069, days = 110, Cumulative Number infected = 673.62635780344

Number infected = 169.40658945086, days = 115, Cumulative Number infected = 843.0329472543

Number infected = 211.75823681358, days = 120, Cumulative Number infected = 1054.7911840679

Number infected = 264.69779601697, days = 125, Cumulative Number infected = 1319.4889800848

Number infected = 330.87224502121, days = 130, Cumulative Number infected = 1650.3612251061

Number infected = 413.59030627651, days = 135, Cumulative Number infected = 2063.9515313826

Number infected = 516.98788284564, days = 140, Cumulative Number infected = 2580.9394142282

Number infected = 646.23485355705, days = 145, Cumulative Number infected = 3227.1742677853

Number infected = 807.79356694632, days = 150, Cumulative Number infected = 4034.9678347316

Number infected = 1009.7419586829, days = 155, Cumulative Number infected = 5044.7097934145

Number infected = 1262.1774483536, days = 160, Cumulative Number infected = 6306.8872417681

Number infected = 1577.721810442, days = 165, Cumulative Number infected = 7884.6090522101

Number infected = 1972.1522630525, days = 170, Cumulative Number infected = 9856.7613152626

Number infected = 2465.1903288157, days = 175, Cumulative Number infected = 12321.951644078

Number infected = 3081.4879110196, days = 180, Cumulative Number infected = 15403.439555098

Number infected = 3851.8598887745, days = 185, Cumulative Number infected = 19255.299443872

Number infected = 4814.8248609681, days = 190, Cumulative Number infected = 24070.12430484

Number infected = 6018.5310762101, days = 195, Cumulative Number infected = 30088.655381051

Number infected = 7523.1638452626, days = 200, Cumulative Number infected = 37611.819226313

Number infected = 9403.9548065783, days = 205, Cumulative Number infected = 47015.774032891

Number infected = 11754.943508223, days = 210, Cumulative Number infected = 58770.717541114

Number infected = 14693.679385279, days = 215, Cumulative Number infected = 73464.396926393

Number infected = 18367.099231598, days = 220, Cumulative Number infected = 91831.496157991

Number infected = 22958.874039498, days = 225, Cumulative Number infected = 114790.37019749

Number infected = 28698.592549372, days = 230, Cumulative Number infected = 143488.96274686

Number infected = 35873.240686715, days = 235, Cumulative Number infected = 179362.20343358

Number infected = 44841.550858394, days = 240, Cumulative Number infected = 224203.75429197

Number infected = 56051.938572993, days = 245, Cumulative Number infected = 280255.69286496

Number infected = 70064.923216241, days = 250, Cumulative Number infected = 350320.6160812

Number infected = 87581.154020301, days = 255, Cumulative Number infected = 437901.77010151

Number infected = 109476.44252538, days = 260, Cumulative Number infected = 547378.21262688

Number infected = 136845.55315672, days = 265, Cumulative Number infected = 684223.7657836

Number infected = 171056.9414459, days = 270, Cumulative Number infected = 855280.7072295

Number infected = 213821.17680738, days = 275, Cumulative Number infected = 1069101.8840369

Number infected = 267276.47100922, days = 280, Cumulative Number infected = 1336378.3550461

Number infected = 334095.58876152, days = 285, Cumulative Number infected = 1670473.9438076

Number infected = 417619.48595191, days = 290, Cumulative Number infected = 2088093.4297595

Number infected = 522024.35743988, days = 295, Cumulative Number infected = 2610117.7871994

Number infected = 652530.44679985, days = 300, Cumulative Number infected = 3262648.2339993

Number infected = 815663.05849982, days = 305, Cumulative Number infected = 4078311.2924991

Number infected = 1019578.8231248, days = 310, Cumulative Number infected = 5097890.1156238

Number infected = 1274473.528906, days = 315, Cumulative Number infected = 6372363.6445298

Number infected = 1593091.9111325, days = 320, Cumulative Number infected = 7965455.5556623

Number infected = 1991364.8889156, days = 325, Cumulative Number infected = 9956820.4445778

Number infected = 2489206.1111445, days = 330, Cumulative Number infected = 12446026.555722

Number infected = 3111507.6389306, days = 335, Cumulative Number infected = 15557534.194653

Number infected = 3889384.5486632, days = 340, Cumulative Number infected = 19446918.743316

Number infected = 4861730.685829, days = 345, Cumulative Number infected = 24308649.429145

Number infected = 6077163.3572863, days = 350, Cumulative Number infected = 30385812.786431

Number infected = 7596454.1966078, days = 355, Cumulative Number infected = 37982266.983039

Number infected = 9495567.7457598, days = 360, Cumulative Number infected = 47477834.728799

Number infected = 11869459.6822, days = 365, Cumulative Number infected = 59347294.410999

Number infected = 14836824.60275, days = 370, Cumulative Number infected = 74184119.013748

It’s worth noting that this is far from an accurate reflection of the complex modelling experts will have used when studying covid-19. I’m also fully aware that using a function would be a far more efficient way to create this code. I may do that if I get a spare couple of minutes later today.

 

A simple script involving reproduction numbers

I saw an article today about the likely rate of spread of Covid-19 and it got me thinking. So I whipped up a simple PHP script to look at the spread in Kent based on current figures, and also the UK spread based on a single infection. I used 2.5 as the reproduction number and 5 days as the period between generations of infection (I can’t remember the technical term).

The script showed it would take 55 days to infect everyone in Kent, and 100 days to infect everyone in the UK, if we did nothing. If the measures we’ve taken allow us to have the reproduction number, it would take 230 days to infect everyone in Kent and 405 days to infect everyone in the UK. This is a very simple bit of code, based on simple assumptions, but it does demonstrate why we’re social distancing.

So, the script is:


<?php

define("REPRODUCTION_NUMBER", 2.5);
define("HALVED_REPRODUCTION_NUMBER", 1.25);
define("GENERATION_PERIOD", 5);
define("INITIAL_INFECTED", 1);
define("INITIAL_INFECTED_KENT", 79);
define("KENT_POPULATION", 1568600 + 277855);
define("UK_POPULATION", 66436000);

$days = 0;
$infected = INITIAL_INFECTED_KENT;
echo "Kent and Medway Population = " . KENT_POPULATION . "

";
echo "Number infected = $infected, days = $days

";

while($infected<=KENT_POPULATION) {
$infected = $infected * REPRODUCTION_NUMBER;
$days = $days + GENERATION_PERIOD;
echo "Number infected = $infected, days = $days

";
}

echo "If we halve the reproduction number

";
$days = 0;
$infected = INITIAL_INFECTED_KENT;
echo "Kent and Medway Population = " . KENT_POPULATION . "

";
echo "Number infected = $infected, days = $days

";

while($infected<=KENT_POPULATION) {
$infected = $infected * HALVED_REPRODUCTION_NUMBER;
$days = $days + GENERATION_PERIOD;
echo "Number infected = $infected, days = $days

";
}

$days = 0;
$infected = INITIAL_INFECTED;
echo "UK Population = " . UK_POPULATION . "

";
echo "Number infected = $infected, days = $days

";

while($infected<=UK_POPULATION) {
$infected = $infected * REPRODUCTION_NUMBER;
$days = $days + GENERATION_PERIOD;
echo "Number infected = $infected, days = $days

";
}

echo "If we halve the reproduction number

";
$days = 0;
$infected = INITIAL_INFECTED;
echo "UK Population = " . UK_POPULATION . "

";
echo "Number infected = $infected, days = $days

";

while($infected<=UK_POPULATION) {
$infected = $infected * HALVED_REPRODUCTION_NUMBER;
$days = $days + GENERATION_PERIOD;
echo "Number infected = $infected, days = $days

";
}

The output of the script is also fairly simple, and is:

Kent and Medway Population = 1846455

Number infected = 79, days = 0

Number infected = 197.5, days = 5

Number infected = 493.75, days = 10

Number infected = 1234.375, days = 15

Number infected = 3085.9375, days = 20

Number infected = 7714.84375, days = 25

Number infected = 19287.109375, days = 30

Number infected = 48217.7734375, days = 35

Number infected = 120544.43359375, days = 40

Number infected = 301361.08398438, days = 45

Number infected = 753402.70996094, days = 50

Number infected = 1883506.7749023, days = 55

If we halve the reproduction number

Kent and Medway Population = 1846455

Number infected = 79, days = 0

Number infected = 98.75, days = 5

Number infected = 123.4375, days = 10

Number infected = 154.296875, days = 15

Number infected = 192.87109375, days = 20

Number infected = 241.0888671875, days = 25

Number infected = 301.36108398438, days = 30

Number infected = 376.70135498047, days = 35

Number infected = 470.87669372559, days = 40

Number infected = 588.59586715698, days = 45

Number infected = 735.74483394623, days = 50

Number infected = 919.68104243279, days = 55

Number infected = 1149.601303041, days = 60

Number infected = 1437.0016288012, days = 65

Number infected = 1796.2520360015, days = 70

Number infected = 2245.3150450019, days = 75

Number infected = 2806.6438062524, days = 80

Number infected = 3508.3047578155, days = 85

Number infected = 4385.3809472694, days = 90

Number infected = 5481.7261840867, days = 95

Number infected = 6852.1577301084, days = 100

Number infected = 8565.1971626355, days = 105

Number infected = 10706.496453294, days = 110

Number infected = 13383.120566618, days = 115

Number infected = 16728.900708272, days = 120

Number infected = 20911.125885341, days = 125

Number infected = 26138.907356676, days = 130

Number infected = 32673.634195845, days = 135

Number infected = 40842.042744806, days = 140

Number infected = 51052.553431007, days = 145

Number infected = 63815.691788759, days = 150

Number infected = 79769.614735949, days = 155

Number infected = 99712.018419936, days = 160

Number infected = 124640.02302492, days = 165

Number infected = 155800.02878115, days = 170

Number infected = 194750.03597644, days = 175

Number infected = 243437.54497055, days = 180

Number infected = 304296.93121318, days = 185

Number infected = 380371.16401648, days = 190

Number infected = 475463.9550206, days = 195

Number infected = 594329.94377575, days = 200

Number infected = 742912.42971969, days = 205

Number infected = 928640.53714961, days = 210

Number infected = 1160800.671437, days = 215

Number infected = 1451000.8392963, days = 220

Number infected = 1813751.0491203, days = 225

Number infected = 2267188.8114004, days = 230

UK Population = 66436000

Number infected = 1, days = 0

Number infected = 2.5, days = 5

Number infected = 6.25, days = 10

Number infected = 15.625, days = 15

Number infected = 39.0625, days = 20

Number infected = 97.65625, days = 25

Number infected = 244.140625, days = 30

Number infected = 610.3515625, days = 35

Number infected = 1525.87890625, days = 40

Number infected = 3814.697265625, days = 45

Number infected = 9536.7431640625, days = 50

Number infected = 23841.857910156, days = 55

Number infected = 59604.644775391, days = 60

Number infected = 149011.61193848, days = 65

Number infected = 372529.02984619, days = 70

Number infected = 931322.57461548, days = 75

Number infected = 2328306.4365387, days = 80

Number infected = 5820766.0913467, days = 85

Number infected = 14551915.228367, days = 90

Number infected = 36379788.070917, days = 95

Number infected = 90949470.177293, days = 100

If we halve the reproduction number

UK Population = 66436000

Number infected = 1, days = 0

Number infected = 1.25, days = 5

Number infected = 1.5625, days = 10

Number infected = 1.953125, days = 15

Number infected = 2.44140625, days = 20

Number infected = 3.0517578125, days = 25

Number infected = 3.814697265625, days = 30

Number infected = 4.7683715820312, days = 35

Number infected = 5.9604644775391, days = 40

Number infected = 7.4505805969238, days = 45

Number infected = 9.3132257461548, days = 50

Number infected = 11.641532182693, days = 55

Number infected = 14.551915228367, days = 60

Number infected = 18.189894035459, days = 65

Number infected = 22.737367544323, days = 70

Number infected = 28.421709430404, days = 75

Number infected = 35.527136788005, days = 80

Number infected = 44.408920985006, days = 85

Number infected = 55.511151231258, days = 90

Number infected = 69.388939039072, days = 95

Number infected = 86.73617379884, days = 100

Number infected = 108.42021724855, days = 105

Number infected = 135.52527156069, days = 110

Number infected = 169.40658945086, days = 115

Number infected = 211.75823681358, days = 120

Number infected = 264.69779601697, days = 125

Number infected = 330.87224502121, days = 130

Number infected = 413.59030627651, days = 135

Number infected = 516.98788284564, days = 140

Number infected = 646.23485355705, days = 145

Number infected = 807.79356694632, days = 150

Number infected = 1009.7419586829, days = 155

Number infected = 1262.1774483536, days = 160

Number infected = 1577.721810442, days = 165

Number infected = 1972.1522630525, days = 170

Number infected = 2465.1903288157, days = 175

Number infected = 3081.4879110196, days = 180

Number infected = 3851.8598887745, days = 185

Number infected = 4814.8248609681, days = 190

Number infected = 6018.5310762101, days = 195

Number infected = 7523.1638452626, days = 200

Number infected = 9403.9548065783, days = 205

Number infected = 11754.943508223, days = 210

Number infected = 14693.679385279, days = 215

Number infected = 18367.099231598, days = 220

Number infected = 22958.874039498, days = 225

Number infected = 28698.592549372, days = 230

Number infected = 35873.240686715, days = 235

Number infected = 44841.550858394, days = 240

Number infected = 56051.938572993, days = 245

Number infected = 70064.923216241, days = 250

Number infected = 87581.154020301, days = 255

Number infected = 109476.44252538, days = 260

Number infected = 136845.55315672, days = 265

Number infected = 171056.9414459, days = 270

Number infected = 213821.17680738, days = 275

Number infected = 267276.47100922, days = 280

Number infected = 334095.58876152, days = 285

Number infected = 417619.48595191, days = 290

Number infected = 522024.35743988, days = 295

Number infected = 652530.44679985, days = 300

Number infected = 815663.05849982, days = 305

Number infected = 1019578.8231248, days = 310

Number infected = 1274473.528906, days = 315

Number infected = 1593091.9111325, days = 320

Number infected = 1991364.8889156, days = 325

Number infected = 2489206.1111445, days = 330

Number infected = 3111507.6389306, days = 335

Number infected = 3889384.5486632, days = 340

Number infected = 4861730.685829, days = 345

Number infected = 6077163.3572863, days = 350

Number infected = 7596454.1966078, days = 355

Number infected = 9495567.7457598, days = 360

Number infected = 11869459.6822, days = 365

Number infected = 14836824.60275, days = 370

Number infected = 18546030.753437, days = 375

Number infected = 23182538.441796, days = 380

Number infected = 28978173.052245, days = 385

Number infected = 36222716.315307, days = 390

Number infected = 45278395.394134, days = 395

Number infected = 56597994.242667, days = 400

Number infected = 70747492.803334, days = 405

How to keep the kids learning during school closures?

So, the kids are coming home for the foreseeable future. Schools are going to send work home, and we all get to be teachers for the next few months. That said, not all schools can do this, and they won’t necessarily be able to cover all topics.

With all this in mind, it seems like a good idea to produce a list of resources that may be useful over the coming months. I’ll try to update this list as I find more sources. Initially I’ll start with a list of sites I already know of, including some that my kids’ schools use.

https://www.bbc.co.uk/bitesize – UK based – Owned by the BBC.

https://www.mymaths.co.uk/ – UK based – Owned by the Oxford University Press

https://www.rosettastone.co.uk/ – USA based – Commercial online learning provider

https://www.kerboodle.com/users/login – UK based – Owned by the Oxford University Press

https://www.doddlelearn.co.uk/ – UK based – Commercial online learning provider

https://www.vocabexpress.com/co/ – UK based – Owned by Collins

https://www.futurelearn.com/ – UK based – Owned by the Open University

https://www.khanacademy.org/ – USA Based – Non-profit online learning provider

https://online.stanford.edu/courses – USA based – Owned by Stanford University

https://ocw.mit.edu/index.htm – USA based – Owned by Massachusetts Institute of Technology

https://www.edx.org/ – USA based – Owned by Massachusetts Institute of Technology and Harvard University

https://www.codecademy.com/ – USA based – Commercial online learning provider

https://www.p2pu.org/ – USA based – Non-profit online learning provider

https://alison.com/ – Ireland based – Commercial online learning provider

https://www.udacity.com/ – USA based – Commercial online learning provider

https://www.lynda.com/ – USA based – Owned by LinkedIn

https://www.udemy.com/ – USA based – Commercial online learning provider

https://www.thegreatcourses.com/ – USA based – Commercial online learning provider

https://www.coursera.org/ – USA based – Commercial online learning provider

https://developers.google.com/training/ – USA based – Owned by Google

I’ll try to add to this list as times goes on. That said, there are some excellent sites for those seeking access to online learning. One that I’ve used in the past, for example, is https://www.mooc-list.com/. If I find any others, I’ll add them to this post.

https://www.frugalmum.co.uk/free-teaching-resources/ – A resource I found shared on Facebook

Last updated: 20/03/2020

 

How to approach Covid-19?

I find myself in a bizarre position watching the spread of Covid-19. Like many, I find myself worrying about family members. Two of my kids are asthmatic, my Mum has emphysema, I had five pneumothoraxes when I was younger and lung cancer is common in my family. We don’t tend to do well where lungs are concerned.

Leaving that aside, though, I find myself incredibly curious. When I went into my first degree, it was because I was going to be Cracker. I was going to solve crime and save lives with my knowledge of criminal psychology (while smoking like a chimney and drinking whisky by the gallon).

By the time I finished my degree I had discovered evolutionary psychology. I still wanted to be a forensic psychologist, which didn’t happen, but I’d also fallen in love with a combination of statistics, genetics and evolutionary theory. I was especially enamoured of the Red Queen hypothesis, an evolutionary arms race with parasites/illnesses.

Now I’m doing a degree in computing and IT and I’ve rediscovered that love, while completing modules discussing maths and robotics/AI. Alongside that, of course, we’ve had the appearance of Covid-19. This has led me to shift my focus somewhat, in the past week or so, and begin to wonder about how contagions work.

The problem, though, is I’m drowning in expert analysis but not in data. I want to remain calm about Covid-19, but the dearth of UK data and modelling to study is a barrier to that. Obviously there are plenty of people saying the UK strategy is wrong, and I tend to agree, but without the data I’m just following the herd (see what I did there).

As I can’t get a decent look at the UK data and modelling, I’m trying to learn more about the subject generally. I’m reading The Rules of Contagion by Adam Kucharski. I’m taking advantage of access to journals too. Essentially I’m trying to stick to expert information sources, but doing my own research rather than just waiting for information.

Of course none of this makes decision making any easier. Do I “stock up”? Do I take the kids out of school? Should I be seeking to work from home? These questions are all stuck at the back of my mind, elevating my stress levels. But reading, learning and using the right sources are all helping. I therefore recommend that everyone do the same.