Vintage Chess Programming

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

smatovic
Posts: 2645
Joined: Wed Mar 10, 2010 10:18 pm
Location: Hamburg, Germany
Full name: Srdja Matovic

Re: Vintage Chess Programming

Post by smatovic »

What about the move generation?

I guess 0x88 would be a bit faster than Mailbox?

btw: the user inteface is ready:

Image

--
Srdja
smatovic
Posts: 2645
Joined: Wed Mar 10, 2010 10:18 pm
Location: Hamburg, Germany
Full name: Srdja Matovic

Re: Vintage Chess Programming

Post by smatovic »

The authors of the Northwestern Chess 4.x program noted that there was a benefit of having a transposition table with only 256 entries. However, that was with a program which had a speed of only about 400 nodes per second.
Wonder what kind of TT they used. Is the computation of 32 bit Zobrist Hashes worth for only 256 entries?

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

Chess 4.x

Post by sje »

smatovic wrote:
The authors of the Northwestern Chess 4.x program noted that there was a benefit of having a transposition table with only 256 entries. However, that was with a program which had a speed of only about 400 nodes per second.
Wonder what kind of TT they used. Is the computation of 32 bit Zobrist Hashes worth for only 256 entries?
On the CDC 6000 series mainframes, the CPU used 60 bit words. So I assume that the Chess 4.x program didn't have to much trouble doing 60 bit exclusive-or operations ("BXi BXj-BXk" to you Compass fans). The program report mentioned that each table entry was 96 bits long and the table was stored in ECS (Extended Core Storage) memory which had 64 bit words.
User avatar
nanochess
Posts: 64
Joined: Thu Feb 19, 2009 5:34 pm
Location: Mexico, Mexico

Re: Vintage Chess Programming

Post by nanochess »

Although you can program a chess program in C for 6502 (or Z80), if you want to implement a reasonable opponent in real hardware I would recommend strongly to write directly in assembler.
Several German chess machines Mephisto were based on 6502, and they were pretty good opponents.
All good things are difficult to achieve.
Toledo Nanochess book http://www.amazon.com/Toledo-Nanochess- ... 1304864375
mike_bike_kite
Posts: 98
Joined: Tue Jul 26, 2011 12:18 am
Location: London

Re: Vintage Chess Programming

Post by mike_bike_kite »

I started out doing 6502 machine code on an Acorn System 1. The assembler on my Acorn Atom made life much easier though. I still have that computer on the shelf behind me but I'd love to get hold of a system 1 just for old times sake.

Is there a comparison table anywhere to see the difference in performance between say assembler, basic, java, pascal, c, c++ etc?
User avatar
abik
Posts: 819
Joined: Fri Dec 01, 2006 10:46 pm
Location: Mountain View, CA, USA
Full name: Aart Bik

Re: Vintage Chess Programming

Post by abik »

smatovic wrote:Found an C Compiler for the 6502 familiy, cc65, runs fine with the atari800 emulator on Linux.
A while back, I wrote a 6510 cross-assembler (running on Windows, Linux, or MacOS) that supports the documented and undocumented opcodes of the 65xx family as well as many useful directives (no macros though). You can find this assembler on my Commodore 64 page.

Here you will also find a Commodore 64 port of Peter Jennings' famous Microchess, which was originally written in 1976 for the 6502 microprocessor of the Kim-1.
smatovic
Posts: 2645
Joined: Wed Mar 10, 2010 10:18 pm
Location: Hamburg, Germany
Full name: Srdja Matovic

Re: Vintage Chess Programming

Post by smatovic »

I did write a chess program for 6502 in those days (Usurpator II; it still competes in ChessWar through an emulator).
How many nodes per second does Ursurpator compute?

My current Version with an Mailbox Move Generator is quite slow, 10 NPS.

Search depth 3 needs about 3 Minutes for the starting position.

Perft without Evaluation makes about 75 NPS.

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

Re: Vintage Chess Programming

Post by sje »

See: http://www.brielcomputers.com/wordpress/?cat=5

The MicroKIM, a KIM-1 semi-replica for sale, kit or assembled. I have one of these and it's fun if not very powerful.
User avatar
hgm
Posts: 27790
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Vintage Chess Programming

Post by hgm »

smatovic wrote:How many nodes per second does Ursurpator compute?

My current Version with an Mailbox Move Generator is quite slow, 10 NPS.

Search depth 3 needs about 3 Minutes for the starting position.

Perft without Evaluation makes about 75 NPS.
That is very slow indeed. I have never really measured it for Usurpator. but even on a 1MHz 6502 it must have been around 500 NPS (with virtually no evaluation). Most 6502 instructions executed in 2 clocks. The inner loop of the move generator (to step a slider over the board) did only contain a couple of instructions. I am not sure we are comparing the same thing, however.
smatovic
Posts: 2645
Joined: Wed Mar 10, 2010 10:18 pm
Location: Hamburg, Germany
Full name: Srdja Matovic

Re: Vintage Chess Programming

Post by smatovic »

That is very slow indeed. I have never really measured it for Usurpator. but even on a 1MHz 6502 it must have been around 500 NPS (with virtually no evaluation). Most 6502 instructions executed in 2 clocks. The inner loop of the move generator (to step a slider over the board) did only contain a couple of instructions. I am not sure we are comparing the same thing, however.
hmm, i deactivated move sorting and move legality check, got 200 NPS,
have to code more hardware optimized i guess.

--
Srdja