mscroggs.co.uk
mscroggs.co.uk

subscribe

Blog

 2017-11-14 
A few weeks ago, I took the copy of MENACE that I built to Manchester Science Festival, where it played around 300 games against the public while learning to play Noughts and Crosses. The group of us operating MENACE for the weekend included Matt Parker, who made two videos about it. Special thanks go to Matt, plus Katie Steckles, Alison Clarke, Andrew Taylor, Ashley Frankland, David Williams, Paul Taylor, Sam Headleand, Trent Burton, and Zoe Griffiths for helping to operate MENACE for the weekend.
As my original post about MENACE explains in more detail, MENACE is a machine built from 304 matchboxes that learns to play Noughts and Crosses. Each box displays a possible position that the machine can face and contains coloured beads that correspond to the moves it could make. At the end of each game, beads are added or removed depending on the outcome to teach MENACE to play better.

Saturday

On Saturday, MENACE was set up with 8 beads of each colour in the first move box; 3 of each colour in the second move boxes; 2 of each colour in third move boxes; and 1 of each colour in the fourth move boxes. I had only included one copy of moves that are the same due to symmetry.
The plot below shows the number of beads in MENACE's first box as the day progressed.

Sunday

Originally, we were planning to let MENACE learn over the course of both days, but it learned more quickly than we had expected on Saturday, so we reset is on Sunday, but set it up slightly differently. On Sunday, MENACE was set up with 4 beads of each colour in the first move box; 3 of each colour in the second move boxes; 2 of each colour in third move boxes; and 1 of each colour in the fourth move boxes. This time, we left all the beads in the boxes and didn't remove any due to symmetry.
The plot below shows the number of beads in MENACE's first box as the day progressed.

The data

You can download the full set of data that we collected over the weekend here. This includes the first two moves and outcomes of all the games over the two days, plus the number of beads in each box at the end of each day. If you do something interesting (or non-interesting) with the data, let me know!
                        
(Click on one of these icons to react to this blog post)

You might also enjoy...

Comments

Comments in green were written by me. Comments in blue were not written by me.
WRT the comment 2017-11-17, and exactly one year later, I had the same thing happen whilst running MENACE in a 'Resign' loop for a few hours, unattended. When I returned, the orange overlay had appeared, making the screen quite difficult to read on an iPad.
g0mrb
                 Reply
On the JavaScript version, MENACE2 (a second version of MENACE which learns in the same way, to play against the original) keeps setting the 6th move as NaN, meaning it cannot function. Is there a fix for this?
Lambert
                 Reply
what would happen if you loaded the boxes slightly differently. if you started with one bead corresponding to each move in each box. if the bead caused the machine to lose you remove only that bead. if the game draws you leave the bead in play if the bead causes a win you put an extra bead in each of the boxes that led to the win. if the box becomes empty you remove the bead that lead to that result from the box before
Ian
                 Reply
Hi, I was playing with MENACE, and after a while the page redrew with a Dragon Curves design over the top. MENACE was still working alright but it was difficult to see what I was doing due to the overlay. I did a screen capture of it if you want to see it.
Russ
                 Reply
 Add a Comment 


I will only use your email address to reply to your comment (if a reply is needed).

Allowed HTML tags: <br> <a> <small> <b> <i> <s> <sup> <sub> <u> <spoiler> <ul> <ol> <li> <logo>
To prove you are not a spam bot, please type "factor" in the box below (case sensitive):
 2017-06-03 
As a child, I was a huge fan of Captain Scarlet and the Mysterons, Gerry Anderson's puppet-starring sci-fi series. As an adult, I am still a huge fan of Captain Scarlet and the Mysterons. Set in 2068, the series follows Captain Scarlet and the other members of Spectrum as they attempt to protect Earth from the Mysterons. One of my favourite episodes of the series is the third: Big Ben Strikes Again.
In this episode, the Mysterons threaten to destroy London. They do this by hijacking a vehicle carrying a nuclear device, and driving it to a car park. In the car park, the driver of the vehicle wakes up and turns the radio on. Then something weird happens: Big Ben strikes thirteen!
The driver turning on the radio. Good to know that BBC Radio 4 will still broadcast at 92-95FM in 2068.
Following this, the driver is knocked out again and wakes up in a side road somewhere. After hearing his story, Captain Blue works out that the car park must be 1500 yards away from Big Ben. Using this information, Captains Blue and Scarlet manage to track down the nuclear device and save the day.
A map of London with a circle of radius 1500 yards drawn on it.
After rewatching the episode recently, I realised that it would be possible to recreate this scene and hear Big Ben striking thirteen.

Where does Big Ben strike thirteen?

At the end of the episode, Captain Blue explains to Captain Scarlet that the effect was due to light travelling faster than sound: as the driver had the radio on, he could hear Ben's bongs both from the tower and through the radio. As radio waves travel faster than sound, the bongs over the radio can be heard earlier than the sound waves travelling through the air. Further from the tower, the gap between when the two bongs are heard is longer; and at just the right distance, the second bong on the radio will be heard at the same time as the first bong from the tower. This leads to the appearance of thirteen bongs: the first bong is just from the radio, the next eleven are both radio and from the tower, and the final bong is only from the tower.
Big Ben's bongs are approximately 4.2s apart, sound travels at 343m/s, and light travels at 3×108m/s (this is so fast that it could be assumed that the radio waves arrive instantly without changing the answer). Using these, we perform the following calculation:
$$\text{time difference} = \text{time for sound to arrive}-\text{time for light to arrive}$$ $$=\frac{\text{distance}}{\text{speed of sound}}-\frac{\text{distance}}{\text{speed of light}}$$ $$=\text{distance}\times\left(\frac1{\text{speed of sound}}-\frac1{\text{speed of light}}\right)$$ $$\text{distance}=\text{time difference}\div\left(\frac1{\text{speed of sound}}-\frac1{\text{speed of light}}\right)$$ $$=4.2\div\left(\frac1{343}-\frac1{3\times10^8}\right)$$ $$=1440\text{m}\text{ or }1574\text{ yards}$$
This is close to Captain Blue's calculation of 1500 yards (and to be fair to the Captain, he had to calculate it in his head in a few seconds). Plotting a circle of this radius centred at Big Ben gives the points where it may be possible to hear 13 bongs.
Again, the makers of Captain Scarlet got this right: their circle shown earlier is a very similar size to this one. To demonstrate that this does work (and with a little help from TD and her camera), I made the following video yesterday near Vauxhall station. I recommend using earphones to watch it as the later bongs are quite faint.
×3      ×2      ×4      ×3      ×4
(Click on one of these icons to react to this blog post)

You might also enjoy...

Comments

Comments in green were written by me. Comments in blue were not written by me.
Very late to this but how excellent! My Gerry Andersen experiences were at the start of his output...I even watched Stingray in black and white.
(anonymous)
×4   ×3   ×3   ×3   ×3     Reply
@g0mrb: Thanks for letting me know, I'll look into it...
Matthew
×3   ×4   ×4   ×4   ×4     Reply
There is no sound in this video, using Safari in iOS 12.1.1 Beta.
g0mrb
×4   ×5   ×4   ×4   ×4     Reply
This is awesome and wonderful. I salute you.
Ben Sparks
×10   ×5   ×5   ×4   ×4     Reply
Wow! This has made my weekend.
Tony Mann
×3   ×3   ×3   ×3   ×3     Reply
 Add a Comment 


I will only use your email address to reply to your comment (if a reply is needed).

Allowed HTML tags: <br> <a> <small> <b> <i> <s> <sup> <sub> <u> <spoiler> <ul> <ol> <li> <logo>
To prove you are not a spam bot, please type "segment" in the box below (case sensitive):
 2017-03-27 
Tomorrow, the new 12-sided one pound coin is released.
Although I'm excited about meeting this new coin, I am also a little sad, as its release ends the era in which all British coins are shapes of constant width.

Shapes of constant width

A shape of constant width is a shape that is the same width in every direction, so these shapes can roll without changing height. The most obvious such shape is a circle. But there are others, including the shape of the seven-sided 50p coin.
As shown below, each side of a 50p is part of a circle centred around the opposite corner. As a 50p rolls, its height is always the distance between one of the corners and the side opposite, or in other words the radius of this circle. As these circles are all the same size, the 50p is a shape of constant width.
Shapes of constant width can be created from any regular polygon with an odd number of sides, by replacing the sides by parts of circles centred at the opposite corner. The first few are shown below.
It's also possible to create shapes of constant width from irregular polygons with an odd number, but it's not possible to create them from polygons with an even number of sides. Therefore, the new 12-sided pound coin will be the first non-constant width British coin since the (also 12-sided) threepenny bit was phased out in 1971.
Back in 2014, I wrote to my MP in an attempt to find out why the new coin was not of a constant width. He forwarded my letter to the Treasury, but I never heard back from them.

Pizza cutting

When cutting a pizza into equal shaped pieces, the usual approach is to cut along a few diameters to make triangles. There are other ways to fairly share pizza, including the following (that has appeared here before as an answer to this puzzle):
The slices in this solution are closely related to a triangle of constant width. Solutions can be made using other shapes of constant width, including the following, made using a constant width pentagon and heptagon (50p):
There are many more ways to cut a pizza into equal pieces. You can find them in Infinite families of monohedral disk tilings by Joel Haddley and Stephen Worsley [1].
You can't use the shape of a new pound coin to cut a pizza though.
Edit: Speaking of new £1 coins, I made this stupid video with Adam "Frownsend" Townsend about them earlier today:

Infinite families of monohedral disk tilings by Joel Haddley and Stephen Worsley. December 2015. [link]
                        
(Click on one of these icons to react to this blog post)

You might also enjoy...

Comments

Comments in green were written by me. Comments in blue were not written by me.
 Add a Comment 


I will only use your email address to reply to your comment (if a reply is needed).

Allowed HTML tags: <br> <a> <small> <b> <i> <s> <sup> <sub> <u> <spoiler> <ul> <ol> <li> <logo>
To prove you are not a spam bot, please type "g" then "r" then "a" then "p" then "h" in the box below (case sensitive):
 2017-03-08 
This post appeared in issue 05 of Chalkdust. I strongly recommend reading the rest of Chalkdust.
Take a long strip of paper. Fold it in half in the same direction a few times. Unfold it and look at the shape the edge of the paper makes. If you folded the paper \(n\) times, then the edge will make an order \(n\) dragon curve, so called because it faintly resembles a dragon. Each of the curves shown on the cover of issue 05 of Chalkdust is an order 10 dragon curve.
Top: Folding a strip of paper in half four times leads to an order four dragon curve (after rounding the corners). Bottom: A level 10 dragon curve resembling a dragon.
The dragon curves on the cover show that it is possible to tile the entire plane with copies of dragon curves of the same order. If any readers are looking for an excellent way to tile a bathroom, I recommend getting some dragon curve-shaped tiles made.
An order \(n\) dragon curve can be made by joining two order \(n-1\) dragon curves with a 90° angle between their tails. Therefore, by taking the cover's tiling of the plane with order 10 dragon curves, we may join them into pairs to get a tiling with order 11 dragon curves. We could repeat this to get tilings with order 12, 13, and so on... If we were to repeat this ad infinitum we would arrive at the conclusion that an order \(\infty\) dragon curve will cover the entire plane without crossing itself. In other words, an order \(\infty\) dragon curve is a space-filling curve.
Like so many other interesting bits of recreational maths, dragon curves were popularised by Martin Gardner in one of his Mathematical Games columns in Scientific American. In this column, it was noted that the endpoints of dragon curves of different orders (all starting at the same point) lie on a logarithmic spiral. This can be seen in the diagram below.
The endpoints of dragon curves of order 1 to 10 with a logarithmic spiral passing through them.
Although many of their properties have been known for a long time and are well studied, dragon curves continue to appear in new and interesting places. At last year's Maths Jam conference, Paul Taylor gave a talk about my favourite surprise occurrence of a dragon.
Normally when we write numbers, we write them in base ten, with the digits in the number representing (from right to left) ones, tens, hundreds, thousands, etc. Many readers will be familiar with binary numbers (base two), where the powers of two are used in the place of powers of ten, so the digits represent ones, twos, fours, eights, etc.
In his talk, Paul suggested looking at numbers in base -1+i (where i is the square root of -1; you can find more adventures of i here) using the digits 0 and 1. From right to left, the columns of numbers in this base have values 1, -1+i, -2i, 2+2i, -4, etc. The first 11 numbers in this base are shown below.
Number in base -1+iComplex number
00
11
10-1+i
11(-1+i)+(1)=i
100-2i
101(-2i)+(1)=1-2i
110(-2i)+(-1+i)=-1-i
111(-2i)+(-1+i)+(1)=-i
10002+2i
1001(2+2i)+(1)=3+2i
1010(2+2i)+(-1+i)=1+3i
Complex numbers are often drawn on an Argand diagram: the real part of the number is plotted on the horizontal axis and the imaginary part on the vertical axis. The diagram to the left shows the numbers of ten digits or less in base -1+i on an Argand diagram. The points form an order 10 dragon curve! In fact, plotting numbers of \(n\) digits or less will draw an order \(n\) dragon curve.
Numbers in base -1+i of ten digits or less plotted on an Argand diagram.
Brilliantly, we may now use known properties of dragon curves to discover properties of base -1+i. A level \(\infty\) dragon curve covers the entire plane without intersecting itself: therefore every Gaussian integer (a number of the form \(a+\text{i} b\) where \(a\) and \(b\) are integers) has a unique representation in base -1+i. The endpoints of dragon curves lie on a logarithmic spiral: therefore numbers of the form \((-1+\text{i})^n\), where \(n\) is an integer, lie on a logarithmic spiral in the complex plane.
If you'd like to play with some dragon curves, you can download the Python code used to make the pictures here.
                        
(Click on one of these icons to react to this blog post)

You might also enjoy...

Comments

Comments in green were written by me. Comments in blue were not written by me.
 Add a Comment 


I will only use your email address to reply to your comment (if a reply is needed).

Allowed HTML tags: <br> <a> <small> <b> <i> <s> <sup> <sub> <u> <spoiler> <ul> <ol> <li> <logo>
To prove you are not a spam bot, please type "sexa" backwards in the box below (case sensitive):
 2017-02-25 
Recently, I've noticed a few great examples of misleading uses of numbers in news articles.
On 15 Feb, BBC News published a breaking news article with the headline "UK unemployment falls by 7,000 to 1.6m". This fall of 7,000 sounds big; but when compared to the total of 1.6m, it is insignificant. The change could more accurately be described as a fall from 1.6m to 1.6m.
But there is a greater problem with this figure. In the original Office of National Statistics (ONS) report, the fall of 7,000 was accompanied by a 95% confidence interval of ±80,000. When calculating figures about large populations (such as unemployment levels), it is impossible to ask every person in the UK whether they are employed or not. Instead, data is gathered from a sample and this is used to estimate the total number. The 95% confidence interval gives an idea of the accuracy of this estimation: 95% of the time, the true number will lie of the confidence interval. Therefore, we can think of the 95% confidence interval as being a range in which the figure lies (although this is not true, it is a helpful way to think about it).
Compared to the size of its confidence interval (±80,000), the fall of 7,000 is almost indistinguishable from zero. This means that it cannot be said with any confidence whether the unemployment level rose or fell. This is demonstrated in the following diagram.
A fall of 7,000 ± 80,000. The orange line shows no change.
To be fair to the BBC, the headline of the article changed to "UK wage growth outpaces inflation" once the article was upgraded from breaking news to a complete article, and a mention of the lack of confidence in the change was added.
On 23 Feb, I noticed another BBC News with misleading figures: Net migration to UK falls by 49,000. This 49,000 is the difference between 322,000 (net migration for the year ending 2015) and 273,000 (net migration for the year ending 2016). However both these figures are estimates: in the original ONS report, they were placed in 95% confidence intervals of ±37,000 and ±41,000 respectively. As can be seen in the diagram below, there is a significant portion where these intervals overlap, so it cannot be said with any confidence whether or not net immigration actually fell.
Net migration in 2014-15 and 2015-16.
Perhaps the blame for this questionable figure lies with the ONS, as it appeared prominently in their report while the discussion of its accuracy was fairly well hidden. Although I can't shift all blame from the journalists: they should really be investigating the quality of these figures, however well advertised their accuracy is.
Both articles criticised here appeared on BBC News. This is not due to the BBC being especially bad with figures, but simply due to the fact that I spend more time reading news on the BBC than in other places, so noticed these figures there. I quick Google search reveals that the unemployment figure was also reported, with little to no discussion of accuracy, by The Guardian, the Financial Times, and Sky News.
×2      ×2      ×2      ×2      ×2
(Click on one of these icons to react to this blog post)

You might also enjoy...

Comments

Comments in green were written by me. Comments in blue were not written by me.
I've seen archaeologists claiming proof that event A happened before event B because the radiocarbon date of A was 50 years before B. Except the standard error on both dates was 100 years. They even showed the error bars in their own graphics, but seemed to not understand what it meant.

My favorite species of ignoring the measurement error is the metric conversion taken to way too many decimal places. The hike was 50 miles (80.467 kilometers) long.
Perry Ramsey
×1   ×1   ×1   ×1   ×1     Reply
 Add a Comment 


I will only use your email address to reply to your comment (if a reply is needed).

Allowed HTML tags: <br> <a> <small> <b> <i> <s> <sup> <sub> <u> <spoiler> <ul> <ol> <li> <logo>
To prove you are not a spam bot, please type "s" then "e" then "g" then "m" then "e" then "n" then "t" in the box below (case sensitive):

Archive

Show me a random blog post
 2025 

Jan 2025

Christmas (2024) is over
Friendly squares
 2024 
▼ show ▼
 2023 
▼ show ▼
 2022 
▼ show ▼
 2021 
▼ show ▼
 2020 
▼ show ▼
 2019 
▼ show ▼
 2018 
▼ show ▼
 2017 
▼ show ▼
 2016 
▼ show ▼
 2015 
▼ show ▼
 2014 
▼ show ▼
 2013 
▼ show ▼
 2012 
▼ show ▼

Tags

european cup pythagoras simultaneous equations sorting squares final fantasy wave scattering runge's phenomenon gather town game of life matt parker advent calendar captain scarlet matrix of minors estimation hexapawn inline code approximation crochet sound big internet math-off chalkdust magazine edinburgh regular expressions plastic ratio binary boundary element methods manchester science festival talking maths in public noughts and crosses raspberry pi mathslogicbot folding paper realhats polynomials machine learning pi finite group mathsjam correlation world cup draughts bubble bobble rhombicuboctahedron php pascal's triangle arithmetic chebyshev curvature graphs a gamut of games preconditioning ternary kings zines reddit stickers national lottery wool platonic solids craft folding tube maps geometry 24 hour maths python oeis programming frobel dinosaurs nine men's morris gaussian elimination data electromagnetic field accuracy harriss spiral weak imposition matrix of cofactors mean datasaurus dozen fence posts tennis pac-man braiding statistics newcastle fractals phd menace quadrilaterals sobolev spaces radio 4 chess mathsteroids hannah fry martin gardner numerical analysis gerry anderson inverse matrices dataset determinants triangles databet cambridge standard deviation games guest posts books hyperbolic surfaces logic news football golden ratio game show probability trigonometry friendly squares latex matrix multiplication countdown ucl london manchester interpolation flexagons golden spiral matrices reuleaux polygons dates tmip map projections sport convergence exponential growth pizza cutting light royal institution misleading statistics bempp turtles anscombe's quartet bots data visualisation hats puzzles coins dragon curves geogebra stirling numbers speed signorini conditions live stream christmas rugby bodmas finite element method logs london underground logo computational complexity pi approximation day numbers palindromes error bars christmas card royal baby probability propositional calculus the aperiodical asteroids javascript recursion crossnumber graph theory video games cross stitch weather station people maths errors youtube go fonts

Archive

Show me a random blog post
▼ show ▼
© Matthew Scroggs 2012–2025