Sargon 1978 UCI Available

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

Moderators: hgm, Rebel, chrisw

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

Re: Sargon 1978 UCI Available

Post by Bill Forster »

Chessqueen wrote: Tue Feb 09, 2021 8:20 pm It is NOT my fault that TTE chose a different move after 19.Nc4..... what do I have to do with it
Well if you tell one engine (TTE in this case) that it has no time, it is really your fault. Engines given no time effectively will just report a move, any move. TTE will sort a static evaluation, that's all. Detecting a threatened fork and responding appropriately takes a least an extra ply or two.

I am going to step away from this thread (unless for example Larry Kaufman wants to pick up his discussion of Sargon's speed, or the repetition problem, now that I have put more work into those). A lot of the discussion is pointless and goes around and around forever. It's not good for one's mental health.

I will also be interested if the expert testers (like Guenther) report back on the strength of V1.01 versus V1.00. I expect a modest Elo increase. If Sargon 1978 V1.00 is 1300, and TTE is 1450, I expect Sargon 1978 V1.01 to be somewhere in between, for reasons discussed earlier.

Strength of ancient and primitive chess engines must be one of the most niche interests on the internet. My apologies for taking up space with this stuff when most people here are much more interested in tuning 3500+ Elo monsters, and rightfully so!
mephisto
Posts: 430
Joined: Mon Apr 03, 2006 10:10 am
Location: England

Re: Sargon 1978 UCI Available

Post by mephisto »

Hi Bill

As you are now "stepping away" from this post, I would just like to thank you for this project. Being a collector of old chess computers including many Dan & Kathe Spraklen Fidelity models for many years, it is nice to now be able to play against their original creation.

Regards from England
Bryan
What's my next move? - to the fridge for another beer !!
Chessqueen
Posts: 5588
Joined: Wed Sep 05, 2018 2:16 am
Location: Moving
Full name: Jorge Picado

Re: Sargon 1978 UCI Available

Post by Chessqueen »

Bill Forster wrote: Wed Feb 10, 2021 12:30 am
Chessqueen wrote: Tue Feb 09, 2021 8:20 pm It is NOT my fault that TTE chose a different move after 19.Nc4..... what do I have to do with it
Well if you tell one engine (TTE in this case) that it has no time, it is really your fault. Engines given no time effectively will just report a move, any move. TTE will sort a static evaluation, that's all. Detecting a threatened fork and responding appropriately takes a least an extra ply or two.

I am going to step away from this thread (unless for example Larry Kaufman wants to pick up his discussion of Sargon's speed, or the repetition problem, now that I have put more work into those). A lot of the discussion is pointless and goes around and around forever. It's not good for one's mental health.

I will also be interested if the expert testers (like Guenther) report back on the strength of V1.01 versus V1.00. I expect a modest Elo increase. If Sargon 1978 V1.00 is 1300, and TTE is 1450, I expect Sargon 1978 V1.01 to be somewhere in between, for reasons discussed earlier.

Strength of ancient and primitive chess engines must be one of the most niche interests on the internet. My apologies for taking up space with this stuff when most people here are much more interested in tuning 3500+ Elo monsters, and rightfully so!

Well I did NOT tell TTE that it has no time, but I will NOT test sargon anymore, especially after I performed these STS tests .

STS (v5.0) - Bishop vs Knight and

STS (v8.0) - Advancement of the f/g/h Pawns

When I saw the score I did NOT wanted to perform any of the other STS Tests. You are correct both programs are too primitives, but still better than those 3500+ Elo monsters for the 75% of the Chess players of the World to play against them and still have fun . :roll: :lol: :mrgreen:
Who is 17 years old GM Gukesh 2nd at the Candidate in Toronto?
https://indianexpress.com/article/sport ... t-9281394/
User avatar
Tibono
Posts: 79
Joined: Sat Aug 01, 2015 6:16 pm
Location: France

Re: Sargon 1978 UCI Available

Post by Tibono »

@Chessqueen: :idea: please check your PMs... :wink:
Cheers,
Tibono
Chessqueen
Posts: 5588
Joined: Wed Sep 05, 2018 2:16 am
Location: Moving
Full name: Jorge Picado

Re: Sargon 1978 UCI Available

Post by Chessqueen »

Tibono wrote: Wed Feb 10, 2021 8:09 pm @Chessqueen: :idea: please check your PMs... :wink:
Cheers,
Tibono
I will, thanks, very much. I was NOT trying to make sargon win or get any advantages simply I was testing it to see if certain small debug could be performed before the final version could be released, but that would completely make it another engine NOT sargon 1978 and I understood correctly, as you see I also performed several Bullet tests to see how sargon play or show its weakness like this stalemate with plenty of material to checkmate TTE. I can post the log if somebody request me to do it but at bullet TC with Depth =0 in the majority of the games 60% sargon was beating TTE and failed to checkmate TTE. Yes sargon and TTE are really really primitives engines, but better for the 75% of the World chess players to play against since against 3500+ engines NOT even the best 5 players of the World have a chance unless 2 pawns Odds are giving to the humans :roll:

[pgn][Event "Computer chess game"]
[Site "DESKTOP-OFQ3C0P"]
[Date "2021.01.24"]
[Round "?"]
[White "Sargon-engine"]
[Black "TarraschToyEngineV0.906"]
[Result "1/2-1/2"]
[BlackElo "1480"]
[ECO "A00"]
[Opening "Van Kruij's Opening"]
[Time "13:06:08"]
[WhiteElo "????"]
[TimeControl "60+1"]
[Termination "normal"]
[PlyCount "139"]
[WhiteType "program"]
[BlackType "program"]

1. e3 d5 2. Nc3 Nc6 3. Bb5 Nf6 4. Nf3 g6 5. O-O Bg4 6. h3 Bxf3 7. Qxf3 Qd7
8. Bxc6 bxc6 9. b3 Bh6 10. Bb2 O-O 11. g4 c5 12. Kg2 d4 13. Na4 Qd6 14. h4
dxe3 15. g5 exd2 16. gxh6 Nh5 17. Qe4 Nf4+ 18. Kf3 Ne6 19. Be5 Qd7 20. Rg1
Rad8 21. Rad1 f5 22. Qc4 Qd5+ 23. Qxd5 Rxd5 24. Bc3 Rfd8 25. Ke3 f4+ 26.
Ke4 Rh5 27. Rxd2 Rd6 28. Rxd6 cxd6 29. Rg4 Rxh6 30. Bd2 Rh5 31. Bxf4 d5+
32. Kd3 Rf5 33. Bb8 a6 34. f4 Kf7 35. Ke3 h5 36. Rg1 d4+ 37. Ke4 Kg7 38.
Be5+ Kf7 39. a3 a5 40. Rg3 Nd8 41. Nxc5 Nc6 42. Rf3 e6 43. Nb7 Ke7 44. Rg3
Nxe5 45. fxe5 Rf2 46. Rxg6 Rxc2 47. Nxa5 Rh2 48. Nc6+ Kd7 49. Nxd4 Rxh4+
50. Kd3 Rg4 51. Rh6 Rg5 52. Rxe6 Rg8 53. Rd6+ Kc7 54. Rh6 Rg2 55. Rxh5 Rg6
56. Rh7+ Kc8 57. Nf5 Rg2 58. Ne3 Rb2 59. Kc3 Rf2 60. a4 Rf3 61. Kd4 Kd8 62.
Ke4 Rf2 63. Nc4 Rg2 64. Kf3 Rc2 65. Rh8+ Kc7 66. Rh7+ Kc6 67. Ke4 Rg2 68.
Ne3 Rd2 69. Nc4 Rd4+ 70. Kxd4 {Stalemate} 1/2-1/2[/pgn]
Who is 17 years old GM Gukesh 2nd at the Candidate in Toronto?
https://indianexpress.com/article/sport ... t-9281394/
Chessqueen
Posts: 5588
Joined: Wed Sep 05, 2018 2:16 am
Location: Moving
Full name: Jorge Picado

Re: Sargon 1978 UCI Available

Post by Chessqueen »

Bill Forster wrote: Wed Feb 10, 2021 12:30 am
Chessqueen wrote: Tue Feb 09, 2021 8:20 pm It is NOT my fault that TTE chose a different move after 19.Nc4..... what do I have to do with it
Well if you tell one engine (TTE in this case) that it has no time, it is really your fault. Engines given no time effectively will just report a move, any move. TTE will sort a static evaluation, that's all. Detecting a threatened fork and responding appropriately takes a least an extra ply or two.

I am going to step away from this thread (unless for example Larry Kaufman wants to pick up his discussion of Sargon's speed, or the repetition problem, now that I have put more work into those). A lot of the discussion is pointless and goes around and around forever. It's not good for one's mental health.

I will also be interested if the expert testers (like Guenther) report back on the strength of V1.01 versus V1.00. I expect a modest Elo increase. If Sargon 1978 V1.00 is 1300, and TTE is 1450, I expect Sargon 1978 V1.01 to be somewhere in between, for reasons discussed earlier.

Strength of ancient and primitive chess engines must be one of the most niche interests on the internet. My apologies for taking up space with this stuff when most people here are much more interested in tuning 3500+ Elo monsters, and rightfully so!

Bill, you are correct if Sargon 1978 V1.00 is 1300, and TTE is 1450 sargon is in between, I ran 1000 Bullets games and TTE won 560 to 440 :roll:
Who is 17 years old GM Gukesh 2nd at the Candidate in Toronto?
https://indianexpress.com/article/sport ... t-9281394/
User avatar
MikeB
Posts: 4889
Joined: Thu Mar 09, 2006 6:34 am
Location: Pen Argyl, Pennsylvania

Re: Sargon 1978 UCI Available

Post by MikeB »

This is about entertaining as it gets , when reading a PDF file.

A wonderful interview with the Spracklens in 2005 and how they got started in computers and chess.

http://archive.computerhistory.org/proj ... 630821.pdf
Image
Phillip Eaton
Posts: 5
Joined: Sun Apr 04, 2021 2:00 am
Full name: Phillip Eaton

Re: Sargon 1978 UCI Available

Post by Phillip Eaton »

Tibono wrote: Tue Jun 02, 2020 4:14 pm 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
- Vectrex game console version running on physical hardware in real time via interactive Forth terminal command prompt and a development RAM cartridge (6809@1,5Mhz)

Code: Select all

                Sargon I UCI lv2        Sargon I TRS-80 lv2     Sargon I Vectrex lv2
                move    time(s)         move    time(s)         move    time(s)
1.e2e4          e7e5    0,000           e7e5    0               e7e5    0        Vec/TRS
2.g1f3          Nb8c6   0,006           Nb8c6   27,5            Nb8c6   19       69%
3.Bf1c4         Ng8f6   0,014           Ng8f6   58              Ng8f6   30       52%
4.Nf3g5         d7d5    0,014           d7d5    67              d7d5    36       54%
5.e4xd5         Nf6xd5  0,004           Nf6xd5  89              Nf6xd5  46       52%
6.Nb1c3         Qd8xg5  0,025           Qd8xg5  163,5           Qd8xg5  83       51%
7.Bc4xd5        Bc8g4   0,005           Bc8g4   70              Bc8g4   34       49%
8.Bd5xc6        b7xc6   0,006           b7xc6   25,5            b7xc6   12       47%
9.f2f3          Bg4e6   0,005           Bg4e6   63              Bg4e6   30       48%
10.Qd1e2        0-0-0   0,014           0-0-0   83              0-0-0   41       49%
11.Qe2a6        Kc8b8   0,000           Kc8b8   22              Kc8b8   10       45%
12.0-0          Bf8e7   0,016           Bf8e7   98              Bf8e7   48       49%
13.d2d4         Qg5f5   0,016           Qg5f5   82              Qg5f5   40       49%
14.d4xe5        Be7c5+  0,015           Be7c5+  85              Be7c5+  42       49%
15.Kg1h1        Qf5xe5  0,032           Qf5xe5  233             Qf5xe5  117      50%
16.Qa6xc6       Qe5d6   0,046           Qe5d6   247             Qe5d6   128      52%
17.Qc6xd6       Bc5xd6  0,004           Bc5xd6  45              Bc5xd6  21       47%
18.Bc1e3        Kb8b7   0,004           Kb8b7   55              Kb8b7   26       47%
19.Ra1d1        Be6c4   0,025           Be6c4   162             Be6c4   83       51%
20.Rf1e1        Rh8e8   0,014           Rh8e8   157,5           Rh8e8   80       51%
Total time              0,265                   1833                    926      51%
Average time            0,013                   91,7                    46,3
Speed ratio                     6917    
                                
                Sargon I UCI lv3        Sargon I TRS-80 lv3     Sargon I Vectrex lv2
                move    time(s)         move    time(s)         move    time(s)
1.e2e4          e7e5    0,000           e7e5    0               e7e5    0
2.g1f3          Nb8c6   0,095           Nb8c6   646             Nb8c6   335
3.Bf1c4         d7d6    0,135           d7d6    904             d7d6    469
4.Nb1c3         Bc8e6   0,187           Bc8e6   1063            Bc8e6   503
5.Bc4xe6        f7xe6   0,114           f7xe6   722             f7xe6   374
6.0-0           Ng8f6   0,125           Ng8f6   766             Ng8f6   399
7.d2d3          d6d5    0,116           d6d5    729             d6d5    379
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
Tibono wrote: Tue Jun 02, 2020 4:14 pm 100% moves fit!
Same for this Vectrex version.

6809 code history:
- Original non-working Sargon 6809 partial source code port entitled H A N O C H - 9 (12/10/79 --- BRIAN F. BAILEY ).
- Almost working update by ReFLEX emulator author, Ben Williams sometime before 1997. (Full gameplay, but POINTS move list evaluation only working sometimes). Source code unfortunately lost.
- ReFLEX version reverse engineered, reassembled to Vectrex memory map and debugged/fixed XCHNG routine to make POINTS board evaluation correct, Phillip Eaton, 2021-04-03.

Level 3 in real-time will take a while, I'll update the table over the coming days.
Phillip Eaton
Posts: 5
Joined: Sun Apr 04, 2021 2:00 am
Full name: Phillip Eaton

Re: Sargon 1978 UCI Available

Post by Phillip Eaton »

It appears I can't edit/update my previous post :?

But nonetheless, I have updated the table, below. Because I'm running interactive Forth on my Vectrex, I was able to script the core Sargon engine subroutines and so left it running the test games in real time, logging the results with timestamps via the interactive TeraTerm terminal. Then, I pasted the log into Excel, put on a filter and some timing calculations and voila, an updated table.

For the Level 3 games, the middle game speed compared to the TRS is very consistent.

I noticed someone had put a Level 4 game list near the start of the thread. I was tempted to script that, but if it's going to be another magnitude of time to run it, that's over a day of processing, perhaps two, as it's 50 moves - what's the point?

Code: Select all

                Sargon I UCI lv2        Sargon I TRS-80 lv2     Sargon I Vectrex lv2
                move    time(s)         move    time(s)         move    time(s) Vec/TRS
1.e2e4          e7e5    0,000           e7e5    0               e7e5      0.4    
2.g1f3          Nb8c6   0,006           Nb8c6   27,5            Nb8c6    17.0   62%
3.Bf1c4         Ng8f6   0,014           Ng8f6   58              Ng8f6    29.9   52%
4.Nf3g5         d7d5    0,014           d7d5    67              d7d5     36.0   54%
5.e4xd5         Nf6xd5  0,004           Nf6xd5  89              Nf6xd5   46.1   52%
6.Nb1c3         Qd8xg5  0,025           Qd8xg5  163,5           Qd8xg5   82.7   51%
7.Bc4xd5        Bc8g4   0,005           Bc8g4   70              Bc8g4    34.1   49%
8.Bd5xc6        b7xc6   0,006           b7xc6   25,5            b7xc6    11.8   46%
9.f2f3          Bg4e6   0,005           Bg4e6   63              Bg4e6    30.5   48%
10.Qd1e2        0-0-0   0,014           0-0-0   83              0-0-0    40.8   49%
11.Qe2a6        Kc8b8   0,000           Kc8b8   22              Kc8b8     9.6   44%
12.0-0          Bf8e7   0,016           Bf8e7   98              Bf8e7    47.6   49%
13.d2d4         Qg5f5   0,016           Qg5f5   82              Qg5f5    40.6   49%
14.d4xe5        Be7c5+  0,015           Be7c5+  85              Be7c5+   42.4   50%
15.Kg1h1        Qf5xe5  0,032           Qf5xe5  233             Qf5xe5  117.5   50%
16.Qa6xc6       Qe5d6   0,046           Qe5d6   247             Qe5d6   127.7   52%
17.Qc6xd6       Bc5xd6  0,004           Bc5xd6  45              Bc5xd6   21.4   48%
18.Bc1e3        Kb8b7   0,004           Kb8b7   55              Kb8b7    26.7   49%
19.Ra1d1        Be6c4   0,025           Be6c4   162             Be6c4    82.7   51%
20.Rf1e1        Rh8e8   0,014           Rh8e8   157,5           Rh8e8    80.2   51%
Total time              0,265                   1833                    925.6   50%
Average time            0,013                   91,7                     46.3    
Speed ratio                     6917                     1.98
                                
                Sargon I UCI lv3        Sargon I TRS-80 lv3     Sargon I Vectrex lv3
                move    time(s)         move    time(s)         move    time(s) Vec/TRS
1.e2e4          e7e5    0,000           e7e5    0               e7e5      0.4    
2.g1f3          Nb8c6   0,095           Nb8c6   646             Nb8c6   333.7   52%
3.Bf1c4         d7d6    0,135           d7d6    904             d7d6    469.1   52%
4.Nb1c3         Bc8e6   0,187           Bc8e6   1063            Bc8e6   502.2   47%
5.Bc4xe6        f7xe6   0,114           f7xe6   722             f7xe6   374.6   52%
6.0-0           Ng8f6   0,125           Ng8f6   766             Ng8f6   399.5   52%
7.d2d3          d6d5    0,116           d6d5    729             d6d5    379.0   52%
8.Nf3g5         Qd8d6   0,154           Qd8d6   909             Qd8d6   474.9   52%
9.Nc3b5         Qd6e7   0,105           Qd6e7   629             Qd6e7   327.1   52%
10.Bc1e3        d5d4    0,135           d5d4    861             d5d4    451.7   52%
11.Be3d2        0-0-0   0,145           0-0-0   854             0-0-0   449.0   53%
12.a2a4         a7a6    0,157           a7a6    912             a7a6    477.5   52%
13.Nb5a3        h7h6    0,125           h7h6    809             h7h6    421.7   52%
14.Ng5f3        Qe7c5   0,145           Qe7c5   876             Qe7c5   457.5   52%
15.Qd1e2        Bf8d6   0,205           Bf8d6   1235            Bf8d6   647.0   52%
16.Na3c4        Kc8d7   0,185           Kc8d7   1184            Kc8d7   623.0   53%
17.b2b3         Rd8b8   0,254           Rd8b8   1547            Rd8b8   815.4   53%
18.c2c3         d4xc3   0,216           d4xc3   1349            d4xc3   711.3   53%
19.Bd2xc3       b7b5    0,455           b7b5    2718            b7b5    823.1   30%
20.a4xb5        a6xb5   0,236           a6xb5   1431            a6xb5   745.4   52%
Total time              3,289           20144                         9,883.1   
Average time            0,164           1007,2                          494.2  
Speed ratio                     6125                     2.04
Bill Forster
Posts: 76
Joined: Mon Sep 21, 2015 7:47 am
Location: New Zealand

Re: Sargon 1978 UCI Available

Post by Bill Forster »

Phillip Eaton wrote: Wed Apr 07, 2021 11:16 pm But nonetheless, I have updated the table, below. Because I'm running interactive Forth on my Vectrex, I was able to script the core Sargon engine subroutines and so left it running the test games in real time, logging the results with timestamps via the interactive TeraTerm terminal. Then, I pasted the log into Excel, put on a filter and some timing calculations and voila, an updated table.

For the Level 3 games, the middle game speed compared to the TRS is very consistent.
This is an extraordinary result, the results of months of painstaking work by Phillip, all the time working with raw disassemblies rather than actual source code. When he started I cautioned him that it was quite unrealistic to expect the 6809 binary he was working with to ever produce exactly the same moves as Sargon 1978 Z80, for a number of what I thought were pretty good reasons!

https://github.com/billforsternz/retro- ... -697111243

(The whole thread provides background to what he is doing).

I must admit I am gobsmacked to find he now has this code generating matching moves. It indicates that the book the Spracklens published in 1978 did not just capture a random snapshot of work in progress, rather is was a well-defined milestone that they believed in enough to port unchanged to other microprocessors. A reference algorithm as it were.

I think Phillip's achievement is a significant retro computing accomplishment, and I hope to collaborate with him to publish the work in a polished and well presented way when I get through some challenges I am facing at the moment.