Marble Computers

For fun, I tried to build a computer out of KNEX that could play the simple game of Nim against a human. Basically, Nim is played with any number of items, I used marbles for ease of use, and each player alternately takes a turn by taking one to n items, where n is a predetermined limit (I used 3). The player who takes the last item loses.

My KNEX computer worked by counting up the number of marbles that have been played, modulo 4, and then determining how many to play from this count. It worked reasonably well, except when there were mechanical errors and the marbles jumped out of the machine.

I made another version out of Legos that doesn't have the mechanical errors and is designed with almost the exact same system, except a different method for going between human and AI modes.

KNEX Nim Computer

Here's a short image gallery of different parts of the computer.

Marbletronics theory

This was originally written as kind of a joke, purporting "marbletronics" to be the way of the future in computing, I came up with the following.

Voltage, which is the potential, can be modeled by V=g\Delta h \mathrm{\frac{m^2}{s^2}} where g is the gravitational constant and \Delta h is the change in height that the marble can experience. The marbletronic equivalent for the coulomb can be thought of as one marble (or 1 \mathrm{M}). Thus, current is measured in marbles per second. To then find the total power used by a marbletronic device, where x is the number of marbles per second falling through a height of h meters,

P = I\cdot V = x \cdot g \cdot h \mathrm{\frac{M\cdot m^2}{s^3}}

The concept of resistance can be developed. Since V = I\cdot R, R = \frac{V}{I} and so

R = \frac{g\cdot h}{x} \mathrm{\frac{m^2}{M\cdot s}}

From these ideas, the rest of marbletronics can be constructed to provide the theory for efficient marble computer creation.