<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dw="https://www.dreamwidth.org">
  <id>tag:dreamwidth.org,2010-04-27:505737</id>
  <title>The Mandelbear's Musings</title>
  <subtitle>mdlbear</subtitle>
  <author>
    <name>mdlbear</name>
  </author>
  <link rel="alternate" type="text/html" href="https://mdlbear.dreamwidth.org/"/>
  <link rel="self" type="text/xml" href="https://mdlbear.dreamwidth.org/data/atom"/>
  <updated>2022-12-04T05:55:06Z</updated>
  <dw:journal username="mdlbear" type="personal"/>
  <entry>
    <id>tag:dreamwidth.org,2010-04-27:505737:1844549</id>
    <link rel="alternate" type="text/html" href="https://mdlbear.dreamwidth.org/1844549.html"/>
    <link rel="self" type="text/xml" href="https://mdlbear.dreamwidth.org/data/atom/?itemid=1844549"/>
    <title>Down the Rabbit Hole</title>
    <published>2022-12-04T05:55:06Z</published>
    <updated>2022-12-04T05:55:06Z</updated>
    <category term="history"/>
    <category term="computers"/>
    <category term="turing-machine"/>
    <category term="universal-constructor"/>
    <category term="game-of-life"/>
    <category term="curmudgeon"/>
    <dw:mood>didactic</dw:mood>
    <dw:security>public</dw:security>
    <dw:reply-count>2</dw:reply-count>
    <content type="html">&lt;h3&gt;1: The Turing Machine&lt;/h3&gt;

&lt;p&gt; So, Wednesday I looked at Wikipedia's front page and saw, under the "On
    this day" heading:

&lt;blockquote&gt;
&lt;p&gt; &lt;strong&gt;1936&lt;/strong&gt; – English mathematician &lt;a href="https://en.wikipedia.org/wiki/Alan_Turing"&gt;Alan Turing&lt;/a&gt;
    published the first details of the &lt;a href="https://en.wikipedia.org/wiki/Turing_machine"&gt;Turing machine&lt;/a&gt; (model
    pictured), an abstract device that can simulate the logic of any computer
    algorithm by manipulating symbols.
&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt; It was the "&lt;a href="https://en.wikipedia.org/wiki/Turing_machine#/media/File:Turing_Machine_Model_Davey_2012.jpg"&gt;"model pictured"&lt;/a&gt; that grabbed me.  The caption was/is "A physical
    Turing machine model. A true Turing machine would have unlimited tape on
    both sides, however, physical models can only have a finite amount of
    tape."

&lt;p&gt; I knew that -- everyone who studies computer science knows that, and a few
    have dreamed, as I had, of building a physical model.  I even figured out
    how to build one out of wood, minus a few details.  But there it was.

&lt;blockquote&gt;
&lt;p&gt; (If you're not interested in the details, you can skip this and the other
    indented blocks.  But I digress...)
&lt;p&gt; A Turing Machine is a remarkably simple device.  It has a read head, a
    write head, a strip of tape that they operate on, and a controller with a
    finite number of states.  It can read what's on the tape -- the classic
    machine uses blank, "0", and "1".  (Some versions use "X" instead of "1",
    and some dispense with "0" and just have 1 and blank.  That makes
    programming them a little more complicated, but not by much.  Some have
    &lt;em&gt;more&lt;/em&gt; symbols.  It doesn't matter -- you can program around it.)
    The machine can move the tape backward and forward.  Numbers are usually
    represented in Unary, so you count "1", "11", "111", ..., although with
    both 1 and 0 you could use binary, and some versions do.

&lt;p&gt; The machine has a "state", which selects a line in the machine's program
    that tells it what to write, which direction to move the tape, and which
    state to go to next, depending on what symbol the read head is looking at.
    (Think of the table as a drum with pegs on it, like a music box.)

&lt;p&gt; That's it.  That's all you need to compute &lt;em&gt;any function that can be
    computed by any kind of mechanical or digital computer.&lt;/em&gt; Of course you
    may need a lot of tape -- so you need to attach it to a tape factory --
    and a lot of time.
&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt; The critical thing is that it's possible to design a &lt;em&gt;universal&lt;/em&gt;
    Turing machine:  it takes a tape, and the state table of a Turing machine
    (in 1's, 0's and blanks), and it uses that description to do exactly what
    that machine is programmed to do.  Turing's big accomplishment was using
    the universal Turing machine to prove that there some things that a
    computer &lt;em&gt;can't&lt;/em&gt; do, no matter how much time and tape you give it.

&lt;p&gt; But of course I was much more fascinated by the machines, starting at &lt;a href="https://aturingmachine.com/"&gt;the website of the model that first
    grabbed my attention.&lt;/a&gt;, and proceeding to &lt;a href="https://www.dailymotion.com/video/xrmfie"&gt;a Turing machine made
    of legos.&lt;/a&gt;  I spent some time in the &lt;a href="https://en.wikipedia.org/wiki/Turing_machine_gallery"&gt;Turing
    machine gallery&lt;/a&gt;.  But the rabbit hole went deeper than that.

&lt;h3&gt;2: The Universal Constructor&lt;/h3&gt;

&lt;p&gt; At about that point it ocurred to me to look at the Wikipedia page for the
    &lt;a href="https://en.wikipedia.org/wiki/Von_Neumann_universal_constructor"&gt;Von Neumann universal constructor&lt;/a&gt;.  Because once you have a kind of
    machine that can &lt;em&gt;simulate&lt;/em&gt; itself, the natural question is whether
    you can have a machine that can &lt;em&gt;build a copy&lt;/em&gt; of itself.

&lt;p&gt; The trivial answer to this question is "Yes, of course.  Cells have been
    reproducing themselves for billions of years."  But in the 1940s when von
    Neumann was thinking about this, the structure of DNA had not yet been
    determined -- that was 1953 -- and although it had been &lt;a href="https://en.wikipedia.org/wiki/DNA#History"&gt;known since the late
    1920s that DNA had something to do with heredity&lt;/a&gt;, nobody knew how it
    worked.  So his insight into the machinery of reproduction was pretty
    remarkable.

&lt;p&gt; Like Turing's insight into the machinery of computation, von Neumann's
    insight into the machinery of reproduction was to separate the
    &lt;em&gt;machine&lt;/em&gt; -- the Universal Constructor -- from the description of
    what it was to construct, stored on something simple -- a tape.

&lt;p&gt; Von Neumann's machine was/is a cellular automaton; it "lived" (if you can
    call it that) on a grid of squares, where each square can be in one of 29
    different states, with rules that tell it what to do depending on the
    states of its neighbors.  A completely working machine wasn't simulated
    until 1995.  Its constructor had 6329 32-state cells, and a tape with a
    length of 145,315.  It took it over 63 billion timesteps to copy itself.
    (Smaller and faster versions have been constructed since then).

&lt;p&gt; At, say, 1000 steps/second, that would have taken over two years.  It
    wasn't until 2008 that a program, &lt;a href="https://en.wikipedia.org/wiki/Golly_(program)"&gt;Golly&lt;/a&gt;, became
    able to simulate it using the &lt;a href="https://en.wikipedia.org/wiki/Hashlife"&gt;hashlife&lt;/a&gt; algorithm; it
    now takes only a few minutes.

&lt;p&gt; Which led me even further down the rabbit hole.  Because no discussion of
    cellular automata would be complete without &lt;a href="https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life"&gt;Conway's
    Game of Life&lt;/a&gt;. 

&lt;h3&gt;3: The Game of Life&lt;/h3&gt;

&lt;p&gt; It's not really a game, of course, it's a cellular automaton.  Each cell
    in the square grid is either dead or alive.  You start with an arrangement
    of live cells, and turn them loose according to four simple rules:

&lt;blockquote&gt;
&lt;ol&gt;
  &lt;li&gt; If a live cell has fewer than two live neighbors (out of the 8 cells
       surrounding it), it dies of loneliness.
  &lt;/li&gt;
  &lt;li&gt; A live cell with two or three live neighbors, stays alive.
  &lt;/li&gt;
  &lt;li&gt; A live cell with more than three live neighbors dies of overpopulation.
  &lt;/li&gt;
  &lt;li&gt; A dead cell with exactly three live neighbors becomes live.
  &lt;/li&gt;
&lt;/ol&gt;
&lt;/blockquote&gt;

&lt;p&gt; I first encountered the game in the October 1970 issue of Scientific
    American, in Martin Gardner's "Mathematical Games" column.  The &lt;a href="https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life"&gt;Wikipedia
    article&lt;/a&gt; gives a good introduction.

&lt;p&gt; Patterns in Life evolve in a bewildering variety of ways.  Many of them
    die out quickly -- an isolated cell, for example.  Some patterns sit there
    and do nothing -- they're called "still lifes".  A 2x2 block of cells for
    an example.  Some blow up unpredictably, and may or may not leave a pile
    of random still lifes behind.  Some patterns oscillate:  a horizontal row
    of three cells will become a vertical row in the next turn, and vice versa
    -- it's called a "blinker".

&lt;p&gt; And some patterns move.  The simplest, called a "glider", appears in this
    post's icon.  You can crash gliders into blocks or gliders into gliders,
    and depending on the timing they will do different interesting things.  It
    didn't take people long to figure out that you can build computers,
    including a universal Turing machine.  Or a machine that prints out the
    digits of Pi.

&lt;p&gt; Or a universal constructor.

&lt;h3&gt;4: The universal constructor&lt;/h3&gt;

&lt;p&gt; While I was falling into this rabbit hole, I happened to remember a
    passing mention of &lt;a href="https://btm.qva.mybluehost.me/building-arbitrary-life-patterns-in-15-gliders/"&gt;a universal constructor that can build anything at all out of exactly 15
    gliders&lt;/a&gt;.  (Strictly speaking, anything that can be constructed by
    crashing gliders together.  Some patterns can't be made that way.  But
    almost all the complicated and interesting ones that people are building
    these days can.)  If this intrigues you, go read the article.  Or wait
    until the next section, where  I finally get to the bottom of the rabbit
    hole.

&lt;p&gt; On the way down I encountered lots of weird things -- the aforementioned
    universal Turing machine and Pi printer, and a variety of "spaceships"
    that travel by, in effect, repeatedly constructing a new copy of
    themselves, then cleaning up the old copy.  It took a while for me to get
    my head around that.

&lt;p&gt; Then, sometime Wednesday evening, I found the book.

&lt;h3&gt;5: The Book of Life&lt;/h3&gt;

&lt;p&gt; It's not called "The Book of Life", of course, it's called &lt;cite&gt;&lt;a href="https://conwaylife.com/book/"&gt;Conway's Game of Life: Mathematics
    and Construction&lt;/a&gt;&lt;/cite&gt;.  But you get the idea.  You can &lt;a href="https://conwaylife.com/book/#download_pdf"&gt;download the PDF&lt;/a&gt;.

&lt;p&gt; The book ends with a pattern that simulates a Life cell.  There are
    several different versions of this; this is the latest.  It works by
    making copies of itself in any neighboring cells that are coming alive,
    then destroying itself if it's about to die.  Wild.


&lt;p class="colophon"&gt; &lt;em&gt;Another fine post from
   &lt;a href="https://mdlbear.dreamwidth.org/tag/curmudgeon"&gt;The Computer Curmudgeon&lt;/a&gt; (also at
   &lt;a href="https://computer-curmudgeon.com/"&gt;computer-curmudgeon.com&lt;/a&gt;).&lt;br&gt;
   Donation buttons in &lt;a href="https://mdlbear.dreamwidth.org/"&gt;profile&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src="https://www.dreamwidth.org/tools/commentcount?user=mdlbear&amp;ditemid=1844549" width="30" height="12" alt="comment count unavailable" style="vertical-align: middle;"/&gt; comments</content>
  </entry>
</feed>
