Jump to content

Draft:Dietrich Prinz's Chess Program

From Wikipedia, the free encyclopedia



Dietrich Prinz's Chess Program
Developer(s)Dietrich Prinz
Director(s)Dietrich Prinz
Platform(s)Ferranti Mark 1
ReleaseNovember 1951
Genre(s)Computer chess

Dietrich Prinz's chess program, also known as Robot Chess and Mate-in-Two, first ran in November 1951 on the Ferranti Mark I at the University of Manchester, the first commercially available computer. It is regarded as one of the earliest efforts toward developing computer-based chess program, following Alan Turing’s theoretical chess program, Turochamp, which was never implemented on a computer.

As part of a collaboration between Ferranti and the University of Manchester, British computing pioneer Dietrich Prinz contributed to the development of the Ferranti Mark I and its prototypes, the SSEM and the Manchester Mark I. Prinz began developing his chess program on the Ferranti Mark I in 1949, and it became operational in November 1951. Due to the machine's limited capabilities, playing a chess game against the computer was impossible, forcing Prinz to focus solely on endgame studies, specifically mate-in-two problems [fr]. Additionally, the rules were significantly simplified, omitting castling, two-square pawn moves, en passant captures, and pawn promotion. The program also did not differentiate between checkmate and stalemate. Prinz opted for an exhaustive search method, which required evaluating thousands of possible moves in every game. The program was significantly slower than a human player, taking nearly fifteen minutes per move. The primary causes of this slowness were the data transfers between magnetic memory, electronic memory, and the program's testing procedures.

Despite its simplicity, the program holds historical significance as the first computer chess program to run on a fully operational computer. Prinz did not develop another chess program, possibly due to the increasing demands of his work at Ferranti.

Origins

[edit]
Replica of the baby's first prototype of the Ferranti Mark I on which the program runs.

Dietrich Prinz was a German-born computing pioneer who studied at Humboldt University in Berlin, where he attended lectures by Max Planck and Albert Einstein. As a Jew, he fled the Third Reich in 1938 and settled in England.[1] He became a British citizen in 1947.[2] Commonly referred to by his initials, DP, at the University of Manchester,[3] Prinz was something of a geek before the term even existed and was considered a "disciple" of Turing.[2]

Advances in radar research and the equipment used for cryptography during World War II opened a gap in the field of computing and facilitated the development of computers by the late 1940s. After the war, Ferranti's business began to decline due to a lack of orders from the UK Ministry of Defence. Eric Grundy, a manager, then set up a team to study the potential uses of computers. In 1947, he appointed Dietrich Prinz as head of the computer development team. Prinz collaborated with the University of Manchester in the development of computers. Ferranti had already worked with the university in the 1930s on the manufacturing of electronic tubes. After two months of testing, the Small-Scale Experimental Machine (SSEM, nicknamed baby) finally worked.[4] Once the feasibility of his design was demonstrated, a project was launched to make it a more user-friendly computer: the Manchester Mark I, which quickly became the prototype for the Ferranti Mark I, the first commercially available general-purpose computer.[5] It was delivered to the university in August 1950. Alan Turing and his colleague Cicely Popplewell worked for about six months, particularly on the user interface, and then the computer was officially completed in February 1951.[4]

Prinz learns programming on the Mark I through seminars led by Turing and Popplewell.[6] He sees chess programming as "a clue to methods that could be used to handle structural or logistical problems occurring in other fields, through electronic computers."[6] His interest in computer chess programs is probably influenced by Alan Turing.[7] Prinz then runs his chess program, which he has been developing since 1949, on the Mark I.[8][4] Quickly, Turing and Prinz conclude that no program on the Mark I can play a full chess game. Then, they decided to focus their efforts on the endgame, particularly checkmates in two moves.[3] Prinz is probably inspired, like Christopher Strachey and Donald Michie, by an article titled A Theory of Chess and Noughts and Crosses[6] published in 1950 in the periodical Penguin Science News written by National Physical Laboratory (NPL) scientist Donald Davies.[9] He may also have known about the existence of El Ajedrecista, which allows playing the endgame of king and rook against a lone king, and could have been inspired by it to create his program.[10]

In November 1951, his program successfully solved mate-in-two problems [fr] on the Mark I.[11]

Functioning

[edit]

The limited technical capabilities of the Ferranti Mark I not only forced Prinz to reduce the game to checkmates in two moves. To allow the tasks to be executed in the shortest time possible, some restrictions were imposed on how the rules were explained to the machine. No distinction is made between checkmate and stalemate, castling is not allowed, nor are the two-step pawn moves, en passant, or promotion.[11][12]

Each game played by the program requires the evaluation of several thousand moves, using brute force search, unlike Turochamp, which performs fewer searches because it is based on a heuristic search.[6] Prinz chose this option because a game as simplified as this does not require a heuristic search.[2]

The program and the initial position of the pieces are provided to the machine via a punched tape and transferred into its magnetic memory. An initial routine transfers the data into electronic memory, after which the computer begins its calculations.[11] The program first examines all squares connected to the king’s position by a knight’s move to determine whether the king is on the board, which squares are occupied, what piece is adjacent, and finally, whether it is indeed a knight. This series of checks is repeated for each piece.[12] The program includes a routine for calculating the next possible move, a routine for verifying the legality of the move, and several sequences responsible for recording the move and the resulting position. All these routines are overseen by a master routine, which synthesizes the overall structure of the problem and ensures that the subroutines are executed in the correct sequence. The programming techniques are rudimentary, and the program's execution speed requires refinements and improvements.[11] The program takes longer to select a move than a human player.[8] For instance, a single move takes the computer fifteen minutes to compute and print the solution.[11]

A large part of the time used by the program is allocated to self-checking tests. Another time-consuming task is the magnetic transfer of data between the magnetic and electronic storage, such as subprograms and data concerning positions and movements. Nine of these data transfers are made with each move.[11][2] In comparison, the time required to perform the movement calculations is of minor importance, even though all possible moves, including impossible ones, are evaluated. Incorrect positions or prohibited moves are quickly discarded by the program and account for only a small portion of the calculation time. When the first chess problem in history was presented to the program, a single move forced the program to check 450 possible moves, 100 of which were illegal. The program takes about two seconds to decide each of its moves.[11]

The program continues its analysis until a solution is found.[13] It prints each white move tested and announces mate once a winning move is identified.[11] It does not include any graphical interface,[14] as the results are printed on paper.[11]

First chess problem in History solved by the program

[edit]

The program must find a move for White that ensures checkmate on the following move, regardless of Black's choice.[11] The squares are numbered unusually, from left to right, starting from 11 to 18 on the bottom row, then 21 to 28 for the second row, and so on, up to the top row (from 81 to 88). Thus, square 68 is on the 6th rank and the 8th file (h6). The program prints all tested positions and announces mate when it finds the solution. In the diagram on the right, the correct move is Rook to 68 ("Tour en 68"), meaning Rh6. Before finding the solution, the program previously attempted the following moves in order: P78 (gxh7), R17 (Rg1), R16 (Rf1), R15 (Re1), R14 (Rd1), R13 (Rc1), R12 (Rb1), R11 (Ra1), R28 (Rh2), R38 (Rh3), R48 (Rh4), R58 (Rh5).[11][2] This problem is commonly attributed, without any supporting evidence, to the American chess prodigy Paul Morphy (1837–1884), meaning it predates the program creation.

Legacy

[edit]

Dietrich Prinz’s chess program is unanimously recognized as the first game program to run on a multi-purpose computer, specifically on the first commercial computer, the Ferranti Mark I, and it holds a significant place in the history of computer chess.[6][2][3][14] As such, it is also part of the origins of video games, frequently mentioned in works covering the history of this medium as the first functional game on a computer.[14] Additionally, it ranks among the pioneering developments in artificial intelligence.[13] Jack Copeland, who has written extensively about the life and work of Alan Turing, describes the program as "an important moment, the Big Bang of computer chess."[2] While Prinz's program successfully solved mate-in-two problems starting in November 1951, it wasn't until 1958, with the program developed by American Alex Bernstein on the IBM 704, that a full chess game could be played against a computer.[10]

Despite the program’s reliance on brute-force search and its limitations in speed, its historical significance is often compared to groundbreaking achievements in other fields. For instance, Copeland draws a comparison to the Wright brothers’ first flight, recognizing the achievement’s importance, even if it was only an early step toward more sophisticated developments.[2]

Prinz published all the details of his program in 1952 in the article Robot Chess in the journal Research (no. 5, pp. 261-266).[2] The article was reissued in 1988 in the book Computer Chess Compendium (pp. 213-219).[15]

B. V. Bowden describes the program in his 1953 work titled Faster Than Thought: Symposium on Digital Computing Machines. In his view, it can only serve as a crude example of the speed a program can reach and demonstrates the need for improvements in both hardware and programming to create a machine capable of playing chess against a human.[11] He believes that the program can be improved in several areas, particularly in terms of electronic memory usage. Better programming techniques could reduce calculation time by minimizing data exchanges between storage spaces.[11] He harshly criticizes the program, adding that if this rudimentary method of programming is the only option available, competition under reasonable conditions between the machine and a human is unrealistic. However, he softens his position by pointing out that the program solved a problem in just a few weeks of learning, which is a reasonable advance for a beginner player.[11] In 1972, Alex Bell also mentioned the program in his work on the history of computer chess programs, titled Games Playing with Computers. Like Bowden, he considers the program too rudimentary to compete with humans under reasonable conditions.[12] According to Copeland, Turing could likely have improved the program's source code, but he did not. Turing knew that brute-force search, when used alone, had no future, and he paid little attention to it.[2]

Prinz reports that once the program became functional, it was never used again. He adds that due to an increase in workload caused by the growing number of computers, he could no longer focus on minor tasks like programming chess games. Furthermore, a slightly more complex chess problem would, according to him, probably have required hours of calculations from a computer.[2] Later, Prinz wrote a manual for the Ferranti Mark I, which was a model of clarity, in contrast to those written by Turing, while continuing to work on computer music.[2]

References

[edit]
  1. ^ Borchers, Detlef (October 6, 2001). "Vor 50 Jahren fing alles an: das erste "Elektronenhirn" in Deutschland" [It all began 50 years ago: the first “electronic brain” in Germany]. Heise Online (in German). Archived from the original on December 12, 2024.
  2. ^ a b c d e f g h i j k l Copeland et al. 2017, pp. 339–342
  3. ^ a b c Barry Cooper & van Leeuwen 2013, p. 875
  4. ^ a b c "Ferranti Mark 1 Computer". Museum of Science and Industry. Archived from the original on April 22, 2016.
  5. ^ Napper, R.B.E. "Introduction to the Mark 1". The University of Manchester. Archived from the original on January 13, 2012.
  6. ^ a b c d e Copeland & Turing 2004, pp. 564–565, Chapter 16: The First Working Chess Programme
  7. ^ "Computer History Museum - Opening Moves: Origins of Computer Chess - First Tests". Computer History Museum. Archived from the original on February 16, 2019.
  8. ^ a b Dreher, Thomas. "IASLonline NetArt: Theory". IASLonline. Archived from the original on February 22, 2019.
  9. ^ "Computer Pioneers - Christopher Strachey". IEEE Computer History. Archived from the original on January 22, 2025.
  10. ^ a b Alvarez, Julian; Djaouti, Damien (2010). "Arcade : Les Pionniers du jeu vidéo" [Arcade: The pioneers of video games]. Pix'n Love (in French) (11). Éditions Pix'n Love: 32–43. ISBN 9782918272106.
  11. ^ a b c d e f g h i j k l m n Bowden 1953, pp. 286–287
  12. ^ a b c Bell 1972, Chapter 5: Some Chess Programs
  13. ^ a b Copeland, Jack (May 2000). "What is Artificial Intelligence?". Alanturing.net. Archived from the original on January 9, 2025.
  14. ^ a b c Kowert, Rachel; Quandt, Thorsten (2015). The Video Game Debate : Unravelling the Physical, Social, and Psychological Effects of Video Games. Routledge. p. 3. ISBN 978-1-317-56717-2.
  15. ^ Levy, David (1988). Computer chess compendium. New York: Springer New York. pp. 213–219. ISBN 978-1-4757-1968-0.

Bibliography

[edit]