Sargon 1978 UCI Available

Discussion of anything and everything relating to chess playing software and machines.

Moderators: Harvey Williamson, bob, hgm

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
JohnW
Posts: 202
Joined: Wed Nov 21, 2012 11:20 pm
Location: New Hampshire

Re: Sargon 1978 UCI Available

Post by JohnW » Fri May 29, 2020 1:02 pm

AdminX wrote:
Fri May 29, 2020 12:54 pm
JohnW wrote:
Fri May 29, 2020 12:50 pm
rcmaddox wrote:
Wed May 27, 2020 2:58 am
Bill Forster, author of the Tarrasch GUI, has released a UCI version of Sargon, the well known program from the Spracklens.

I had a copy of Sargon in the early 80's running on my Commodore VIC-20, using a black and white television for a monitor! It was my first chess software that wasn't in a dedicated chess computer.

So here ya go:

Main Tarrasch GUI Website ---->> http://www.triplehappy.com/
Link to Releveant Blog Post ---->> https://triplehappy.wordpress.com/
Is this really the same Sargon that ran on the Commodore VIC-20? I had the cartridge for that as well but it was Sargon 2.
From the 'Readme.md' file:

"The book "Sargon, a computer chess program", by Dan and Kathe Spracklen published by Hayden in 1978 presents the source code to the classic early chess program Sargon in Z80 assembly language. This is a project to bring the code presented in the book back to life in the modern era."
Ok, thank you..

By the way there is a free Commodore VIC-20\64 Emulator called WinVice and a Sargon 2 chess ROM you can download. I play it every once and a while, works great.

rcmaddox
Posts: 180
Joined: Mon Oct 14, 2013 6:59 pm
Location: Winder, GA
Full name: Robert C. Maddox

Re: Sargon 1978 UCI Available

Post by rcmaddox » Fri May 29, 2020 3:15 pm

JohnW wrote:
Fri May 29, 2020 12:50 pm
rcmaddox wrote:
Wed May 27, 2020 2:58 am
Bill Forster, author of the Tarrasch GUI, has released a UCI version of Sargon, the well known program from the Spracklens.

I had a copy of Sargon in the early 80's running on my Commodore VIC-20, using a black and white television for a monitor! It was my first chess software that wasn't in a dedicated chess computer.

So here ya go:

Main Tarrasch GUI Website ---->> http://www.triplehappy.com/
Link to Releveant Blog Post ---->> https://triplehappy.wordpress.com/
Is this really the same Sargon that ran on the Commodore VIC-20? I had the cartridge for that as well but it was Sargon 2.
I'm sure that my copy was an "evolved" version of Sargon, not the original edition. 8-)

User avatar
Scally
Posts: 135
Joined: Thu Sep 28, 2017 7:34 pm
Location: Bermondsey, London
Full name: Alan Cooper
Contact:

Re: Sargon 1978 UCI Available

Post by Scally » Fri May 29, 2020 4:36 pm

Hi all,

We have Sargon I running on the DGT Pi & Picochess, graded around 1000 Elo:

pi@MAME:/opt/picochess/engines/armv7l-turing $ ./sargon.sh
uci
id name SARGON I (1978)
id author Dan and Kathe Spracklen
option name Plymax type spin default 2 min 0 max 1024
option name NoBook type check default false
option name NoRandom type check default false
uciok


Al.
Alan Cooper
My Chess Computers

User avatar
mclane
Posts: 18122
Joined: Thu Mar 09, 2006 5:40 pm
Location: US of Europe, germany
Full name: Thorsten Czub
Contact:

Re: Sargon 1978 UCI Available

Post by mclane » Fri May 29, 2020 4:38 pm

Wasn't one difference between sargon 1 and 2 the permanent brain?
What seems like a fairy tale today may be reality tomorrow.
Here we have a fairy tale of the day after tomorrow....

User avatar
Tibono
Posts: 56
Joined: Sat Aug 01, 2015 4:16 pm
Location: France
Contact:

Re: Sargon 1978 UCI Available

Post by Tibono » Sat May 30, 2020 8:02 am

Hi,
great to have this UCI version, a nice gift from Bill Forster.

It is of course Sargon I (the one described in the Spracklen's book). Sargon II is much stronger, and permanent brain only starting from Sargon III (with Sargon 2.5/Boris 2.5 Applied Concept/Chafitz module introducing using opponent's thinking time, but not a permanent brain, as far as I know - search ends once the set level is reached).

I share a quick & easy, vintage logo Image (captured from Sargon I TRS80 emulation).

By the way, I compared both UCI/TRS-80 versions set at fixed depth 1; moves are indeed identical. Great job.
And UCI parameter FixedDepth set to 0 adapts the search depth to GUI's tournament time, that's smart.
BR

Bill Forster
Posts: 34
Joined: Mon Sep 21, 2015 5:47 am
Location: New Zealand
Contact:

Re: Sargon 1978 UCI Available

Post by Bill Forster » Tue Jun 02, 2020 12:07 am

Scally wrote:
Fri May 29, 2020 4:36 pm
Hi all,

We have Sargon I running on the DGT Pi & Picochess, graded around 1000 Elo:

pi@MAME:/opt/picochess/engines/armv7l-turing $ ./sargon.sh
uci
id name SARGON I (1978)
id author Dan and Kathe Spracklen
option name Plymax type spin default 2 min 0 max 1024
option name NoBook type check default false
option name NoRandom type check default false
uciok


Al.
Hello, is there any freely available information on how this port was accomplished? The porting process is as interesting to me as the actual result, and I put a lot of emphasis into that aspect with the presentation of my project. I am amused that Plymax is max 1024. If you set that value, you will be waiting long beyond the heat death of the universe, even if you start with bare kings I think :) I estimate in middle game positions, depth 13 would already take years sadly. :(

Bill Forster
Posts: 34
Joined: Mon Sep 21, 2015 5:47 am
Location: New Zealand
Contact:

Re: Sargon 1978 UCI Available

Post by Bill Forster » Tue Jun 02, 2020 12:13 am

Tibono wrote:
Sat May 30, 2020 8:02 am
By the way, I compared both UCI/TRS-80 versions set at fixed depth 1; moves are indeed identical. Great job.
And UCI parameter FixedDepth set to 0 adapts the search depth to GUI's tournament time, that's smart.
BR
Thank you sorry I missed this comment when it was posted. It is a lot to ask, so please feel free to ignore, but I would love a confirmation check that the right move is played at a higher fixed depth, 2 or 3 for example. And finally (again feel free to ignore) I'd love to know how long the emulation takes for a known position at depth 3 versus my native code port. I expect my port to run two or maybe three even orders of magnitude faster than the original Z80 on a modern PC. Sadly I don't expect to be able to ever confirm this, I can't find any reference position plus depth plus move played plus time elapsed for the original Z80 implementation.

User avatar
Scally
Posts: 135
Joined: Thu Sep 28, 2017 7:34 pm
Location: Bermondsey, London
Full name: Alan Cooper
Contact:

Re: Sargon 1978 UCI Available

Post by Scally » Tue Jun 02, 2020 9:50 am

Bill Forster wrote:
Tue Jun 02, 2020 12:07 am
Scally wrote:
Fri May 29, 2020 4:36 pm
Hi all,

We have Sargon I running on the DGT Pi & Picochess, graded around 1000 Elo:

pi@MAME:/opt/picochess/engines/armv7l-turing $ ./sargon.sh
uci
id name SARGON I (1978)
id author Dan and Kathe Spracklen
option name Plymax type spin default 2 min 0 max 1024
option name NoBook type check default false
option name NoRandom type check default false
uciok


Al.
Hello, is there any freely available information on how this port was accomplished? The porting process is as interesting to me as the actual result, and I put a lot of emphasis into that aspect with the presentation of my project. I am amused that Plymax is max 1024. If you set that value, you will be waiting long beyond the heat death of the universe, even if you start with bare kings I think :) I estimate in middle game positions, depth 13 would already take years sadly. :(
Hi Bill,

The GitHub site is here: https://github.com/tosca07/Lua4chess
You can see where that was forked from, I believe Dirk added the sargon_uci.lua which is the file we call within Picochess using lua:

cat sargon.sh
#!/bin/bash

cd /opt/picochess/engines/script_engines/Lua4chess;

lua sargon_uci.lua


This was added to our excellent Turing Engines collection thanks to Martin & Dirk, which may also interest you:

https://github.com/mdoege/PyTuroChamp


Cheers,

Al.
Alan Cooper
My Chess Computers

User avatar
Tibono
Posts: 56
Joined: Sat Aug 01, 2015 4:16 pm
Location: France
Contact:

Re: Sargon 1978 UCI Available

Post by Tibono » Tue Jun 02, 2020 2:14 pm

Bill Forster wrote:
Tue Jun 02, 2020 12:13 am
Thank you sorry I missed this comment when it was posted. It is a lot to ask, so please feel free to ignore, but I would love a confirmation check that the right move is played at a higher fixed depth, 2 or 3 for example. And finally (again feel free to ignore) I'd love to know how long the emulation takes for a known position at depth 3 versus my native code port. I expect my port to run two or maybe three even orders of magnitude faster than the original Z80 on a modern PC. Sadly I don't expect to be able to ever confirm this, I can't find any reference position plus depth plus move played plus time elapsed for the original Z80 implementation.
Hi Bill,
no worries, the gift you made us with this UCI port deserves feedback...
Here is a comparison table;
- UCI version running with Arena on my old laptop HP620, CPU T4500 @2,3Ghz (dual core), Win7 64bits, CPU & RAM win perf index = 5.8; time per move is the one reported by the Arena GUI
- TRS-80 version running with TRS32 emulator v1.27 (c) Matthew Reed http://www.trs-80emulators.com ; TRS-80 model 1 (Z80@1,77Mhz) but for this test I set it to x10 speed-up, so 17,74Mhz. Time per move manually measured with a (nice!) vintage mechanical stopwatch, 1/10s measurement accuracy, reported times already multiplied by 10 (so 1s accuracy or so).

Code: Select all

		Sargon I UCI lv2	Sargon I TRS-80 lv2	
		move	time(s)		move	time(s)
1.e2e4		e7e5	0,000		e7e5	0
2.g1f3		Nb8c6	0,006		Nb8c6	27,5
3.Bf1c4		Ng8f6	0,014		Ng8f6	58
4.Nf3g5		d7d5	0,014		d7d5	67
5.e4xd5		Nf6xd5	0,004		Nf6xd5	89
6.Nb1c3		Qd8xg5	0,025		Qd8xg5	163,5
7.Bc4xd5	Bc8g4	0,005		Bc8g4	70
8.Bd5xc6	b7xc6	0,006		b7xc6	25,5
9.f2f3		Bg4e6	0,005		Bg4e6	63
10.Qd1e2	0-0-0	0,014		0-0-0	83
11.Qe2a6	Kc8b8	0,000		Kc8b8	22
12.0-0		Bf8e7	0,016		Bf8e7	98
13.d2d4		Qg5f5	0,016		Qg5f5	82
14.d4xe5	Be7c5+	0,015		Be7c5+	85
15.Kg1h1	Qf5xe5	0,032		Qf5xe5	233
16.Qa6xc6	Qe5d6	0,046		Qe5d6	247
17.Qc6xd6	Bc5xd6	0,004		Bc5xd6	45
18.Bc1e3	Kb8b7	0,004		Kb8b7	55
19.Ra1d1	Be6c4	0,025		Be6c4	162
20.Rf1e1	Rh8e8	0,014		Rh8e8	157,5
Total time		0,265			1833
Average time		0,013			91,7
Speed ratio			6917	
				
		Sargon I UCI lv3	Sargon I TRS-80 lv3	
		move	time(s)		move	time(s)
1.e2e4		e7e5	0,000		e7e5	0
2.g1f3		Nb8c6	0,095		Nb8c6	646
3.Bf1c4		d7d6	0,135		d7d6	904
4.Nb1c3		Bc8e6	0,187		Bc8e6	1063
5.Bc4xe6	f7xe6	0,114		f7xe6	722
6.0-0		Ng8f6	0,125		Ng8f6	766
7.d2d3		d6d5	0,116		d6d5	729
8.Nf3g5		Qd8d6	0,154		Qd8d6	909
9.Nc3b5		Qd6e7	0,105		Qd6e7	629
10.Bc1e3	d5d4	0,135		d5d4	861
11.Be3d2	0-0-0	0,145		0-0-0	854
12.a2a4		a7a6	0,157		a7a6	912
13.Nb5a3	h7h6	0,125		h7h6	809
14.Ng5f3	Qe7c5	0,145		Qe7c5	876
15.Qd1e2	Bf8d6	0,205		Bf8d6	1235
16.Na3c4	Kc8d7	0,185		Kc8d7	1184
17.b2b3		Rd8b8	0,254		Rd8b8	1547
18.c2c3		d4xc3	0,216		d4xc3	1349
19.Bd2xc3	b7b5	0,455		b7b5	2718
20.a4xb5	a6xb5	0,236		a6xb5	1431
Total time		3,289		20144
Average time		0,164		1007,2
Speed ratio			6125	
100% moves fit!
The original Sargon ran on a Jupiter III - faster than a TRS-80 model I, but I am not sure of its original speed - I found references with 2 or 4.3Mhz. Mame emulates it @4Mhz.

Should you like a fast check of moves similarity, you can get this light emulator. It is not throttled for reference speed, and plays in few seconds at lv3. I replayed the fist ten moves from my above test at level 3, no move deviation as well :D

Cheers,
Tibono

Bill Forster
Posts: 34
Joined: Mon Sep 21, 2015 5:47 am
Location: New Zealand
Contact:

Re: Sargon 1978 UCI Available

Post by Bill Forster » Tue Jun 02, 2020 11:42 pm

Scally wrote:
Tue Jun 02, 2020 9:50 am
Bill Forster wrote:
Tue Jun 02, 2020 12:07 am
Scally wrote:
Fri May 29, 2020 4:36 pm
Hi all,

We have Sargon I running on the DGT Pi & Picochess, graded around 1000 Elo:

pi@MAME:/opt/picochess/engines/armv7l-turing $ ./sargon.sh
uci
id name SARGON I (1978)
id author Dan and Kathe Spracklen
option name Plymax type spin default 2 min 0 max 1024
option name NoBook type check default false
option name NoRandom type check default false
uciok


Al.
Hello, is there any freely available information on how this port was accomplished? The porting process is as interesting to me as the actual result, and I put a lot of emphasis into that aspect with the presentation of my project. I am amused that Plymax is max 1024. If you set that value, you will be waiting long beyond the heat death of the universe, even if you start with bare kings I think :) I estimate in middle game positions, depth 13 would already take years sadly. :(
Hi Bill,

The GitHub site is here: https://github.com/tosca07/Lua4chess
You can see where that was forked from, I believe Dirk added the sargon_uci.lua which is the file we call within Picochess using lua:

cat sargon.sh
#!/bin/bash

cd /opt/picochess/engines/script_engines/Lua4chess;

lua sargon_uci.lua


This was added to our excellent Turing Engines collection thanks to Martin & Dirk, which may also interest you:

https://github.com/mdoege/PyTuroChamp


Cheers,

Al.
Great work, line by line 8080/Z80 translation to Lua! What a great concept. Hopefully I will find some time to verify moves against my X86 translation. I love the Turing Engines collection too, plenty of great historical stuff there, thanks so much.

Post Reply