Byte Chess 0.5 finally available. From Byte Magazine 1978

G

Guest

Guest
Archived from groups: rec.games.chess.computer (More info?)

To those of you not old enough to remember, Peter Frey and Larry Atkin
(co-author of Chess 2.x, 3.x and 4.x) published a chess program written in
Pascal, in the Byte Magazine in 1978 and 1979.

After all these years, it's finally been put into electronic form and made
available.

It's a classic chess program, just like Sargon. Although Chess05 was based
on a mainframe chess program, rather than being specifically designed for a
micro.

Currently, it's only available at:

http://www.moorecad.com/standardpascal/Chess05.pas

He hasn't yet posted the docs or the articles.

(However, if anybody else wants a complete copy, I can send it to them.
It's about 1.5meg.)


(As a side note, I discovered the 1978 book Sargon is also available on the
web. Plus, I have photocopies of the Byte articles about Sargon, but I
haven't gotten around to scanning them in and sending them to the guy who
did the book.)

I realize not everybody wants a 27 year old chess program. But some of us
still look upon it fondly. (I've recently been contemplating converting it
into C and try to do it in the style that Larry Atkin would have done. Just
to see what kind of performance you'd get from a more efficient language
than Pascal. I haven't gotten around to even starting, though.)

Other than Chess05.pas and Sargon, I don't think any of the other classic
programs are available on the web.

It sure would be nice to have Blitz, Cray-Blitz (or VaxBlitz), tBelle (or
was it TinkerBelle?), CHAOS, AWIT, NuCHESS, and so on. Of course, there's
no hope for discovering MacHack VI.

Those programs are a part of computer chess history, and it's a heck of a
shame that so many of them have been lost.

Things haven't improved any for modern chess programs, either. Just look at
how hard it is to find copies of the older GNU Chess, even! I could only
find a single place that had GNU Chess 1.55.


Here is the short doc file I wrote to go with the chess05.pas program.
(Unfortunately, that hasn't been posted on the web site yet, either.)


Chess 0.5, Release 2 - 2005-05-30

*********************************************************************************
If you find errors, please report them to the rec.games.chess.computer
newsgroup.
Please use a subject with "Byte Chess 0.5" in it to make it easily searched.
*********************************************************************************



Notes about Chess 0.5
*********************

This is a classic chess program written by Peter Frey and Larry Atkin in
1978.
Larry Atkin was the co-author of the famous "Chess" line of programs back in
the
1970's. At the time of the article, Chess was at about version 4.6.

This program, Chess 0.5, is based on his intimate knowledge of that program,
but is, of course, a brand new and seperate program.

The program was written in a very old (although new at the time) dialect of
Pascal. Technically it's called "Standard pascal", although that's a bit of
misnomer, since there is practically no standardization among Pascal
compilers.

It appears to have been written for the CDC 6000 line of computers, because
there are a few CDC 6000 specific routines to be used to make it run faster,
and because it was coded for that character set. (The CDC family used the
CDC 'Display' character set, and not ASCII.)

Chess 0.5 was published in Byte Magazine in November and December of 1978,
with
a couple of additional articles in October 1978 and January 1979.

The program was designed to be able to play chess vaguely well on the
hardware
of the time, and to do so with readable demonstration program.

It was not designed to play extremely well or for modern hardware. It was
not
designed for efficiency.

There were many techniques, ideas, and methods that were deliberately left
out
in order to keep the program as a demonstration program, and to let it run
on
limited hardware.

That doesn't mean it can't play a decent game if you adjust some settings to
let it search deep enough. But don't expect it to compare well against
modern
programs. Especially since the program is written for clairity in Pascal,
rather than for efficiency.

The value of the program is historical, not as a quality chess player.


I don't see an explicit copyright in the program or article, but I would
assume
that both Peter Frey and Larry Atkin still own it. However, I seriously
doubt
that either one of them woud care about the distribution of their 27 year
old
article and program.

If anything, I would expect them to be glad (and surprised) that anybody
still
cares about it, and looks upon it fondly.



About this copy
***************

My copy was originally a photocopy that was made in the late 80's.

I scanned it in and used the ABBYY FineReader OCR program on it.

Considering the small print of the original listing, and the quality of my
photocopy, I am impressed with its OCR abilities.

I am, however, significantly less than impressed with its abilities to
output
in a usable format.

If all you want is the OCR ability, then FineReader will probably do the
job.
But do NOT expect to be able to easily use the output!

If you need to work with the output, then you should definetly find another
OCR program, or expect to spend a lot of time trying to get it into a usable
format.


Reporting an error
******************

Since this was an OCR copy, it's possible there are still errors in it.

My copy was poor and the font was small, and it was hard for the program to
tell the difference betwwen M and N, and D and O, O and 0, 1 and l, 8 and
B,
and so on.

Pascal's type checking took care of most of that, but there were a few that
could be either one.

I'm pretty sure I've corrected all the important stuff, but there may still
be
errors. And of course, typo's in the comments.

I have also attempted to restore the original formatting of the program.

Also, there may be errors in the program itself, that aren't related my
work.

In function YRMHIT, a comment has the word "firt". That's a genuine typo
error in the original program.

There may or may not have been bug reports sent to Byte Magazine, Peter
Frey,
or Larry Atkin. I don't know.


******************************************************************************
If you spot any, please report them to the rec.games.chess.computer
newsgroup.
Please use a subject with "Byte Chess 0.5" in it to make it easily searched.
******************************************************************************



Compiling the program
*********************

The program uses interprocedural goto's, and procedural parameters. Both
are
standard, official Pascal, but most compilers don't bother to implement
them.
This does mean that Borland / Turbo Pascal can not compile it. The same for
FPC (Free Pascal Compiler).

In fact, most free compilers and most older compilers are not likely to have
bothered to implement official standard pascal, but only a subset with some
private extensions. (The Borland / Turbo pascal compilers are infamous.)

You can easily modify the program to not need the procedural parameters, but
the goto's are much more difficult to get rid of.

You will probably have to use the GNU Pascal compiler. It's the only free
pascal compiler that I know of that can handle it.


Changes to compile under GPC.

1) The constants AC and ZC aren't needed.

2) Type SC should be changed to
SC = SET OF CHAR;

3) Type 'RC' should be moved above RB

4) In RB, RBIS should be changed to type RC

5) Var MBORD should be changed to type RC

6) Var ATKTO should be changed to type RX

7) Var ATKFR should be changed to type RX

8) Var MOVES should be changed to type RF

9) Var VALUE should be changed to type RE

10) In RDRGNT, the statement:
WHILE (JNTJ < ZJ) AND (ORD(ILINE[JNTJ]) >= ORD('+')) DO
should be replaced with:
WHILE (JNTJ < ZJ) AND (NOT (ILINE[JNTJ] IN ['A'..'Z','0'..'9'])) DO

11) In RDRGNT, the statement:
WHILE (JNTJ < ZJ) AND (INTJ < ZA) AND (ILINE[JNTJ] IN ['A'..'9']) DO
should be replaced with:
WHILE (JNTJ < ZJ) AND (INTJ < ZA) AND
(ILINE[JNTJ] IN ['A'..'Z','0'..'9']) DO

12) In RDRGNT, the statement:
WHILE (INTJ < ZJ) AND (JNTJ < ZJ) AND (ILINE[JNTJ] IN ['A'..'9']) DO
should be replaced with:
WHILE (INTJ < ZJ) AND (JNTJ < ZJ) AND
(ILINE[JNTJ] IN ['A'..'Z','0'..'9']) DO

13) In BOACMD replace line:
IF ILINE[JNTJ] IN ['A'..'9'] THEN
with:
IF ILINE[JNTJ] IN ['A'..'Z','0'..'9'] THEN

14) In NCHIN, replace line:
AND ((ILINE[JNTJ]= ' ') OR (ORD(ILINE[JNTJ]) > ORD(ZC))) DO
with:
AND ((ILINE[JNTJ]= ' ') ) DO

15) The program uses double quote " to delimit strings, where as Pascal uses
single quote ' to do that. Either do a global search and replace, or
give
the compiler the --gnu-pascal switch.




Additional helpful changes
1) If desired, in function inicon, you can change the piece letters to
upper and lower case, instead of letters and numbers.
The CDC character set didn't have lower case.

2) In prinam, before the final write(' ') you can put
if (intf <> f8) then

3) In RDLINE, you might want to add the lines:
IF ( (ICARD[INTJ] >= 'a') AND (* LOWER CASE *)
(ICARD[INTJ] <= 'z') ) THEN
ICARD[INTJ] := CHR(ORD(ICARD[INTJ])-32); (*ASCII ONLY*)
The lines should be placed right after the line: read(icard[intj]);
This allows the program to understand lower case ASCII

4) In YRMOVE, right after LSTMOV, you can add the following lines to make
the program give you a list of the moves available. Just in case you
can't remember how to do classic chess move notation.
FOR INTW := AW TO JNTW-1 DO
BEGIN
MINENG(MOVES[intw],'');
WRITeln(intw:2,' ',movms);
END;


To realistically run this on non-8 bit micros (or anything with more than
a few hundred thousand instructions per second!), increase ZW to at least
1000 or so, and increase FNODEL, which controls how many nodes are searched.

FNODEL is basically the control of how deep you want to search and therefor
how long you search. Expect anywhere from 100 nodes per second on an old
old
computer, to 10,000 per second on newer hardware.

You might also want to increase ZK to 30 or so, but it's not required.



Running the program
*******************

Everything should be entered in upper case, unless you make the modification
suggested above.

Depending on the compiler used, the program may occasionally skip a full
line
of input! This is due to Pascal's infamous problem with keyboard input, and
dealing with EOLn, and so on.

Some compilers get it right, others don't. It obviously worked right with
the
original Pascal compiler the authors used, but it may not with yours.

There is no quick and easy fix because the failure may vary depending on
what
compiler you use, what library it uses, and so on.

With the version of GPC I used during debuggin, it would always miss the
first
line of input, the 'pause' line of input, and an occasional one depending on
what command I had just done.

This is only annoying, and doesn't actually effect play.


The first move listed with PM seems to be the move that was just made.
This is probably a feature.

Moves are entered using old style chess notation. You know, p-kb3 and that
kind of stuff. The program doesn't know about any fancy "algebraic"
notation.


The list of commands are:

BO - BOARD Set up a position
Start at the lower left. L means Lite, D means Dark. P, N, B, R, Q, K
should
be obvious. Empty square are done as a number 1-8.
board lrnbqkb1rpppp1ppp5n24p34dp33n4pppp1pppr1bqkbnr

EN - END program

GO - GO 'n' moves

IN - INITIALIZE for a new game

LE - LET (set) variable
FKPSHD
FKSANQ
FMAXMT
FNODEL
FPADQR
FPADQN
FPADQB
FPADQF
FPADKF
FPADKB
FPADKN
FPADKR
FPBLOK
FPCONN
FPFLNX
FRDUBL
FRK7TH
FTRADE
FTRDSL
FTRPDK
FTRPWN
FWKING
FWMAJM
FWMINM
FWPAWN
FWROOK
WINDOW

PB - Print attack map Boards
TO - to squares
FROM - from squares

PO - Print Other stuff

PL - Print 'Let' variables
FKPSHD
FKSANQ
FMAXMT
FNODEL
FPADQR
FPADQN
FPADQB
FPADQF
FPADKF
FPADKB
FPADKN
FPADKR
FPBLOK
FPCONN
FPFLNX
FRDUBL
FRK7TH
FTRADE
FTRDSL
FTRPDK
FTRPWN
FWKING
FWMAJM
FWMINM
FWPAWN
FWROOK
WINDOW

PM - Print Move list
Unfortunately, this wont be in english, but only as numbers.

PR - PRint board
An optional argument (anything) will show mbord.
Useful for verifying detecting errors in update & downdate.

ST - STatus change
D - Dark
EP - Enpassant (qr, qn, rb, q, k, kb, kn, kr)
G - set side to move
L - Lite
N - set move number
OO - allow king side castle
OOO - allow queen side castle

SW - SWitch xxx (on off or none to print)
EC - echo input
PA - paging
PS - print preliminary scores
RE - reply with move
SU - print statistics summary
TR - trace tree search

WH - WHat? reprint last message

Generally, only the first two letters are used to identify a command and
subcommand.


2005-05-30
Initial release

2005-05-30
A couple of typos in this doc were fixed.
Some strings were too long.
I forgot to convert some ' back to "
Fixed typo. "IMWALID MOVE"
A few misc. typos in comments.

2005-06-01
Typo in comment





----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
 
G

Guest

Guest
Archived from groups: rec.games.chess.computer (More info?)

On Wed, 1 Jun 2005 10:26:53 -0500, "I Forget" <No@spam.please> wrote:

>To those of you not old enough to remember, Peter Frey and Larry Atkin
>(co-author of Chess 2.x, 3.x and 4.x) published a chess program written in
>Pascal, in the Byte Magazine in 1978 and 1979.

Thanks, I downloaded it. It is going to require several modifications
to run under a modern Pascal compiler.

---
Replace you know what by j to email
 
G

Guest

Guest
Archived from groups: rec.games.chess.computer (More info?)

On Wed, 1 Jun 2005 10:26:53 -0500, "I Forget" <No@spam.please> wrote:
>
>(However, if anybody else wants a complete copy, I can send it to them.
>It's about 1.5meg.)

I would like to get it - j.mccranie (a) adelphia.net

Thank you.


---
Replace you know what by j to email
 
G

Guest

Guest
Archived from groups: rec.games.chess.computer (More info?)

On Wed, 1 Jun 2005 10:26:53 -0500, "I Forget" <No@spam.please> wrote:

>It's a classic chess program, just like Sargon. Although Chess05 was based
>on a mainframe chess program, rather than being specifically designed for a
>micro.

I have a book about Sargon with a complete listing, in assembler
(TRS-80, I think). Would that do you any good?

---
Replace you know what by j to email
 
G

Guest

Guest
Archived from groups: rec.games.chess.computer (More info?)

"Jud McCranie" <youknowwhat.mccranie@adelphia.net> wrote in message
news:ttsr91h92r6rf76jm5j19aocpvsgj4qjg0@4ax.com...
> On Wed, 1 Jun 2005 10:26:53 -0500, "I Forget" <No@spam.please> wrote:
>
> I have a book about Sargon with a complete listing, in assembler
> (TRS-80, I think). Would that do you any good?

It's already been scanned and made available on the web.

Right off hand I forget where, but it's there.

I had been thinking about scanning it myself when a friend pointed me to it.

And as a side note, the listing was Z-80 for a Wave Mate Jupiter III
computer, with the TLD assembler language.

It was written portably so that only minor modifications would be necessary
to port it to any z80 system.




----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
 
G

Guest

Guest
Archived from groups: rec.games.chess.computer (More info?)

"I Forget" <No@spam.please> wrote in message
news:429dd4b3$1_2@spool9-west.superfeed.net...

>
> I realize not everybody wants a 27 year old chess program. But some of us
> still look upon it fondly. (I've recently been contemplating converting
> it into C and try to do it in the style that Larry Atkin would have done.
> Just to see what kind of performance you'd get from a more efficient
> language than Pascal.


Pascal, as a language, is just as efficient, or more efficient, than C
(Pascal's unique set operators have no equivalent in C).

The issue is *compilers*, which is a totally different thing. C is more
mainstream and uses two-pass compilation.
More effort has been spent on generating efficient code, but that's 100% a
compiler detail, not a language issue, and might change in favor of Pascal
one day.

The only languages that are inherently slower than C are interpreted
languages (BASIC) or JITted languages (Java, C#), and there are a few
languages that, by their very design, are slower than C (Lisp comes to
mind). Pascal can do the same as C caan, and compiles to a similar
executable.

Just to set the record straight :)
 
G

Guest

Guest
Archived from groups: rec.games.chess.computer (More info?)

On Wed, 1 Jun 2005 18:26:10 +0200, "Frank de Groot"
<franciad@online.no> wrote:

>Pascal, as a language, is just as efficient, or more efficient, than C
>(Pascal's unique set operators have no equivalent in C).

....

> Pascal can do the same as C caan, and compiles to a similar
>executable.

I agree. The difference in execution speed would be small.

---
Replace you know what by j to email
 
G

Guest

Guest
Archived from groups: rec.games.chess.computer (More info?)

"Frank de Groot" <franciad@online.no> wrote in message
news:Qklne.11257$ai7.274581@news2.e.nsc.no...
> "I Forget" <No@spam.please> wrote in message
> news:429dd4b3$1_2@spool9-west.superfeed.net...
>
>
> Pascal, as a language, is just as efficient, or more efficient, than C
> (Pascal's unique set operators have no equivalent in C).

If you actually look at the program, you'd see that they "jump through
hoops" to do some of the operations.

Because of some of the limitations of the language, it's not done in as
straightforward maner.

*IN THEORY* a pascal program can be just as efficient.

But the language will make you work harder to achieve that. I used to be a
pascal programmer. I still have fond memories of it. But Pascal can make
you work harder to achieve certain things.

And because the program was designed for portability, the program doesn't
even come close to the level of performance it could have achieved more
easily with C.


> The issue is *compilers*, which is a totally different thing. C is more
> mainstream and uses two-pass compilation.

Some of the stuff could have even been done more efficiently (and certainly
more clearly and more easily) even with Small C.




----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
 
G

Guest

Guest
Archived from groups: rec.games.chess.computer (More info?)

COBOL is slower. Trust me on that!

John
"Frank de Groot" <franciad@online.no> wrote in message
news:Qklne.11257$ai7.274581@news2.e.nsc.no...
> "I Forget" <No@spam.please> wrote in message
> news:429dd4b3$1_2@spool9-west.superfeed.net...
>
>>
>> I realize not everybody wants a 27 year old chess program. But some of
>> us still look upon it fondly. (I've recently been contemplating
>> converting it into C and try to do it in the style that Larry Atkin would
>> have done. Just to see what kind of performance you'd get from a more
>> efficient language than Pascal.
>
>
> Pascal, as a language, is just as efficient, or more efficient, than C
> (Pascal's unique set operators have no equivalent in C).
>
> The issue is *compilers*, which is a totally different thing. C is more
> mainstream and uses two-pass compilation.
> More effort has been spent on generating efficient code, but that's 100% a
> compiler detail, not a language issue, and might change in favor of Pascal
> one day.
>
> The only languages that are inherently slower than C are interpreted
> languages (BASIC) or JITted languages (Java, C#), and there are a few
> languages that, by their very design, are slower than C (Lisp comes to
> mind). Pascal can do the same as C caan, and compiles to a similar
> executable.
>
> Just to set the record straight :)
>
>
>
>
 
G

Guest

Guest
Archived from groups: rec.games.chess.computer (More info?)

I Forget wrote:

>>I have a book about Sargon with a complete listing, in assembler
>>(TRS-80, I think). Would that do you any good?
>
>
> It's already been scanned and made available on the web.
>
> Right off hand I forget where, but it's there.

Google really impresses me :)

http://madscientistroom.org/chm/Sargon.html

Laurent
 
G

Guest

Guest
Archived from groups: rec.games.chess.computer (More info?)

On Thu, 02 Jun 2005 at 05:40 GMT, Laurent Desnogues wrote:
> I Forget wrote:
>
>>>I have a book about Sargon with a complete listing, in assembler
>>>(TRS-80, I think). Would that do you any good?
>>
>>
>> It's already been scanned and made available on the web.
>>
>> Right off hand I forget where, but it's there.
>
> Google really impresses me :)
>
> http://madscientistroom.org/chm/Sargon.html

My favourite line is:

"5. SARGON requires a minimum of 8K bytes of memory available for
user programs."


--
Chris F.A. Johnson <http://cfaj.freeshell.org>
==================================================================
Shell Scripting Recipes: A Problem-Solution Approach, 2005, Apress
<http://www.torfree.net/~chris/books/cfaj/ssr.html>
 
G

Guest

Guest
Archived from groups: rec.games.chess.computer (More info?)

It would be cool if someone developed various chess programs that played at
various strength intervals, say 1600, 1800, 2000, 2200, and could validate
that strength against human and computer opponents.

Does anyone know of an honest-go-goodness 2200 engine that would work with
the Fritz interface?

adp

"I Forget" <No@spam.please> wrote in message
news:429dd4b3$1_2@spool9-west.superfeed.net...
> To those of you not old enough to remember, Peter Frey and Larry Atkin
> (co-author of Chess 2.x, 3.x and 4.x) published a chess program written in
> Pascal, in the Byte Magazine in 1978 and 1979.
>
> After all these years, it's finally been put into electronic form and made
> available.
>
> It's a classic chess program, just like Sargon. Although Chess05 was
> based on a mainframe chess program, rather than being specifically
> designed for a micro.
>
> Currently, it's only available at:
>
> http://www.moorecad.com/standardpascal/Chess05.pas
>
> He hasn't yet posted the docs or the articles.
>
> (However, if anybody else wants a complete copy, I can send it to them.
> It's about 1.5meg.)
>
>
> (As a side note, I discovered the 1978 book Sargon is also available on
> the web. Plus, I have photocopies of the Byte articles about Sargon, but
> I haven't gotten around to scanning them in and sending them to the guy
> who did the book.)
>
> I realize not everybody wants a 27 year old chess program. But some of us
> still look upon it fondly. (I've recently been contemplating converting
> it into C and try to do it in the style that Larry Atkin would have done.
> Just to see what kind of performance you'd get from a more efficient
> language than Pascal. I haven't gotten around to even starting, though.)
>
> Other than Chess05.pas and Sargon, I don't think any of the other classic
> programs are available on the web.
>
> It sure would be nice to have Blitz, Cray-Blitz (or VaxBlitz), tBelle (or
> was it TinkerBelle?), CHAOS, AWIT, NuCHESS, and so on. Of course, there's
> no hope for discovering MacHack VI.
>
> Those programs are a part of computer chess history, and it's a heck of a
> shame that so many of them have been lost.
>
> Things haven't improved any for modern chess programs, either. Just look
> at how hard it is to find copies of the older GNU Chess, even! I could
> only find a single place that had GNU Chess 1.55.
>
>
> Here is the short doc file I wrote to go with the chess05.pas program.
> (Unfortunately, that hasn't been posted on the web site yet, either.)
>
>
> Chess 0.5, Release 2 - 2005-05-30
>
> *********************************************************************************
> If you find errors, please report them to the rec.games.chess.computer
> newsgroup.
> Please use a subject with "Byte Chess 0.5" in it to make it easily
> searched.
> *********************************************************************************
>
>
>
> Notes about Chess 0.5
> *********************
>
> This is a classic chess program written by Peter Frey and Larry Atkin in
> 1978.
> Larry Atkin was the co-author of the famous "Chess" line of programs back
> in the
> 1970's. At the time of the article, Chess was at about version 4.6.
>
> This program, Chess 0.5, is based on his intimate knowledge of that
> program,
> but is, of course, a brand new and seperate program.
>
> The program was written in a very old (although new at the time) dialect
> of
> Pascal. Technically it's called "Standard pascal", although that's a bit
> of
> misnomer, since there is practically no standardization among Pascal
> compilers.
>
> It appears to have been written for the CDC 6000 line of computers,
> because
> there are a few CDC 6000 specific routines to be used to make it run
> faster,
> and because it was coded for that character set. (The CDC family used the
> CDC 'Display' character set, and not ASCII.)
>
> Chess 0.5 was published in Byte Magazine in November and December of 1978,
> with
> a couple of additional articles in October 1978 and January 1979.
>
> The program was designed to be able to play chess vaguely well on the
> hardware
> of the time, and to do so with readable demonstration program.
>
> It was not designed to play extremely well or for modern hardware. It was
> not
> designed for efficiency.
>
> There were many techniques, ideas, and methods that were deliberately left
> out
> in order to keep the program as a demonstration program, and to let it run
> on
> limited hardware.
>
> That doesn't mean it can't play a decent game if you adjust some settings
> to
> let it search deep enough. But don't expect it to compare well against
> modern
> programs. Especially since the program is written for clairity in Pascal,
> rather than for efficiency.
>
> The value of the program is historical, not as a quality chess player.
>
>
> I don't see an explicit copyright in the program or article, but I would
> assume
> that both Peter Frey and Larry Atkin still own it. However, I seriously
> doubt
> that either one of them woud care about the distribution of their 27 year
> old
> article and program.
>
> If anything, I would expect them to be glad (and surprised) that anybody
> still
> cares about it, and looks upon it fondly.
>
>
>
> About this copy
> ***************
>
> My copy was originally a photocopy that was made in the late 80's.
>
> I scanned it in and used the ABBYY FineReader OCR program on it.
>
> Considering the small print of the original listing, and the quality of my
> photocopy, I am impressed with its OCR abilities.
>
> I am, however, significantly less than impressed with its abilities to
> output
> in a usable format.
>
> If all you want is the OCR ability, then FineReader will probably do the
> job.
> But do NOT expect to be able to easily use the output!
>
> If you need to work with the output, then you should definetly find
> another
> OCR program, or expect to spend a lot of time trying to get it into a
> usable
> format.
>
>
> Reporting an error
> ******************
>
> Since this was an OCR copy, it's possible there are still errors in it.
>
> My copy was poor and the font was small, and it was hard for the program
> to
> tell the difference betwwen M and N, and D and O, O and 0, 1 and l, 8 and
> B,
> and so on.
>
> Pascal's type checking took care of most of that, but there were a few
> that
> could be either one.
>
> I'm pretty sure I've corrected all the important stuff, but there may
> still be
> errors. And of course, typo's in the comments.
>
> I have also attempted to restore the original formatting of the program.
>
> Also, there may be errors in the program itself, that aren't related my
> work.
>
> In function YRMHIT, a comment has the word "firt". That's a genuine typo
> error in the original program.
>
> There may or may not have been bug reports sent to Byte Magazine, Peter
> Frey,
> or Larry Atkin. I don't know.
>
>
> ******************************************************************************
> If you spot any, please report them to the rec.games.chess.computer
> newsgroup.
> Please use a subject with "Byte Chess 0.5" in it to make it easily
> searched.
> ******************************************************************************
>
>
>
> Compiling the program
> *********************
>
> The program uses interprocedural goto's, and procedural parameters. Both
> are
> standard, official Pascal, but most compilers don't bother to implement
> them.
> This does mean that Borland / Turbo Pascal can not compile it. The same
> for
> FPC (Free Pascal Compiler).
>
> In fact, most free compilers and most older compilers are not likely to
> have
> bothered to implement official standard pascal, but only a subset with
> some
> private extensions. (The Borland / Turbo pascal compilers are infamous.)
>
> You can easily modify the program to not need the procedural parameters,
> but
> the goto's are much more difficult to get rid of.
>
> You will probably have to use the GNU Pascal compiler. It's the only free
> pascal compiler that I know of that can handle it.
>
>
> Changes to compile under GPC.
>
> 1) The constants AC and ZC aren't needed.
>
> 2) Type SC should be changed to
> SC = SET OF CHAR;
>
> 3) Type 'RC' should be moved above RB
>
> 4) In RB, RBIS should be changed to type RC
>
> 5) Var MBORD should be changed to type RC
>
> 6) Var ATKTO should be changed to type RX
>
> 7) Var ATKFR should be changed to type RX
>
> 8) Var MOVES should be changed to type RF
>
> 9) Var VALUE should be changed to type RE
>
> 10) In RDRGNT, the statement:
> WHILE (JNTJ < ZJ) AND (ORD(ILINE[JNTJ]) >= ORD('+')) DO
> should be replaced with:
> WHILE (JNTJ < ZJ) AND (NOT (ILINE[JNTJ] IN ['A'..'Z','0'..'9'])) DO
>
> 11) In RDRGNT, the statement:
> WHILE (JNTJ < ZJ) AND (INTJ < ZA) AND (ILINE[JNTJ] IN ['A'..'9']) DO
> should be replaced with:
> WHILE (JNTJ < ZJ) AND (INTJ < ZA) AND
> (ILINE[JNTJ] IN ['A'..'Z','0'..'9']) DO
>
> 12) In RDRGNT, the statement:
> WHILE (INTJ < ZJ) AND (JNTJ < ZJ) AND (ILINE[JNTJ] IN ['A'..'9']) DO
> should be replaced with:
> WHILE (INTJ < ZJ) AND (JNTJ < ZJ) AND
> (ILINE[JNTJ] IN ['A'..'Z','0'..'9']) DO
>
> 13) In BOACMD replace line:
> IF ILINE[JNTJ] IN ['A'..'9'] THEN
> with:
> IF ILINE[JNTJ] IN ['A'..'Z','0'..'9'] THEN
>
> 14) In NCHIN, replace line:
> AND ((ILINE[JNTJ]= ' ') OR (ORD(ILINE[JNTJ]) > ORD(ZC))) DO
> with:
> AND ((ILINE[JNTJ]= ' ') ) DO
>
> 15) The program uses double quote " to delimit strings, where as Pascal
> uses
> single quote ' to do that. Either do a global search and replace, or
> give
> the compiler the --gnu-pascal switch.
>
>
>
>
> Additional helpful changes
> 1) If desired, in function inicon, you can change the piece letters to
> upper and lower case, instead of letters and numbers.
> The CDC character set didn't have lower case.
>
> 2) In prinam, before the final write(' ') you can put
> if (intf <> f8) then
>
> 3) In RDLINE, you might want to add the lines:
> IF ( (ICARD[INTJ] >= 'a') AND (* LOWER CASE *)
> (ICARD[INTJ] <= 'z') ) THEN
> ICARD[INTJ] := CHR(ORD(ICARD[INTJ])-32); (*ASCII ONLY*)
> The lines should be placed right after the line: read(icard[intj]);
> This allows the program to understand lower case ASCII
>
> 4) In YRMOVE, right after LSTMOV, you can add the following lines to make
> the program give you a list of the moves available. Just in case you
> can't remember how to do classic chess move notation.
> FOR INTW := AW TO JNTW-1 DO
> BEGIN
> MINENG(MOVES[intw],'');
> WRITeln(intw:2,' ',movms);
> END;
>
>
> To realistically run this on non-8 bit micros (or anything with more than
> a few hundred thousand instructions per second!), increase ZW to at least
> 1000 or so, and increase FNODEL, which controls how many nodes are
> searched.
>
> FNODEL is basically the control of how deep you want to search and
> therefor
> how long you search. Expect anywhere from 100 nodes per second on an old
> old
> computer, to 10,000 per second on newer hardware.
>
> You might also want to increase ZK to 30 or so, but it's not required.
>
>
>
> Running the program
> *******************
>
> Everything should be entered in upper case, unless you make the
> modification
> suggested above.
>
> Depending on the compiler used, the program may occasionally skip a full
> line
> of input! This is due to Pascal's infamous problem with keyboard input,
> and
> dealing with EOLn, and so on.
>
> Some compilers get it right, others don't. It obviously worked right with
> the
> original Pascal compiler the authors used, but it may not with yours.
>
> There is no quick and easy fix because the failure may vary depending on
> what
> compiler you use, what library it uses, and so on.
>
> With the version of GPC I used during debuggin, it would always miss the
> first
> line of input, the 'pause' line of input, and an occasional one depending
> on
> what command I had just done.
>
> This is only annoying, and doesn't actually effect play.
>
>
> The first move listed with PM seems to be the move that was just made.
> This is probably a feature.
>
> Moves are entered using old style chess notation. You know, p-kb3 and
> that
> kind of stuff. The program doesn't know about any fancy "algebraic"
> notation.
>
>
> The list of commands are:
>
> BO - BOARD Set up a position
> Start at the lower left. L means Lite, D means Dark. P, N, B, R, Q, K
> should
> be obvious. Empty square are done as a number 1-8.
> board lrnbqkb1rpppp1ppp5n24p34dp33n4pppp1pppr1bqkbnr
>
> EN - END program
>
> GO - GO 'n' moves
>
> IN - INITIALIZE for a new game
>
> LE - LET (set) variable
> FKPSHD
> FKSANQ
> FMAXMT
> FNODEL
> FPADQR
> FPADQN
> FPADQB
> FPADQF
> FPADKF
> FPADKB
> FPADKN
> FPADKR
> FPBLOK
> FPCONN
> FPFLNX
> FRDUBL
> FRK7TH
> FTRADE
> FTRDSL
> FTRPDK
> FTRPWN
> FWKING
> FWMAJM
> FWMINM
> FWPAWN
> FWROOK
> WINDOW
>
> PB - Print attack map Boards
> TO - to squares
> FROM - from squares
>
> PO - Print Other stuff
>
> PL - Print 'Let' variables
> FKPSHD
> FKSANQ
> FMAXMT
> FNODEL
> FPADQR
> FPADQN
> FPADQB
> FPADQF
> FPADKF
> FPADKB
> FPADKN
> FPADKR
> FPBLOK
> FPCONN
> FPFLNX
> FRDUBL
> FRK7TH
> FTRADE
> FTRDSL
> FTRPDK
> FTRPWN
> FWKING
> FWMAJM
> FWMINM
> FWPAWN
> FWROOK
> WINDOW
>
> PM - Print Move list
> Unfortunately, this wont be in english, but only as numbers.
>
> PR - PRint board
> An optional argument (anything) will show mbord.
> Useful for verifying detecting errors in update & downdate.
>
> ST - STatus change
> D - Dark
> EP - Enpassant (qr, qn, rb, q, k, kb, kn, kr)
> G - set side to move
> L - Lite
> N - set move number
> OO - allow king side castle
> OOO - allow queen side castle
>
> SW - SWitch xxx (on off or none to print)
> EC - echo input
> PA - paging
> PS - print preliminary scores
> RE - reply with move
> SU - print statistics summary
> TR - trace tree search
>
> WH - WHat? reprint last message
>
> Generally, only the first two letters are used to identify a command and
> subcommand.
>
>
> 2005-05-30
> Initial release
>
> 2005-05-30
> A couple of typos in this doc were fixed.
> Some strings were too long.
> I forgot to convert some ' back to "
> Fixed typo. "IMWALID MOVE"
> A few misc. typos in comments.
>
> 2005-06-01
> Typo in comment
>
>
>
>
>
> ----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet
> News==----
> http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+
> Newsgroups
> ----= East and West-Coast Server Farms - Total Privacy via Encryption
> =----
 
G

Guest

Guest
Archived from groups: rec.games.chess.computer (More info?)

"Chris F.A. Johnson"
>
> My favourite line is:
>
> "5. SARGON requires a minimum of 8K bytes of memory available for
> user programs."

You youngin's got no respect for the way things were back then!

I readily admit I wasn't using a home computer in 78. I didn't get mine
until 82.

But I remember when computers shipped with 4k. When 8k and 16k were a lot
of memory. I remember when 64k dropped below us$64.

As for the chess program...

Don't forget, it's possible to run a chess program in less ram. Atari 2600
chess used 128 bytes of ram, with 4k in rom. You do a MyChess trick and
store the piece locations, rather than the board. A few move indexing
variables, and so on, and it can all fit into 128 bytes, with a few bytes
left over.

There have been a few since using the 8051 processor with about the same
amount of memory.

And back then, there were a couple small chess programs (that barely played
chess) that fit into 1k or 2k. The Sinclair had one, but I don't think it
was the first.

I think the earliest was probably the Kim-1, in 76, which also used 1k.
That would have been an early version of MicroChess.

I had a version, but mine was a later bigger, stronger version.



----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
 
G

Guest

Guest
Archived from groups: rec.games.chess.computer (More info?)

"I Forget" <No@spam.please> wrote in message
news:429e449c$1_2@spool9-west.superfeed.net...

> If you actually look at the program, you'd see that they "jump through
> hoops" to do some of the operations.
>
> Because of some of the limitations of the language, it's not done in as
> straightforward maner.
>
> *IN THEORY* a pascal program can be just as efficient.
>
> But the language will make you work harder to achieve that.


I know what you mean and I agree. In Pascal, pointer arithmatic is terribly
convoluted (requiring multiple casts to add a variable to a pointer).
But still, that's a syntax "problem".
 
G

Guest

Guest
Archived from groups: rec.games.chess.computer (More info?)

"Frank de Groot" <franciad@online.no> wrote in message
news:ICFne.11345$ai7.276538@news2.e.nsc.no...
> "I Forget" <No@spam.please> wrote in message
> news:429e449c$1_2@spool9-west.superfeed.net...
>
>> *IN THEORY* a pascal program can be just as efficient.
>>
>> But the language will make you work harder to achieve that.
>
> I know what you mean and I agree. In Pascal, pointer arithmatic is
> terribly convoluted (requiring multiple casts to add a variable to a
> pointer).

I'm not sure ISO7185 pascal allows pointer casts. Once the initial pointer
is typed, I think you are stuck with it. I could be wrong, though. The
only Pascal's I've used were a bit more relaxed than what it is.

When most people think of pascal, they think of various extended versions,
such as Turbo Pascal, and so on. Those often have a lot of extra
functionality that can make programming easier.

In most Pascal's today, the restrictions have been relaxed, and some of the
limitations removed.

Larry Atkin did an excellent job in writting Chess 0.5

I *strongly* suspect it was heavily based on Chess 4.6, which was written in
COMPASS, a macro assembly language for the CDC.

The fact that he managed to convert it to such a strongly typed and
structured lanague like Pascal is a testimant to the quality of the original
programming!

He still had to work around some limitations and inconveniences in Pascal,
and he had to use a few GOTO's, which certainly annoy some people, but he
did a darn fine job.

It really would be interesting to convert it to C, clean it up to a more
normal structure, remove some of the tutorial and portability aspects (does
anybody today need 16 bit compatability?), and so on, and see what kind of
performance it would really have.

I guarantee it could give Crafty a run for its money. (Provided crafty is
running on an 4.77mhz 8088, of course...[grin])

There were two programs that were derived from it. Merlin and Shy, back in
the early 80's.


> But still, that's a syntax "problem".

But you were saying that it was a compiler detail.

That C was more efficient because it was a 2 pass compiler, and so on.

A 'syntax problem' is a Pascal problem.

A language is defined by the syntax.


It would be somewhat interesting to see if you could write it in Small-C.
That would be very much in the spirit of the original article....




----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
 
G

Guest

Guest
Archived from groups: rec.games.chess.computer (More info?)

"I Forget" <No@spam.please> wrote in message
news:429f5b70$1_1@spool9-west.superfeed.net...

> I'm not sure ISO7185 pascal allows pointer casts.

I'm not sure many people still program in ISO7185 pascal.


> But you were saying that it was a compiler detail.
>
> That C was more efficient because it was a 2 pass compiler, and so on.
>
> A 'syntax problem' is a Pascal problem.
>
> A language is defined by the syntax.


You misunderstand. I said Pascal is not slower than C, as a langage.
The fact that you need to TYPE more to cast a pointer, is a SYNTAX problem,
not a LANGUAGE-SPEED problem or a compiler generated-code speed problem.
Only a "typing speed" problem :)