I find this very interesting... and I'm thinking, something quite build-able.
John Godfrey, an inventor, created the game Dr. Nim in the early to mid 1960's. Nim was a computer program that i remember from my early TRS-80 days... the game consisted of having 12 marbles... you could drop 1, 2, or 3 at a time... the computer also making that selection... the one with the last marble wins. This version was designed as a physical computer... mechanically determining the play of the game. RE:
http://www.evilmadscientist.com/2016/dr-nim-prototypes/