oldie but goody

Discussion of chess software programming and technical issues.

Moderators: bob, hgm, Harvey Williamson

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
Dann Corbit
Posts: 11221
Joined: Wed Mar 08, 2006 7:57 pm
Location: Redmond, WA USA
Contact:

Re: oldie but goody

Post by Dann Corbit » Sat Jun 13, 2020 3:36 pm

This is exciting news.
History is unfolding in our very eyes
Taking ideas is not a vice, it is a virtue. We have another word for this. It is called learning.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.

User avatar
mhull
Posts: 12841
Joined: Wed Mar 08, 2006 8:02 pm
Location: Dallas, Texas
Full name: Matthew Hull

Re: oldie but goody

Post by mhull » Sat Jun 13, 2020 10:27 pm

Dann Corbit wrote:
Sat Jun 13, 2020 3:36 pm
This is exciting news.
History is unfolding in our very eyes
One more thing to solve is a book file.

Code: Select all

book.f c     ******************************************************************
book.f c     *                                                                *
book.f c     *      book search the chess library of book moves for a         *
book.f c     *  response to the opponent's last move.  in most cases, there   *
book.f c     *  will be severalmoves to choose from.  the program will choose *
book.f c     *  a random move ignoring any 'poor' or '?' type moves that may  *
book.f c     *  be present.  this feature provides variety so that it is      *
book.f c     *  more difficult to find an area of weak play and captitalize   *
book.f c     *  on it over and over.  due to the structure of the book data   *
book.f c     *  base, this routine will never require over two i/o operations *
book.f c     *  to find a response making it very effective as a time-saver.  *
book.f c     *     a seperate program is used to construct the library of     *
book.f c     *  moves to keep unnecessary programming code out of the prime   *
book.f c     *  chess playing program.                                        *
book.f c     *                                                                *
book.f c     ******************************************************************
It would be nice if the original book building program mentioned in the comments could be located, or a book file that was created by it. Looks like the Cray Blitz book system is incompatible, having evolved a fair distance beyond this version.
Matthew Hull

User avatar
Rebel
Posts: 5349
Joined: Thu Aug 18, 2011 10:04 am

Re: oldie but goody

Post by Rebel » Sun Jun 14, 2020 7:06 pm

Speaking about old times, found this on my HD - http://rebel13.nl/old_photo's.pdf
90% of coding is debugging, the other 10% is writing bugs.

User avatar
mhull
Posts: 12841
Joined: Wed Mar 08, 2006 8:02 pm
Location: Dallas, Texas
Full name: Matthew Hull

Re: oldie but goody

Post by mhull » Sat Jul 18, 2020 10:20 pm

The Sigma 9 Fortran had extensions for the built-in functions, IAND and IEOR, both utilized in Blitz. Since none of the period IBM compilers include them, appropriate assembler subroutines have been built and linked-in.

BOOK: It may be possible to retro-fit the book from Cray Blitz included with Jim Ablett's port. The compressed move structures are similar.

BLITZ6

Code: Select all

C     *          XXXXCCCC PPPPTTTT DDDDDDDD SSSSSSSS                   *
C     *                                                                *
C     *      XXXX = UNUSED                                             *
C     *                                                                *
C     *      CCCC = CAPTURED PIECE (0=NONE)                            *
C     *                                                                *
C     *      PPPP = PROMOTION PIECE FOR PAWN PROMOTIONS (0=NONE)       *
C     *                                                                *
C     *      TTTT = MOVE TYPE AS FOWLOWS:                              *
C     *             1 = NORMAL MOVE                                    *
C     *             2 = CA8TLE KING-SIDE                               *
C     *             3 = CASTLE QUEEN-SIDE                              *
C     *             4 = ENPASSANT PAWN CAPTURE                         *
C     *             5 = PAWN PROMOTION (USING PPPP)                    *
C     *                                                                *
C     *      DDDDDDDD = DESTINATION SQUARE                             *
C     *                                                                *
C     *      SSSSSSSS = SOURCE SQUARE                                  *
C     *                                                                *
C     ******************************************************************
CRAY BLITZ

Code: Select all

c     ******************************************************************
c     *                                                                *
c     *      extrct is used to decode the compressed move that is      *
c     *  generated by the various move generators.  the move is kept   *
c     *  in the following 23-bit form except when being analyzed:      *
c     *                                                                *
c     *        mmmcc ctttdd ddddds ssssss                              *
c     *                                                                *
c     *      mmm  = moving piece                                       *
c     *                                                                *
c     *      ccc  = captured piece (0=none)                            *
c     *                                                                *
c     *      ttt  = move type as follows:                              *
c     *             0 = normal move                                    *
c     *             1 = castle king-side                               *
c     *             2 = castle queen-side                              *
c     *             3 = en passant pawn capture                        *
c     *             4 = pawn promotion to knight                       *
c     *             5 = pawn promotion to bishop                       *
c     *             6 = pawn promotion to rook                         *
c     *             7 = pawn promotion to queen                        *
c     *                                                                *
c     *      ddddddd  = destination square                             *
c     *                                                                *
c     *      sssssss  = source square                                  *
c     *                                                                *
c     ******************************************************************
Matthew Hull

User avatar
mhull
Posts: 12841
Joined: Wed Mar 08, 2006 8:02 pm
Location: Dallas, Texas
Full name: Matthew Hull

Re: oldie but goody

Post by mhull » Tue Jul 28, 2020 5:03 am

It is playing legal chess at the moment (at least through the first several moves), but not all the features are working. This example is computing at a fixed depth setting of 7. The computation times are accurate and I assume the node counts are also.

Code: Select all

 COMPUTATION TIME WAS    3:13
  
 YOUR MOVE, HERC03
S
  
 MOVE:  3  BOOK:  0  EXPECTED:  1
 DEPTH:  7  TIME: -24:36  RATIO: 2.4  EVAL:      74
 NODES:  632835  EVALS:  334647  LOOKUPS   2X  TABLE 100X
 RF8-B4 RC1-G5 RB4:C3 RB2:C3 RH7-H6 RG5:F6 RD8:F6
  
 YOUR MOVE, HERC03
D
  
                BLACK
  
   (R) (N) (B) (Q) (K)  *   +  (R)
  
   (P) (P) (P) (P)  *  (P) (P) (P)
  
    +   *   +   *  (P) (N)  +   *
  
    *   +   *   +   *   +   *   +
  
    +  (B)  +  :P: :P:  *   +   *
  
    *   +  :N:  +   *   +   *   +
  
   :P: :P: :P:  *   +  :P: :P: :P:
  
   :R:  +  :B: :Q: :K: :B: :N: :R:
  
  
                WHITE
  
 YOUR MOVE, HERC03
BD3
  
 ELAPSED TIME WAS    1:22
  
  
  
 MY MOVE IS C5
  
  
  
 COMPUTATION TIME WAS    5:27
  
 YOUR MOVE, HERC03

S
  
 MOVE:  4  BOOK:  0  EXPECTED:  1
 DEPTH:  7  TIME: -16:22  RATIO: 1.9  EVAL:      80
 NODES: 1220128  EVALS:  561760  LOOKUPS   1X  TABLE 100X
 RC7-C5 RD4:C5 RB4:C3+ RB2:C3 .....
  
 YOUR MOVE, HERC03
D
                BLACK
  
   (R) (N) (B) (Q) (K)  *   +  (R)
  
   (P) (P)  *  (P)  *  (P) (P) (P)
  
    +   *   +   *  (P) (N)  +   *
  
    *   +  (P)  +   *   +   *   +
  
    +  (B)  +  :P: :P:  *   +   *
  
    *   +  :N: :B:  *   +   *   +
  
   :P: :P: :P:  *   +  :P: :P: :P:
  
   :R:  +  :B: :Q: :K:  +  :N: :R:
  
  
                WHITE
  
 YOUR MOVE, HERC03


This emulator is running an IBM 3033. Back in the day it was rated about 1.5 MIPS (I think). It was a bit faster than the Xerox Sigma 9. On my dated AMD Machine (AMD Phenom II X4 830, 2.8 Ghz), it's clocking around 181 MIPS on one CPU.

The PV seems to have an R in front of each move for some reason.
Matthew Hull

Post Reply