Self learning - with match boxes

oracacle

Senior Member
A video popped up in my youtube feed the other day
https://www.youtube.com/watch?v=R9c-_neaxeU
a self learning computer made from match boxes.
I thought it was a pretty nice way to introduce machine learning. Then I thought, you could apply the same idea to picaxe (or any other programmable system really). You may need some external memory to cover everything but should be possible. I haven't had much time to think about it.

Their machine had 304 box with each possible state if you were to assign each of those a number which can refer to a block of memory with all the possible outcomes and a weight to the chances of advancing to the next move.
This isn't something I have a any real time to play with at the moment but thought that some here would be interested, and may have the time and interest in the idea
 

techElder

Well-known member
Interesting demonstration of public activity, but I don't see a "self learning computer" in the hardware sense. You might describe this as a public demonstration of an algorithm. So, where's the PICAXE? :D

Actually, 304 matchboxes just because the "computer" always moves first. An addition 400+ needed otherwise, and there would end up being a split of the "computer."

I suppose it keeps a bunch of people's brains active for a weekend, though. :D

Thanks, oracacle!
 

hippy

Technical Support
Staff member
That was interesting. It could be applied to a PICAXE but it seems to need a multi-dimensioned array which would make things a little complicated as well as requiring a fair amount of RAM memory.

I am not sure 304 match boxes are required though I haven't determined if that's true or not. There are 93 = 729 board possibilities but less than that once mirror images and other transformations are taken out, and some will be excluded because the game will be won before all squares are used.

Also one only needs to have 'start', 'after second placed', 'after fourth placed' and 'after sixth placed' possibilities.

If 304 are needed when playing first, and another 400 are needed when playing second, that adds up to 708 and pretty close to all possibilities. That doesn't feel right.


Oops: I think that's actually 39 = 19683 !

When the computer (O) opens there are three options; corner, edge, centre -

Code:
O--  ---  ---
---  O--  -O-
---  ---  ---
After the opponent (X) has played there are 12 possibilities -

Code:
OX-  O-X  O--  O--  O--      ---
---  ---  -X-  ---  --X      XO-
---  ---  ---  --X  ---      ---

X--  -X-  --X  ---  ---      X--
O--  O--  O--  OX-  O-X      -O-
---  ---  ---  ---  ---      ---
That seems to be a growing progression, but some of the next placements will be mirror images and transformations of others.

Maybe it does grow more though if each move is 1 through 9 rather than indicated as adjacent corner, adjacent edge, opposite edge, centre etc.

All quite fascinating.
 
Last edited:

Rick100

Senior Member
Tic-tac-toe or naughts and crosses "computers" have fascinated me since I read a Scientific American article about the Tinkertoy computer, reprinted in Compute magazine. Here's the article:
http://constructingmodernknowledge.com/wp-content/uploads/2013/03/TinkerToy-Computer-Dewdney-article.pdf
Here's a simulator for Menace thats runs in the browser:
http://mscroggs.co.uk/menace/
Setting it to play itself on random reminds me of Wargames.
Here's a simpler matchbox "computer" that might be more Picaxe friendly:
http://www.instructables.com/id/Matchbox-Mini-Chess-Learning-Machine/

Fun stuff.
 
Top