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.
×3      ×2      ×1      ×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.
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 "k" then "i" then "t" then "e" 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

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

Archive

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