2004/08/21

It seemed like a nice idea

So I was looking at the Conway's Game of Life implementation of a Turing machine, when it struck me: a network of BF interpreters with inputs feeding into outputs, all working on the same tape, arranged into a grid pattern:

  • one tape passes through N nodes as instructions, and M nodes as data.
  • various configurations are possible, not just grids. It's network topology 101.

BF has 8 instructions, meaning 3 bits are needed - octal. I could add a ninth instruction 'X', that switches the input and instruction streams. This would mean using 4 bits - hexadecimal nibbles - with another 7 instructions free.

Each node would need to wait & notify based on input, instruction availability. The whole thing would be visualised fairly easily.

BF operates like a Turing machine, and has:

  • one random-access storage medium - the tape
  • one standard input
  • one standard output
  • one instruction stream

That's 5 in total. If we limit the alphabet, the input and outputs could also be composed of BF glyphs, meaning the tape would be glyphs also.

But would it make any sense? Why do this?

  • There's already a Conway's Game of Life Turing machine.
  • Why not a BF interpreter constructed using a cellular automaton?
  • Would the rules underlying this cellular automaton run on top of a nanoscale substrate?
  • Could we have nodes etched/sketched in substrate and then layered (for redundancy?)

This would give us a very large cluster of very stupid computers that are almost impossible to program, but might exhibit interesting emergent behaviour.

Problems:

  • when (if) we switch data and execution inputs, what happens to the stack?
  • If we add an X instruction, can we wire the output to the input and generate our own code?
  • How do we program this thing? BF is a pain to begin with:

    • should we find a nicer, yet equally small syntax?
    • should we compile a macro language?
  • What happens when two nodes modify the same glyph on the tape?
  • How do we get the thing started? can we make a pseudo-random code generator in BF?

Etc. A potentially cool hack with near-zero real-world applications, short of sci-fi equiv. imaginings.