mscroggs.co.uk
mscroggs.co.uk
Click here to win prizes by solving the mscroggs.co.uk puzzle Advent calendar.
Click here to win prizes by solving the mscroggs.co.uk puzzle Advent calendar.

subscribe

Blog

 2022-02-26 
Surprisingly often, people ask me how they can build their own copy of MENACE. If you've been thinking that you'd love your own matchbox-powered machine learning computer but haven't got round to asking me about it yet, then this blog post is just what you're looking for.

Matchboxes

Before building MENACE, you'll need to get hold of 304 matchboxes (plus a few spares in case one gets lost or falls apart). I used these craft matchboxes: they don't have the best build quality, but they're good enough.

304 positions

The positions you need to glue onto the front of the matchboxes can be downloaded from this GitHub repository (first move boxes, third move boxes, fifth move boxes, seventh move boxes). These are sized to fit on matchboxes that have 15mm by 35mm fronts.
I printed each pdf on differently coloured paper to make it easier to sort the matchboxes after getting them out of their box.
If you get differently sized matchboxes, the code used the generate the PDFs is in the same GitHub repository (you'll need to modify these lines). Alternatively, feel free to drop me an email and I will happily adjust the sizes for you and send you the updated PDFs.

Glue

I used PVA glue to stick the positions onto the matchboxes. The printable PDFs have extra tabs of paper above and below the postions that can be glued in to the bottom and inside of the matchbox tray to hold it more securely.
Gluing the positions onto the matchboxes was the most time consuming part of building my copy of MENACE, largely due to having to wait for the glue to dry on a set of matchboxes before I had space for the next batch of them to dry.

Beads

Once you've glued pictures of noughts and crosses positions to 304 matchboxes, you'll need to put coloured beads into each matchbox. For this, I used a large tub of Hama beads (that tub contained orders of magnitude more beads than I needed).
A nice side effect of using Hama beads is that they're designed to be ironed together so making a key to show which colour corresponds to each position is very easy.
I typically start the boxes off with 8 beads of each colour in the first move box, 4 of each colour in the third move boxes, 2 of each in the fifth move boxes, and one of each in the seventh move boxes.

Once you've filled all your matchboxes with the correct number of beads, you're ready to play yout first game against MENACE. I'd love to hear how you get on.
And once you're bored of playing noughts and crosses against your matchboxes, why not build a machine that learns to play Hexapawn, Connect 4, Chess or Go? Or one that plays Nim?
Edit: Added link to the printable pdfs of the positions needed for Hexapawn, made by Dan Whitman.
×9      ×6      ×5      ×6      ×7
(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.
Interesting.
Could try a same kind of thing using playing card deck(s)? A(=1)-2-3 4-5-6 7-8-9 maybe 3 decks with different colours on their backs.
Willem
×3   ×3   ×3   ×3   ×2     Reply
this if great!
Djonwaw
×2   ×2   ×2   ×2   ×2     Reply
I also read the Martin Gardner article way back when and had two matchbox machines (actually with envelopes instead of matchboxes) play Nim against each other. I don't remember all the details now, except that it got to the point where one would make the first move and the other would immediately resign.
Tim Lewis
×5   ×2   ×2   ×2   ×2     Reply
I made a matchbox machine that learns to play 3x3 Nim almost 50 years ago. I still have it. (Based on Martin Gardner's article)
Tony
×7   ×4   ×2   ×2   ×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 "tcesib" backwards in the box below (case sensitive):
 2021-12-04 
In November, I spent some time designing this year's Chalkdust puzzle Christmas card.
The card looks boring at first glance, but contains 14 puzzles. By writing the answers to the puzzles in the triangles on the front of the card, then colouring triangles containing 1s, 2s, 5s or 6s in the right colour, you will reveal a Christmas themed picture.
If you want to try the card yourself, you can download this printable A4 pdf. Alternatively, you can find the puzzles below and type the answers in the boxes. The answers will automatically be written in the triangles, and the triangles will be coloured...
14 7 1 8 2 5 6 3 10 4 13 12 11 9 9 8 7 0 3 4 0 8 7
×1      ×1      ×1      ×1      ×1
(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.
@HJ: the smallest one does have 6, and Q4 is correct too. I bought the cards and had good fun solving it myself. I’m glad to find this here though to check my answers as when I did the shading it looked like the picture wasn’t quite right. Thanks for the cards Matthew, I look forward to next year’s - no pressure!
Alec
×2   ×3              Reply
The only one I'm stuck on is #6. I thought I was doing it right but I'm getting a non-integer answer. I'm assuming the heptagon in question is aligned so one of its sides sits on the diameter of the semicircle, and the opposite vertex sits on the curved edge of the semicircle. Is this wrong?
Seth C
                 Reply
The version of the card on this page doesn't check if your answers are correct, so it will colour in any number you enter as long as it has the right number of digits.
Matthew
      ×1           Reply
Wonky solution for #9? On a blank start page, answering "16" gives you red and white puzzle completions, yet we _know_ that 16 is an incorrect answer. Strange?
Attika
                 Reply
@Matthew: Thanks, I figured they did but it was good to get confirmation.
Dan
                 Reply
@Dan: one digit numbers count
Matthew
   ×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 "u" then "n" then "c" then "o" then "u" then "n" then "t" then "a" then "b" then "l" then "e" in the box below (case sensitive):
 2021-09-25 
A few weeks ago, I (virtually) went to Talking Maths in Public (TMiP). TMiP is a conference for anyone involved in—or interested in getting involved in—any sort of maths outreach, enrichment, or public engagement activity. It was really good, and I highly recommend coming to TMiP 2023.
The Saturday morning at TMiP was filled with a choice of activities, including a puzzle hunt written by me. Each puzzle required the solver to first find a clue hidden in the conference's Gather-Town-powered virtual Edinburgh (built by the always excellent Katie Steckles), then solve the puzzle to reveal a clue to the final code. Once the final code was found, the solvers could enter a secret area in the Gather Town space.
The puzzles for the puzzle hunt can be found at mscroggs.co.uk/tmip. For anyone who doesn't have access to the Gather Town space, the numbers that are hidden in the space are:
The solutions to the five puzzles, and the final puzzle are below. If you want to try the puzzles for yourself, do that now before reading on.

Puzzle 1: The strange shop

A shop has a very strange pricing model. If you buy \(k\) items, then the price (in pence) is decided as follows:
You enter the shop with 1761 pence and buy 28 items.
How many pence do you leave the shop with?
Fun fact: If you try to buy 509202 items from the shop, then the shopkeeper cannot work out a price, as a prime is never reached. It is currently unknown if this is the smallest number of items that this is true for.

Show solution

Puzzle 2: The homemade notebook

You make a homemade notebook with 1288 pages: You take a stack of 1288/4 pieces of paper and fold the entire stack in half so that each piece of paper makes four pages in the notebook. You number the pages: you write the number 1 on the front cover, 2 on the inside front cover, and so on until you write 1288 on the back cover.
While you are looking for your stapler, a strong wind blows the pieces of paper all over the floor. You pick up one of the pieces of paper and add up the two numbers you wrote on one side of it.
What is the largest total you could have obtained?

Show solution

Puzzle 3: The overlapping triangles

You draw three circles that all meet at a point:
You then draw two triangles. The smaller red triangle's vertices are the centres of the circles. The larger blue triangle's vertices are at the points on each circle diametrically opposite the point where all three circles meet:
The area of the smaller red triangle is 2449.
What is the area of the larger blue triangle?

Show solution

The odd factors

You write down the integers from 94+1 to 2×94 (including 94+1 and 2×94). Under each number, you write down its largest odd factor*.
What is the sum of all the odd factors you have written?
* In this puzzle, factors include 1 and the number itself.
Hint: Doing what the puzzle says may take a long time. Try doing this will some smaller values than 94 first and see if you can spot a shortcut.

Show solution

The sandwiched quadratic

You know that \(f\) is a quadratic, and so can be written as \(f(x)=ax^2+bx+c\) for some real numbers \(a\), \(b\), and \(c\); but you've forgetten exactly which quadratic it is. You remember that for all real values of \(x\), \(f\) satisfies
$$\tfrac{1}{4}x^2+2x-8\leqslant f(x)\leqslant(x-2)^2.$$
You also remember that the minimum value of \(f\) is at \(x=0\).
What is f(102)?

Show solution

The final puzzle

The final puzzle involves using the answers to the five puzzles to find a secret four digit passcode is made up of four non-zero digits. To turn them into clues, the answers to each puzzle were scored as follows:
Each digit in an answer that is also in the passcode and in the same position in both scores two points; every digit in the answer that is also in the passcode but in a different position scores 1 point. For example, if the passcode was 3317, then:
The five clues to the final code are:

Show solution

×3      ×3      ×3      ×3      ×3
(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.
@Dan: Well spotted, I've edited the post
Matthew
×2   ×4   ×3   ×3   ×3     Reply
Small nitpick on problem 1 fun fact. I think you meant 509202. 509203 is already prime so the price would be 509203. The way you set up the problem (2a_n+1) only gets to (k*2^n-1) if you start with k-1, so your k needs to be one smaller than the Wikipedia's k.
Dan
×3   ×3   ×3   ×2   ×2     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 "e" then "q" then "u" then "a" then "t" then "i" then "o" then "n" in the box below (case sensitive):
 2020-12-03 
In November, I spent some time designing this year's Chalkdust puzzle Christmas card.
The card looks boring at first glance, but contains 9 puzzles. By splitting the answers into two digit numbers, then colouring the regions labelled with each number (eg if an answer to a question in the red section is 201304, colour the regions labelled 20, 13 and 4 red), you will reveal a Christmas themed picture.
If you want to try the card yourself, you can download this pdf. Alternatively, you can find the puzzles below and type the answers in the boxes. The answers will be automatically be split into two digit numbers, and the regions will be coloured...
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
×2      ×2      ×2      ×2      ×1
(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.
@JDev: lots of the card will still be brown once you're done, but you should see a nice picture. Perhaps one of your answers is wrong, making a mess of the picture?
Matthew
   ×1   ×1   ×1   ×1     Reply
I finished all of the puzzles but the picture is far from colored in. Am I missing something?

These puzzles have been a blast!
JDev
×1   ×1   ×1   ×1        Reply
Thanks a lot, Matthew. It was great fun!
Gert-Jan
×1                 Reply
@Tara: I initially made the same mistake. Maybe you didn't take into account that 6 is not one of the available digits in question 1?
Sean
×1   ×2              Reply
@Tara: Yes, looks like you may have got an incorrect answer for one of the black puzzles
Matthew
×1   ×2   ×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 "zero" in the box below (case sensitive):
 2019-12-08 
Just like last year, the year before and the year before, TD and I spent some time in November this year designing a Chalkdust puzzle Christmas card.
The card looks boring at first glance, but contains 9 puzzles. By splitting the answers into two digit numbers, then drawing lines labelled with each number (eg if an answer is 201304, draw the lines labelled 20, 13 and 4), you will reveal a Christmas themed picture. Colouring the regions of the card containing circles red, the regions containing squares green, and the regions containing stars white or yellow will make this picture even nicer.
If you want to try the card yourself, you can download this pdf. Alternatively, you can find the puzzles below and type the answers in the boxes. The answers will be automatically be split into two digit numbers, the lines will be drawn, and the regions will be coloured...
×3      ×3      ×3      ×3      ×3
(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.
Rishabh, what do you see that I do not?
Rob Glencairn
×3   ×3   ×3   ×3   ×3     Reply
Thanks for the feedback. (I now understand the need for redaction). My son sent me your link as a Xmas present. I must think of an appropriate retaliation. (What is a PDF?)Think I've fixed 1,6 and 9....8 eludes me, for the moment.
Rob
×3   ×3   ×3   ×3   ×3     Reply
@Rob: It looks to me like you've made mistakes in questions 1, 6, 8, and 9. The hints from the back of the pdf might help:

1. How many numbers between 1 and 10,000 have 1 as their final digit? How many have 1 as their penultimate digit?

6. How many ways can you write 1? 2? 3? 4? 5? What's the pattern?

8. How many zeros does 10! end in? How many zeros does 20! end in? How many zeros does 30! end in?

9. Carol’s sum is odd. What does this tell you about the 5- and 6-digit numbers?
Matthew
×3   ×3   ×4   ×3   ×4     Reply
I'm 71, with one good eye left. What am I missing?
1. 400001
2. 1849
3. 2002
4. 130405
5. 120306
6. 53?
7. 171175
8. 59?
9. 313525
Rob
×2   ×2   ×2   ×2   ×1     Reply
It was fun.
Rishabh
×2   ×3   ×2   ×2   ×2     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 "r" then "a" then "t" then "i" then "o" in the box below (case sensitive):

Archive

Show me a random blog post
 2024 

Dec 2024

Christmas card 2024

Nov 2024

Christmas (2024) is coming!

Feb 2024

Zines, pt. 2

Jan 2024

Christmas (2023) is over
 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

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

Archive

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