Can somebody do simply this? By far the strongest engine!

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.
User avatar
Rebel
Posts: 5694
Joined: Thu Aug 18, 2011 10:04 am

Re: Can somebody do simply this? By far the strongest engine!

Post by Rebel » Sat May 16, 2020 11:16 pm

duncan wrote:
Sat May 16, 2020 11:11 pm
Ed wrote: It never was available because I lost interest while it wasn't ready for release. Things like time control and draws by repetition etc. But it works and Kai's observation is quite to the point.
Is Kai right that his crude ? ' Lc0 first 35 moves and using SF after 35 moves to the end. ' should just take an hour to code?
With "Kai's observation" (see the OP) I meant that SF (in general) plays the endgame better than than Lc0.
90% of coding is debugging, the other 10% is writing bugs.

duncan
Posts: 11894
Joined: Mon Jul 07, 2008 8:50 pm

Re: Can somebody do simply this? By far the strongest engine!

Post by duncan » Sat May 16, 2020 11:20 pm

Rebel wrote:
Sat May 16, 2020 11:16 pm
duncan wrote:
Sat May 16, 2020 11:11 pm
Ed wrote: It never was available because I lost interest while it wasn't ready for release. Things like time control and draws by repetition etc. But it works and Kai's observation is quite to the point.
Is Kai right that his crude ? ' Lc0 first 35 moves and using SF after 35 moves to the end. ' should just take an hour to code?
With "Kai's observation" (see the OP) I meant that SF (in general) plays the endgame better than than Lc0.
Ok I misunderstood you. If you had implemented your tool do you have an estimate how much elo gain it would have got ?

User avatar
Rebel
Posts: 5694
Joined: Thu Aug 18, 2011 10:04 am

Re: Can somebody do simply this? By far the strongest engine!

Post by Rebel » Sat May 16, 2020 11:24 pm

I played to few games to give an estimate.
90% of coding is debugging, the other 10% is writing bugs.

duncan
Posts: 11894
Joined: Mon Jul 07, 2008 8:50 pm

Re: Can somebody do simply this? By far the strongest engine!

Post by duncan » Sat May 16, 2020 11:32 pm

Rebel wrote:
Sat May 16, 2020 11:24 pm
I played to few games to give an estimate.
Also Is Kai right that his ' Lc0 first 35 moves and using SF after 35 moves to the end. ' should just take an hour to code?

User avatar
Laskos
Posts: 10832
Joined: Wed Jul 26, 2006 8:21 pm
Full name: Kai Laskos

Re: Can somebody do simply this? By far the strongest engine!

Post by Laskos » Sat May 16, 2020 11:34 pm

Rebel wrote:
Sat May 16, 2020 10:55 pm
carldaman wrote:
Sat May 16, 2020 10:03 pm
Rebel wrote:
Sat May 16, 2020 8:31 pm
pohl4711 wrote:
Sat May 16, 2020 9:52 am
Laskos wrote:
Sat May 16, 2020 9:10 am
I am unaware of a hybrid engine of the simplest kind, and I don't know what's the matter. Somebody better than me at coding can do this in an hour.
Simply: play using Lc0 first 35 moves and using SF after 35 moves to the end. On some RTX GPU and 4 to 32 core machine this combo will be by far the best engine.

Here are my results with RTX 2070 and 4 strong i7 cores:

200 games each match

Pure Lc0 net SV_3200 --- versus SF_11:
99/200

Combo Lc0 net SV_3200 to move 35, SF_11 after move 35 --- versus SF_11
123/200

An 85 Elo points improvement over pure Lc0.

As simple as that.
Lc0 is ridiculous in endgames, it always was and will probably improve only a little. In 200 games against Fritz 5.32, SF_11 scored 200/200, while Lc0 SV_3200 scored 193/200, Lc0 failing to convert in endgames 14 totally won positions even against Fritz 5.32 !!! It's ridiculous.

Are there volunteers to build such a combo engine in a matter of an hour?
This is, what you are looking for, isnt it?

Eman Chimera (previously known as Hybrid UCI) is a tool to run two or more UCI engines (one after another) to play the same game. Eman Chimera will switch to the appropriate engine based on move number of the current game being played

https://eman.zohosites.com/files/Eman%2 ... 0v1.10.zip

I know, that on playchess, some people use it, and SF takes over after 60 moves (35 moves seems a bit too early to me). So, it works in the FritzGUI. And what works in there, should run everywhere...
The switch should be done by the position on the board. About 6-8 months I wrote such a tool. SF10 and Lc0 both thinking, see screenshot below and then a simple referee program (I used ProDeo) makes the decision, in this board position, since it's the endgame, it takes the SF10 move, else the Lc0 move.

http://rebel13.nl/ZeroFishx.jpg
Hi Ed,
Is this tool still up for download?
Thanks! :)
It never was available because I lost interest while it wasn't ready for release. Things like time control and draws by repetition etc. But it works and Kai's observation is quite to the point.
Ed, I don't need any fancy things like "third brain" and such, just that after a set number of moves or a set number of men on the board, SF replaces Lc0. As simple as that. If I get 85 +/- 30 Elo points in first try doing this by hand, it's better than anything hybrid I have seen so far. One has to get rid of Lc0 silly endgames. I have seen it quite often failing to convert won endgames against Fritz 5.32, it's hilarious! Can you do that and wrap it in an EXE as an UCI compatible engine, making sure that the overhead is small? Maybe I will try to contact Ferdinand Mosca, he was always kind to provide me with tools for experiments, and here one talks of building the strongest Chess engine all around.

Daniel Shawul
Posts: 4055
Joined: Tue Mar 14, 2006 10:34 am
Location: Ethiopia
Contact:

Re: Can somebody do simply this? By far the strongest engine!

Post by Daniel Shawul » Sun May 17, 2020 12:11 am

I have a simple hybrid solution I use in Scorpio. For <= 20 pieces on board, AB is tried the first 30% of the search time.
I use that to guide the following MCTS+NN towards whatever AB saw as good. This almost eliminates tactical blunders and
I didn't need an engine at stockfish level for it to work reasonably. Also if the ABS(score) >= 300, the same hybrid is used.
And if the AB says score >=700 the MCTS NN is not tried at all, and AB will give a devastating checkmate.

The problem is how do you weigh the AB and NN engine. Right now I weigh the scores like 0.3*AB+0.7*NN and anything more for the AB
weakens overall play. The UCB move selection is based on this hybrid score, so even if the NN search does not understand what the AB
is upto, it will keep on investing simulations in the moves AB deemed as good. In some cases, it might not see it at all and may/may not play
the AB move.

User avatar
Laskos
Posts: 10832
Joined: Wed Jul 26, 2006 8:21 pm
Full name: Kai Laskos

Re: Can somebody do simply this? By far the strongest engine!

Post by Laskos » Sun May 17, 2020 1:07 am

Daniel Shawul wrote:
Sun May 17, 2020 12:11 am
I have a simple hybrid solution I use in Scorpio. For <= 20 pieces on board, AB is tried the first 30% of the search time.
I use that to guide the following MCTS+NN towards whatever AB saw as good. This almost eliminates tactical blunders and
I didn't need an engine at stockfish level for it to work reasonably. Also if the ABS(score) >= 300, the same hybrid is used.
And if the AB says score >=700 the MCTS NN is not tried at all, and AB will give a devastating checkmate.

The problem is how do you weigh the AB and NN engine. Right now I weigh the scores like 0.3*AB+0.7*NN and anything more for the AB
weakens overall play. The UCB move selection is based on this hybrid score, so even if the NN search does not understand what the AB
is upto, it will keep on investing simulations in the moves AB deemed as good. In some cases, it might not see it at all and may/may not play
the AB move.
Looks good, but I would like for now something very simple, not using any mixture inside the search. I just want to get rid of Lc0 horrendous endgames. It only very rarely happens that Lc0 blunders tactically in openings / early midgames, it hardly needs any help there, but later on it becomes dumber and dumber, aside its trolling. I am again "after the strongest engine", as usual :lol:. But seriously, if one can improve by 85+/-30 Elo points Lc0, aren't at least Playchess Engine Room players interested in this trivial switch tool from Lc0 to SF as an UCI engine?

Dann Corbit
Posts: 11627
Joined: Wed Mar 08, 2006 7:57 pm
Location: Redmond, WA USA
Contact:

Re: Can somebody do simply this? By far the strongest engine!

Post by Dann Corbit » Sun May 17, 2020 3:01 am

One hour to code, and 30 hours to debug. ;-)

If you already have a server piece like Winboard, you can just start another thread to load the second engine. Then pick out both moves and use whatever heuristic you like to decide the move.

It would be a lot more complicated if you are using tournament time controls, because the the engines will almost never finish at the same time. If you gave the engines fixed time control it is simple. And if you use one engine management thread and just switch engines at ply 'x' then it is really quite trivial. A five minute job, not an hour
Taking ideas is not a vice, it is a virtue. We have another word for this. It is called learning.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.

Ferdy
Posts: 4296
Joined: Sun Aug 10, 2008 1:15 pm
Location: Philippines

Re: Can somebody do simply this? By far the strongest engine!

Post by Ferdy » Sun May 17, 2020 7:32 am

Just basic features, no ponder, does not reply when thinking. Supports movetime and wtime btime winc binc. Switching is controlled by game move number.

HeadsUp = Lc0 25.0 blas, up to move 15 and Stockfish 11 for the rest of moves.
TC: Bullet 1'+1"

Result so far after 10 games, using noomen 3 moves opening on cutechess-cli.

Code: Select all

Score of HeadsUp vs Stockfish 11: 2 - 1 - 7  [0.550] 10
...      HeadsUp playing White: 2 - 0 - 3  [0.700] 5
...      HeadsUp playing Black: 0 - 1 - 4  [0.400] 5
...      White vs Black: 3 - 0 - 7  [0.650] 10
Elo difference: 34.9 +/- 121.9, LOS: 71.8 %, DrawRatio: 70.0 %
headsup.cfg

Code: Select all

[engine1]
engine1file = D:\Chess\Engines\Lc0\lc0-v0.25.0-windows-cpu-openblas\lc0.exe
WeightsFile = D:\Chess\Engines\Lc0\lc0-v0.25.0-windows-cpu-openblas\591226.pb.gz
Threads = 2
MinibatchSize = 8
MaxPrefetch = 0

[engine2]
engine2file = D:\Chess\Engines\Stockfish\stockfish_11.exe
Hash = 128

[option]
move_number_switch = 16
Will release tomorrow after some test.

Jonathan003
Posts: 128
Joined: Fri Jul 06, 2018 2:23 pm
Full name: Jonathan Cremers

Re: Can somebody do simply this? By far the strongest engine!

Post by Jonathan003 » Sun May 17, 2020 8:27 am

Cumnor wrote:
Sat May 16, 2020 11:43 am
Also Eman Chimera can change engine by number of pieces on the board not just move number.
How to set this option? And how many pieces do you recommend to change engine?

Post Reply