Help me to test an idea for Stockfish (I don't know programm

Discussion of chess software programming and technical issues.

Moderators: bob, hgm, Harvey Williamson

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
mvk
Posts: 589
Joined: Tue Jun 04, 2013 8:15 pm

Re: Help me to test an idea for Stockfish (I don't know prog

Post by mvk » Mon Jan 06, 2014 6:19 pm

Lyudmil Tsvetkov wrote: I asked you 2 very simple questions to make the discussion meaningful, and you answered none of those:

- what is the elo impact of different tables in your engine so that the public could draw some conclusions regarding tgheir usefulness?
- do you think that it is good to have lower values in the table for queen on the 6th rank than queen on 5th and 4th ranks, when chess knowledge would suggest it is otherwise? Or to have a negative value for a knight on a5 and a7 for example, when chess knowledge would suggest a knight placed there performs very well?
Truth is, one cannot look at evaluation terms in isolation. For example, Queen on 6th is also impacted by King attacks and mobility.

To answer "the contribution of" type of question, one needs to remove the feature AND retune all others to get a meaningful answer. There is nothing that prevents one from doing that oneself. Stockfish is open source and extremely well readable. In most cases you will have to do it yourself anyway, because everyone has plenty of ideas to test already: Ideas that are not backed up by hard data are just not worth a lot in CC.

CC has made its greatest progress by letting data speak for itself, instead of relying on what is "obvious" or what "looks good" in a single position. Those days are over.
[Account deleted]

Lyudmil Tsvetkov
Posts: 6052
Joined: Tue Jun 12, 2012 10:41 am

Re: Help me to test an idea for Stockfish (I don't know prog

Post by Lyudmil Tsvetkov » Mon Jan 06, 2014 9:10 pm

syzygy wrote:
Lyudmil Tsvetkov wrote:I did not quite understand from the wiki page when the tables originated.
I can inform you that engines from the "late 1960's" are not considered modern engines nowadays. Most likely piece square tables were already in use earlier; the "pre-processing" technique was already a further development (which has been abandoned in modern engines for the reasons stated in the wiki).
I asked you 2 very simple questions to make the discussion meaningful, and you answered none of those:
We've been there before. Those are not at all meaningful for the discussion at hand.

You have been claiming for a few months now that engine developers could benefit from your "true knowledge". Nothing has come out of it. Ask yourself why.
Well, actually I think some of my ideas were tested successfully in Stockfish.

Lyudmil Tsvetkov
Posts: 6052
Joined: Tue Jun 12, 2012 10:41 am

Re: Help me to test an idea for Stockfish (I don't know prog

Post by Lyudmil Tsvetkov » Mon Jan 06, 2014 9:20 pm

Rebel wrote:
Lyudmil Tsvetkov wrote: Hi Ed.

What I have understood is that in most tables I have seen (I do not mean Stockfish tables specifically) some values contradict sound chess knowledge. My modified values were just an attempt to illustrate a probably better approach to general chess principles. Would you argue psqt are perfect, provided that as I understand they are a fairly recent development?

I did not want to aim at a successful patch, just to illustrate another approach.

Otherwise you are fully right that one can not hope for even marginal success if one does not know the sources by heart, as well as the programmer's thought behind them.

But again this thread becomes very ugly, it is just mutual recriminations, I am not interested at that at all. An useful thread would provide some data, share some ideas, etc., and avoid at any cost personal exchanges. A very useful thing you could do, for example, is tell us what is the elo impact of different tables in Rebel, if it has ones?
Hello Lyudmil, nice to meet you.

Perhaps it's useful to read The value of an evaluation function for a general understanding of the components of an EVAL, their impact on playing strength and the interaction each eval component has on the rest of the components.
Nice to meet you too, Ed. :D

I would very much like to learn more about chess programming, however it seems I am more talented at playing chess than at programming...

Looking just at eval at the root, most engines exhibit very shaky scores there. Even top engines would quite often show at the root scores that are far from perfect, sometimes even 2-3 full pawns difference from the real score. That fact tells me a lot. One could judge that in a range of positions the eval of engines is not optimal.

Now, search helps, of course, but not always. If the best score occurs in a position the engine understands and evaluates well, then things work well with the search. If the best score does not occur in such a position, search does not help a lot. Therefore, I have always been an advocate of better eval.

User avatar
velmarin
Posts: 1600
Joined: Mon Feb 21, 2011 8:48 am

Re: Help me to test an idea for Stockfish (I don't know prog

Post by velmarin » Mon Jan 06, 2014 9:57 pm

Lyudmil Tsvetkov wrote: I would very much like to learn more about chess programming, however it seems I am more talented at playing chess than at programming...
A few great teachers manage to win Stockfish.
No takeback ...
:lol:

carldaman
Posts: 1738
Joined: Sat Jun 02, 2012 12:13 am

Re: Help me to test an idea for Stockfish (I don't know prog

Post by carldaman » Mon Jan 06, 2014 11:59 pm

mohzus wrote: Lastly I tried to double the penalty (i.e. penalty of 70 cp) and this "fixed" SF at least up to depth 34, it would now play Be3 which seems better than Bc1 to me. If you are interested, the FEN is r1bq1rk1/1pp2pb1/n2p1npp/p2Pp1B1/2P1P3/2N2N2/PP2BPPP/R2Q1RK1 w - - 0 10.
If you have a position in mind where SF played Bd1 or Be1 where you believe it should not have, please let me know. I will try your idea to fix it by modifying the code and add penalties until the problem is fixed.
In general I don't think this method to "fix" SF would make it stronger in terms of elo. Maybe a bit, but not much. But I could be wrong too, I don't know much about programming and even less in chess programming.

Lastly, you could even create a github account and try to apply your changes to SF by yourself :) I'm sure this forum would help you if you have some troubles to do so.
I pointed out a similar problem a few months ago, where Stockfish 4 would almost inexplicably play Qd1-h5-d1 in the opening [see diagram below], giving up two tempos. However, a couple of months later, newer versions of SF no longer exhibited this strange behavior.

[D]r1bqk1nr/1p2b1pp/p1np4/4p3/2P1Pp2/N1NB4/PP3PPP/R1BQK2R w KQkq - 0 10

It's good to see that progress can be made so quickly.

CL

User avatar
mohzus
Posts: 106
Joined: Tue Sep 24, 2013 12:54 am

Re: Help me to test an idea for Stockfish (I don't know prog

Post by mohzus » Tue Jan 07, 2014 12:29 am

Thank you for your interesting comment Carl.
For the fun of it I analyzed your position with the latest SF. It gives

Code: Select all

info depth 32 seldepth 39 score cp 12 nodes 978585095 nps 1547941 tbhits 0 time 632185 multipv 1 pv e1g1 g8f6 c3d5 e8g8 a3c2 c8e6 c1d2 f6d7 d3e2 a8c8 e2g4 e6g4 d1g4 d7f6 g4e6 g8h8 f1e1 f6d5 c4d5 c6b8 a1c1 b8d7 d2b4 f8f6 e6g4 f6f8 g4h3
info nodes 978585095 tbhits 0 time 632185

phenri
Posts: 284
Joined: Tue Aug 13, 2013 7:44 am

Re: Help me to test an idea for Stockfish (I don't know prog

Post by phenri » Thu Jan 09, 2014 1:13 pm

carldaman wrote: I pointed out a similar problem a few months ago, where Stockfish 4 would almost inexplicably play Qd1-h5-d1 in the opening [see diagram below], giving up two tempos. However, a couple of months later, newer versions of SF no longer exhibited this strange behavior.

[D]r1bqk1nr/1p2b1pp/p1np4/4p3/2P1Pp2/N1NB4/PP3PPP/R1BQK2R w KQkq - 0 10

It's good to see that progress can be made so quickly.

CL
I'm sorry to disappoint you, but Stockfish still considers Qh5+ as a very correct alternative. Which is a pity, view that in any good manual for beginners, play twice the same piece is considered a defect of development. Not to mention that here he loses a tempo because it returns on starting square. What is two times more penalizing.

I do not understand that such moves are still considered by Stockfish.

[D]r1bq1rk1/1pp2pbp/n2p1np1/p2Pp3/2P1P3/2N2N2/PP2BPPP/R1BQ1RK1 w - - 0 10
Image



[D]r1bq1rk1/1pp2pb1/n2p1npp/p2Pp1B1/2P1P3/2N2N2/PP2BPPP/R2Q1RK1 w - - 0 11
Image



[D]r1bqk1nr/1p2b1pp/p1np4/4p3/2P1Pp2/N1NB4/PP3PPP/R1BQK2R w KQkq - 0 10
Image

Post Reply