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.
×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 "rotcev" 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

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

Archive

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