The future of computer chess

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

Moderator: Ras

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

Re: The future of computer chess

Post by smatovic »

towforce wrote: Mon Oct 13, 2025 7:29 pm
smatovic wrote: Mon Oct 13, 2025 7:20 pmEd and Uri estimated +200 Elo for backporting new techniques onto 6502, and Bill Foster did his Sargon 1 port onto x86, 3 ply extra.
smatovic wrote: Sat Oct 11, 2025 4:02 pm [...]
I know, the Sargon port by Bill Foster:

Re: History of Memory Wall in Computer Chess?
viewtopic.php?p=856414#p856414
[...]

That's not what Bill Forster did: according to the post you linked, he took the Sargon program, unchanged, and ran it on hardware which was 6000x faster.
Not sure we are talking about the same thing....
Converting the classic Z80 code to X86 with no emulation or simulation to allows us to really how quickly it can run on modern machines.
https://github.com/billforsternz/retro-sargon

--
Srdja
syzygy
Posts: 5774
Joined: Tue Feb 28, 2012 11:56 pm

Re: The future of computer chess

Post by syzygy »

smatovic wrote: Mon Oct 13, 2025 8:04 pm
towforce wrote: Mon Oct 13, 2025 7:29 pm
smatovic wrote: Mon Oct 13, 2025 7:20 pmEd and Uri estimated +200 Elo for backporting new techniques onto 6502, and Bill Foster did his Sargon 1 port onto x86, 3 ply extra.
smatovic wrote: Sat Oct 11, 2025 4:02 pm [...]
I know, the Sargon port by Bill Foster:

Re: History of Memory Wall in Computer Chess?
viewtopic.php?p=856414#p856414
[...]

That's not what Bill Forster did: according to the post you linked, he took the Sargon program, unchanged, and ran it on hardware which was 6000x faster.
Not sure we are talking about the same thing....
Converting the classic Z80 code to X86 with no emulation or simulation to allows us to really how quickly it can run on modern machines.
https://github.com/billforsternz/retro-sargon

--
Srdja
It looks like Sargon did not implement the algorithmic improvement known as alpha-beta.
smatovic
Posts: 3354
Joined: Wed Mar 10, 2010 10:18 pm
Location: Hamburg, Germany
Full name: Srdja Matovic

Re: The future of computer chess

Post by smatovic »

syzygy wrote: Mon Oct 13, 2025 8:14 pm It looks like Sargon did not implement the algorithmic improvement known as alpha-beta.
I did not look into the sources, but:
The first Sargon version had a 10x12 board board representation and a two ply alpha-beta search without quiescence but a SOMA like exchange evaluation [3] [4].
https://www.chessprogramming.org/Sargon

--
Srdja
syzygy
Posts: 5774
Joined: Tue Feb 28, 2012 11:56 pm

Re: The future of computer chess

Post by syzygy »

smatovic wrote: Mon Oct 13, 2025 8:20 pm
syzygy wrote: Mon Oct 13, 2025 8:14 pm It looks like Sargon did not implement the algorithmic improvement known as alpha-beta.
I did not look into the sources, but:
The first Sargon version had a 10x12 board board representation and a two ply alpha-beta search without quiescence but a SOMA like exchange evaluation [3] [4].
https://www.chessprogramming.org/Sargon
But on github I read:
This version of Sargon used fixed depth, full width search. In other words it did not prune its search tree, considering every single move out to a fixed depth. The depth was a user selectable option, with 6 (ply) being the maximum setting. On my (cheap, aging) commodity laptop, sargon-engine.exe might take something like 30 seconds to perform the 6 ply search in a typical middlegame position. I expect this to be between two and three orders of magnitude faster than the original Z80 machine, so I don't imagine many users set the search depth to maximum!
6 ply in 30 seconds would mean about 24Mnps (with a branching factor of 30).
That could be right, although perhaps a bit high.

With alpha-beta the effective branching factor should be around perhaps 10, which would amount to 33Knps, which is way too low.

edit: src/sargon-minimax.cpp includes comments talking about alpha-beta, so now I am not sure.
smatovic
Posts: 3354
Joined: Wed Mar 10, 2010 10:18 pm
Location: Hamburg, Germany
Full name: Srdja Matovic

Re: The future of computer chess

Post by smatovic »

syzygy wrote: Mon Oct 13, 2025 8:33 pm
smatovic wrote: Mon Oct 13, 2025 8:20 pm
syzygy wrote: Mon Oct 13, 2025 8:14 pm It looks like Sargon did not implement the algorithmic improvement known as alpha-beta.
I did not look into the sources, but:
The first Sargon version had a 10x12 board board representation and a two ply alpha-beta search without quiescence but a SOMA like exchange evaluation [3] [4].
https://www.chessprogramming.org/Sargon
But on github I read:
This version of Sargon used fixed depth, full width search. In other words it did not prune its search tree, considering every single move out to a fixed depth. The depth was a user selectable option, with 6 (ply) being the maximum setting. On my (cheap, aging) commodity laptop, sargon-engine.exe might take something like 30 seconds to perform the 6 ply search in a typical middlegame position. I expect this to be between two and three orders of magnitude faster than the original Z80 machine, so I don't imagine many users set the search depth to maximum!
6 ply in 30 seconds would mean about 24Mnps (with a branching factor of 30).
That could be right, although perhaps a bit high.

With alpha-beta the effective branching factor should be around perhaps 10, which would amount to 33Knps, which is way too low.

edit: src/sargon-minimax.cpp includes comments talking about alpha-beta, so now I am not sure.
I do not know either. In the other post Foster mentions an BF of 20 which translates to 2.13Mnps for 6 ply in 30 seconds.

***edit***
"full width search" can be interpreted as no selective search present.

--
Srdja
syzygy
Posts: 5774
Joined: Tue Feb 28, 2012 11:56 pm

Re: The future of computer chess

Post by syzygy »

smatovic wrote: Mon Oct 13, 2025 8:45 pm I do not know either. In the other post Foster mentions an BF of 20 which translates to 2.13Mnps for 6 ply in 30 seconds.

***edit***
"full width search" can be interpreted as no selective search present.
Then probably it is alpha-beta but with rather bad move ordering (not having a TT indeed does not help).
chrisw
Posts: 4646
Joined: Tue Apr 03, 2012 4:28 pm
Location: Midi-Pyrénées
Full name: Christopher Whittington

Re: The future of computer chess

Post by chrisw »

syzygy wrote: Mon Oct 13, 2025 8:14 pm
smatovic wrote: Mon Oct 13, 2025 8:04 pm
towforce wrote: Mon Oct 13, 2025 7:29 pm
smatovic wrote: Mon Oct 13, 2025 7:20 pmEd and Uri estimated +200 Elo for backporting new techniques onto 6502, and Bill Foster did his Sargon 1 port onto x86, 3 ply extra.
smatovic wrote: Sat Oct 11, 2025 4:02 pm [...]
I know, the Sargon port by Bill Foster:

Re: History of Memory Wall in Computer Chess?
viewtopic.php?p=856414#p856414
[...]

That's not what Bill Forster did: according to the post you linked, he took the Sargon program, unchanged, and ran it on hardware which was 6000x faster.
Not sure we are talking about the same thing....
Converting the classic Z80 code to X86 with no emulation or simulation to allows us to really how quickly it can run on modern machines.
https://github.com/billforsternz/retro-sargon

--
Srdja
It looks like Sargon did not implement the algorithmic improvement known as alpha-beta.
Lines 1905-1907 in the Sargon.asm code on GitHub is the test for the beta cutoff
User avatar
Rebel
Posts: 7387
Joined: Thu Aug 18, 2011 12:04 pm
Full name: Ed Schröder

Re: The future of computer chess

Post by Rebel »

For the fun of it one should remove A/B from your engine and watch the search depth, suddenly slow as a snail and the hundreds of elo loss that will come with it. I once tried it, the first 3 iterations without A/B in order to get a well ordered move list that could profit from iteration 4 an on.

No cigar, takes too long.
90% of coding is debugging, the other 10% is writing bugs.
syzygy
Posts: 5774
Joined: Tue Feb 28, 2012 11:56 pm

Re: The future of computer chess

Post by syzygy »

chrisw wrote: Mon Oct 13, 2025 11:54 pm
syzygy wrote: Mon Oct 13, 2025 8:14 pm
smatovic wrote: Mon Oct 13, 2025 8:04 pm
towforce wrote: Mon Oct 13, 2025 7:29 pm
smatovic wrote: Mon Oct 13, 2025 7:20 pmEd and Uri estimated +200 Elo for backporting new techniques onto 6502, and Bill Foster did his Sargon 1 port onto x86, 3 ply extra.
smatovic wrote: Sat Oct 11, 2025 4:02 pm [...]
I know, the Sargon port by Bill Foster:

Re: History of Memory Wall in Computer Chess?
viewtopic.php?p=856414#p856414
[...]

That's not what Bill Forster did: according to the post you linked, he took the Sargon program, unchanged, and ran it on hardware which was 6000x faster.
Not sure we are talking about the same thing....
Converting the classic Z80 code to X86 with no emulation or simulation to allows us to really how quickly it can run on modern machines.
https://github.com/billforsternz/retro-sargon

--
Srdja
It looks like Sargon did not implement the algorithmic improvement known as alpha-beta.
Lines 1905-1907 in the Sargon.asm code on GitHub is the test for the beta cutoff
These lines:
https://github.com/billforsternz/retro- ... 1905-L1907
I agree.
User avatar
towforce
Posts: 12543
Joined: Thu Mar 09, 2006 12:57 am
Location: Birmingham UK
Full name: Graham Laight

Re: The future of computer chess

Post by towforce »

syzygy wrote: Tue Oct 14, 2025 3:45 am[link to Sargon Z80 Assembly code]
https://github.com/billforsternz/retro- ... 1905-L1907

Wow! Throughout that code, it is astonishing how much is being done with so few CPU instructions: mclane - take a look - the secret of the strength of the dedicated chess computers from the golden age is right here!
Human chess is partly about tactics and strategy, but mostly about memory