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

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.
×10      ×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 "regetni" backwards in the box below (case sensitive):

Archive

Show me a random blog post
 2024 

Dec 2024

A regular expression Christmas puzzle
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

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

Archive

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