Relay based chess computing

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

User avatar
sje
Posts: 4675
Joined: Mon Mar 13, 2006 7:43 pm

Relay based chess computing

Post by sje »

Relay based chess computing

As inspired by Germany's Konrad Zuse's general purpose relay computers from the 1930s and America's Claude Shannon's Endgame chess computer of 1950.

For a very well explained modern demonstration relay computer, see Harry Porter's 2009 machine: http://web.cecs.pdx.edu/~harry/Relay/

----

The Central Hypothetical Question: Could a working chessplaying computer be built using electromechanical technology which was available in the mid 1800s? If so, could that have brought about the Computer Age a full century sooner?

----

Most of Porter's relay computer could have been built using 1860 technology. There would be some differences. Passive plastic components would have been omitted or been made of wood or card stock, LEDs would have been replaced with solenoids each raising or lowering a small flag, and ROM could be hacked out of a player piano paper roll reader and punch. The few dozen capacitors needed -- including four or so for the no-crystal clock -- could be made by hand.

Could a 1860 version of Porter's machine play chess? With enough memory, the answer is yes. But it would be glacially slow. With modern relay fabrication technology, relay cycle rate is not much faster than a measly five Hz even though propagation speed through copper wire is two thirds the speed of light. One could build a 64 bit adder with a very fast ripple, but it would still take a minute to add 300 numbers or perform 300 increments. Comparing Porter's machine to an early eight bit microprocessor as used in the first consumer chess computers, the relay machine might take about two months to come up with a move from a very simple two ply search which would have taken the two MHz microprocessor five seconds.

----

The alternative to a general purpose relay computer is a relay computer with special purpose chess processing subsystems. Such a machine would still have general purpose capability, and this would control overall processing. But to get real chess done in tolerable time, special circuitry is needed.

One way of doing this is to recreate an existing special purpose chessplaying machine at the gate level: for every semiconductor gate in the original machine, relay gate of the same kind and with the same connections is used. It would be possible (and a bit boring) to make a relay version of Belle. It would have 64 mostly identical sub-units like Bell; these would be connected exactly like Belle, the assembly could be controlled with a minicomputer like Belle, and most importantly, it would play exactly the same moves as Belle. But it would find these moves about ten million times more slowly than Belle. How big might a relay Belle be? My guess: it would fill a very large barn.
User avatar
stegemma
Posts: 859
Joined: Mon Aug 10, 2009 10:05 pm
Location: Italy
Full name: Stefano Gemma

Re: Relay based chess computing

Post by stegemma »

You can build logical ports with almost anything: mechanical parts, liquids on pipes and even with pieces of woods. Using relays has already been done in the past, so it's not so interesting. In effect, if ancient romans have knows about boolean logic and the chess were already played as today, they would have build a chess computer 2000 years ago (and any other ancient people too). Of course they've missed a lot of theory and even the scientific method were not known.

The problem is not the technology but the knowledge.
Author of Drago, Raffaela, Freccia, Satana, Sabrina.
http://www.linformatica.com
User avatar
sje
Posts: 4675
Joined: Mon Mar 13, 2006 7:43 pm

Re: Relay based chess computing

Post by sje »

Yes, it's possible to build a manually operated computer out of sticks and dirt. But relay computing is the simplest tech which can be used to build a programmable machine which can run by itself and produce useful output.

By 1860 or so, the tech demonstrated by pocket watches, music boxes, batteries, and solenoids was sufficient to make a general purpose relay computer. But no such thing appeared until more than seventy years later with Zuse's first relay machine. Why did things take so long? That is the big question.

By analogy, what is it that we could do today, but lack the vision? Do we have tech which could support macro teleportation or tabletop fusion? Instead of semiconductor memory which needs a million atoms to hold one bit, might me already have the tech to store a million bits in one atom?
User avatar
stegemma
Posts: 859
Joined: Mon Aug 10, 2009 10:05 pm
Location: Italy
Full name: Stefano Gemma

Re: Relay based chess computing

Post by stegemma »

sje wrote:Yes, it's possible to build a manually operated computer out of sticks and dirt. But relay computing is the simplest tech which can be used to build a programmable machine which can run by itself and produce useful output.

By 1860 or so, the tech demonstrated by pocket watches, music boxes, batteries, and solenoids was sufficient to make a general purpose relay computer. But no such thing appeared until more than seventy years later with Zuse's first relay machine. Why did things take so long? That is the big question.

By analogy, what is it that we could do today, but lack the vision? Do we have tech which could support macro teleportation or tabletop fusion? Instead of semiconductor memory which needs a million atoms to hold one bit, might me already have the tech to store a million bits in one atom?
Every new thing needs someone to think about it, so until that person(s) hasn't born we can't see any invention. Think at one simpler object: the Rubik cube. The first prototype was build in wood and maybe anyone could have the technology to build it, some thousands years ago... but nobody has invented the Rubik cube, before mr. Rubik. Of course we already have the instruments to build almost anything but we just don't know "what" to build (and sometime even how to do it).
Author of Drago, Raffaela, Freccia, Satana, Sabrina.
http://www.linformatica.com
User avatar
sje
Posts: 4675
Joined: Mon Mar 13, 2006 7:43 pm

Re: Relay based chess computing

Post by sje »

Perhaps we should ask: How do we encourage the next Babbage, the next Turing, the next von Neumann, and the next Shannon?
User avatar
sje
Posts: 4675
Joined: Mon Mar 13, 2006 7:43 pm

More ideas about a relay chess computer

Post by sje »

More ideas about a relay chess computer:

Parallelism is a must due to the relay cycle frequency bound of 10 Hz (or 5 Hz for better reliability). And the first step towards parallelism is to select a bitboard approach. It is not a complex task to design a relay approach which iterates over the entire board, but it's hard to make it a fast board scanner.

A bitboard logical unit (i.e., circuit) which implements Not(), And(), Or(), and Xor() all in constant time is trivial. Circuits for single bit left/right shift/rotate are also quite simple. A logical unit which does FirstBit() is a little more complex, but still very fast as is SetBit(), ResetBit(), and TestBit(). As you would expect, CountBits() takes more relays and more time to run, but is still fairly quick and avoids a slow 64 operation sequence.

Some novel bitboard relay circuits could be useful, like a two dimensional register whose 8x8 components map to a board and can be loaded from a bitboard and stored to a bitboard. The obvious use is to load the 8x8 register with the bitboard of target squares and a ray set descriptor then read off a bitboard giving destination squares from a given input square.

Another possibility is a 4,096 (= 64x64) cell mega-circuit which corresponds to the 64 bitboard vector that represents attacks-from/attacks-to square/square matrix. Each of the 64 rows of the 4,096 array would have a chessman register which would hold a bit patterns corresponding to the man on the corresponding square. The array is wired so that loading a bit pattern into a register causes tho entire attack-from/attack-to array to update automatically at ripple speed. As soon as the ripple completes, the attack-from and attack-to bitboards can be read for any square in constant time. I have worked out this circuit and it's not as complex as you might first think. But it does need many thousands of relays.
smatovic
Posts: 2645
Joined: Wed Mar 10, 2010 10:18 pm
Location: Hamburg, Germany
Full name: Srdja Matovic

Re: Relay based chess computing

Post by smatovic »

Rest in peace Steven James Edwards.

I find this post remarkable, I downloaded the patent applications of Zuse's machines as .pdf and start to ponder, how much earlier could Zuse's Z3 have been realized?
sje wrote: Thu May 05, 2016 4:01 pm [...]
By 1860 or so, the tech demonstrated by pocket watches, music boxes, batteries, and solenoids was sufficient to make a general purpose relay computer. But no such thing appeared until more than seventy years later with Zuse's first relay machine. Why did things take so long? That is the big question.
[...]
As SJE mentioned, Zuse and Shannon came up with the idea to use electro-mechanical relays for implementing Boolean algebra in the 1930s. Questions arise, was Babbage aware of the Boolean algebra? His Analytical Engine was proposed at the same time, in the same country. The Baudot code, binary, was proposed in the 1870s. At what clock rate did the first telegraph-relays operate in mid 1800s? Z3 used telephone-relays @5Hz.

I am aware there is the so called "Steam Punk" Sci-Fi literature out there, I am not into these, hence Idk if someone did catch on on the idea to implement Zuse's Z3 in ~1850 as alternate reality....interesting stuff, implement Ken Thompson's Belle@5Hz in ~1850...

--
Srdja
laurietunnicliffe
Posts: 19
Joined: Wed Nov 17, 2021 1:19 am
Full name: Laurie Tunnicliffe

Re: Relay based chess computing

Post by laurietunnicliffe »

Why not implement it in discreet logic chips to test your idea.
A lot easier than wiring up a million relays. In fact you could design it
and simulate it without touching a wire. Just restrict yourself to a logic unit that
models a relay.
smatovic
Posts: 2645
Joined: Wed Mar 10, 2010 10:18 pm
Location: Hamburg, Germany
Full name: Srdja Matovic

Re: Relay based chess computing

Post by smatovic »

Sorry, the original post is from 2016, and the original poster died on October 1, 2016:

https://www.chessprogramming.org/Steven_Edwards

it seems SJE already figured out the discrete relay machinery, but I guess the fun part would be to build such a thing with real relays...

--
Srdja