Sargon 1978 - Bringing it back to life

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

Bill Forster
Posts: 76
Joined: Mon Sep 21, 2015 7:47 am
Location: New Zealand

Sargon 1978 - Bringing it back to life

Post by Bill Forster »

My Covid-19 lockdown project has been porting the Z80 assembly language version of Sargon that Dan and Kathe Spracklen presented in their 1978 book into Intel x86 assembly language and packaging the whole thing as a UCI chess engine. If you are interested I have refined the whole thing into a rather polished project (I think) and published the results on Github https://github.com/billforsternz/retro-sargon where you can read all about it, in as much detail as you could ever want.
RubiChess
Posts: 584
Joined: Fri Mar 30, 2018 7:20 am
Full name: Andreas Matthies

Re: Sargon 1978 - Bringing it back to life

Post by RubiChess »

Sargon II running on a Commodore VIC20 (coming on a cartridge) was my personal entrance to computer technology in 1982. Retro rules!! :-)

I will definitely have a look.
User avatar
Rebel
Posts: 6991
Joined: Thu Aug 18, 2011 12:04 pm

Re: Sargon 1978 - Bringing it back to life

Post by Rebel »

Bill Forster wrote: Wed May 20, 2020 3:35 am My Covid-19 lockdown project has been porting the Z80 assembly language version of Sargon that Dan and Kathe Spracklen presented in their 1978 book into Intel x86 assembly language and packaging the whole thing as a UCI chess engine. If you are interested I have refined the whole thing into a rather polished project (I think) and published the results on Github https://github.com/billforsternz/retro-sargon where you can read all about it, in as much detail as you could ever want.
Hillarious.

I still have the book as well.
90% of coding is debugging, the other 10% is writing bugs.
jdart
Posts: 4366
Joined: Fri Mar 10, 2006 5:23 am
Location: http://www.arasanchess.org

Re: Sargon 1978 - Bringing it back to life

Post by jdart »

Back around that time I did a lot of Z80 assembly programming, although not chess. I wrote a complete word processor in assembly.
User avatar
Steve Maughan
Posts: 1221
Joined: Wed Mar 08, 2006 8:28 pm
Location: Florida, USA

Re: Sargon 1978 - Bringing it back to life

Post by Steve Maughan »

Great project Bill! Keep us posted. I'd love to test it out when the time is right.

Steve
http://www.chessprogramming.net - Maverick Chess Engine
supersharp77
Posts: 1242
Joined: Sat Jul 05, 2014 7:54 am
Location: Southwest USA

Re: Sargon 1978 - Bringing it back to life

Post by supersharp77 »

Excellent Idea/Concept!.....How strong will it be? Can we make it Stronger/Deeper? Thx AR :D :wink:
Vinvin
Posts: 5228
Joined: Thu Mar 09, 2006 9:40 am
Full name: Vincent Lejeune

Re: Sargon 1978 - Bringing it back to life

Post by Vinvin »

Thanks for this gift !
No easy to beat in a blitz game !
User avatar
silentshark
Posts: 327
Joined: Sat Mar 27, 2010 7:15 pm

Re: Sargon 1978 - Bringing it back to life

Post by silentshark »

What a fab thing to do!

I sometimes think it would be interesting if we had access to versions of some of these classic progams in something like C, and could see what a few modern techniques would do to playing strength.

So something like Sargon 3 with null move and LMR and LMP. How would that play on modern hardware?
Bill Forster
Posts: 76
Joined: Mon Sep 21, 2015 7:47 am
Location: New Zealand

Re: Sargon 1978 - Bringing it back to life

Post by Bill Forster »

supersharp77 wrote: Wed May 20, 2020 9:04 pm Excellent Idea/Concept!.....How strong will it be? Can we make it Stronger/Deeper? Thx AR :D :wink:
I cover these questions extensively on the Github project page. Have a read, I tried hard to make it interesting and entertaining.
Bill Forster
Posts: 76
Joined: Mon Sep 21, 2015 7:47 am
Location: New Zealand

Re: Sargon 1978 - Bringing it back to life

Post by Bill Forster »

Rebel wrote: Wed May 20, 2020 8:19 am Hillarious.
Oh dear, I was going for Hillary ("Because it's there!", "We knocked the bastard off!") but I get Hilarious :D
Rebel wrote: Wed May 20, 2020 8:19 am I still have the book as well.
My project adds quite a lot of value to the book. For a start a byproduct of the project is the code in proper Z80 assembly language https://github.com/billforsternz/retro- ... on-z80.asm, rather than the weird TDL mnemonics. More importantly, although the book's code is well and fully commented, it's very much one comment per line stuff, and it's hard to discern how the code really works. Of course when I ported it, it didn't just spring to life, it had to be convinced! I was wading around in the muck, in the dark, trying to work out which way was up. When I finally succeeded I decided to turn my lemons into lemonade by preserving the insights I gained as much as possible. In particular, I made executable documentation - a kind of window into the code, in which Sargon draws little ascii art diagrams of the minimax and alpha-beta algorithms as they do their work. You can observe as you step through with a debugger or just capture everything in this single file https://github.com/billforsternz/retro- ... output.txt and study it after the fact. I was amazed how alpha-beta is implemented in a few lines of assembly, when I wrote a toy engine alpha-beta tied me up in knots. I suspect it's only a subset of full alpha-beta actually, not really my strength, perhaps you could take a look and let me know?