mscroggs.co.uk
mscroggs.co.uk

subscribe

Blog

Build your own MENACE

 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.
×5      ×3      ×1      ×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.
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
                 Reply
this if great!
Djonwaw
                 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
×3                 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
×5   ×2         ×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 "sixa-x" backwards in the box below (case sensitive):

Archive

Show me a random blog post
 2024 

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

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

Archive

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