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 "noitauqe" 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

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

Archive

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