No tuning

Discussion of chess software programming and technical issues.

Moderator: Ras

User avatar
hgm
Posts: 28461
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: No tuning

Post by hgm »

Henk wrote:Actually this was my best post in years.
Indeed it points out a very useful insight. Tuning a buggy engine is a waste of time; the tuning is unlikely to remain good after you fixed an important bug.

To judge if you have bugs from the quality of play, it is necessary to have a not completely crazy tuning, but having an evaluation that is little more than piece values (even if only the classical 1:3:3:5:9) and a weak form of centralization for the minors and hefty bonus for 6th and especially 7th-rank Pawns (e.g. through PST) should be good enough to make you spot serious errors.

When I build a new engine from scratch I just watch a number of games against an engine of not-too-different strength (so the score will be between 25% and 75%), and watch them to decide why it loses the games it loses. If you play a little bit of Chess yourself, that is usually easy. So you can see if it just blunders away pieces in the middle-game, naively allows the opponent to advance passers to 6th or 7th rank before acting against them, destroys its King fortress to expose his King, allows the opponent to pile up material against his King fortress for a devastating mate attack, etc.

Blundering away material points to search bugs; they can be stamped out by the painful process of taking a position from the games where this happened, and trace the search tree for that position to diagnose which branch was under- or over-evaluated, and how exactly it got the faulty score. Good tests for the search are whether it is able to efficiently checkmate a bare King with Queen and Rook, and for a slightly more advanced search with TT table whether it will be able to see the promotion in KPK with wKe1, wPe2, bKe8 and the win in Fine #70.

The other things can only be cured by adding evaluation terms that address it. Giving a bonus of up to ~1 Pawn for maintaining a Pawn shield around the King, and discouraging it to walk towards the center, both in the early game phases (or at least as long as the opponent has a Queen), already goes a long way to solve early-checkmate problems against engines that do not grossly outsearch it. It does not require very precise tuning to see if this will ameliorate the observed problem. It should be obvious from watching a dozen fast test games whether it stays losing by the same mistakes (e.g. because you added the term with the wrong sign).

When developing micro-Max I discovered that an engine is much like a boat: as long as it has holes below the waterline, it will sink. It doesn't matter much how many such holes there are; having fewer holes just takes it longer to sink, but the result stays the same. Only when you plug the last hole it can stay afloat. Before that, plugging one hole (e.g. preventing it to expose his King early) just means that it will lose those game by another mistake (e.g. allowing the opponents passers to advance to 7th rank with impunity).
Henk
Posts: 7251
Joined: Mon May 27, 2013 10:31 am

Re: No tuning

Post by Henk »

Playing games is foolish too if an engine does not evaluate most positions right. So I first start with a set of test positions. Or the goal of playing games must be to create interesting test positions.

[If you even can't evaluate one position correctly why play a game]
Daniel Anulliero
Posts: 773
Joined: Fri Jan 04, 2013 4:55 pm
Location: Nice

Re: No tuning

Post by Daniel Anulliero »

Henk wrote:
bob wrote:
Henk wrote:How many times did I tune a bad implementation. So tuning for Skipper is just a waste of time.
Step one: make certain code works.

Step two: make certain step one was done correctly.
Yes it is test, test, test.
Test, test, test, test and
Test.

I forget a while (true).
Mr Henk can you show some respect for all the chess programmers experts here (Mr hyatt, muller, Schüle , etc sorry for all other guy I forgot :wink: )
They all try to help you to debug your engine Skipper (since to years it play just like the 1978's dedicated chess machines like challenger 3, Boris and microchess)
Show some modesty, listen the advices from these guy very very strong at chess programming, read chess programming wiki, stop trolling also!
And may be one day , Skipper will win some games , not only against POS
Henk
Posts: 7251
Joined: Mon May 27, 2013 10:31 am

Re: No tuning

Post by Henk »

Daniel Anulliero wrote:
Henk wrote:
bob wrote:
Henk wrote:How many times did I tune a bad implementation. So tuning for Skipper is just a waste of time.
Step one: make certain code works.

Step two: make certain step one was done correctly.
Yes it is test, test, test.
Test, test, test, test and
Test.

I forget a while (true).
Mr Henk can you show some respect for all the chess programmers experts here (Mr hyatt, muller, Schüle , etc sorry for all other guy I forgot :wink: )
They all try to help you to debug your engine Skipper (since to years it play just like the 1978's dedicated chess machines like challenger 3, Boris and microchess)
Show some modesty, listen the advices from these guy very very strong at chess programming, read chess programming wiki, stop trolling also!
And may be one day , Skipper will win some games , not only against POS
That is your interpretation. Also there is no need to create engines that all use same techniques and ideas. On the contrary.
User avatar
hgm
Posts: 28461
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: No tuning

Post by hgm »

Henk wrote:Playing games is foolish too if an engine does not evaluate most positions right. So I first start with a set of test positions. Or the goal of playing games must be to create interesting test positions.

[If you even can't evaluate one position correctly why play a game]
That is true, but once you get into the situation that the engine is not extremely buggy, the chances that it will wrongly evaluate some randomly picked position become very small. Bugs so obvious that they wreck the search on almost every position are usually found pretty easily, and then fixed. It is the bugs that rarely produce a very obvious mistake in the root, but in the mean time are corrupting the scores obtained deeper in the tree, that are very hard to track down.

So you quickly get into a situation where you would have to submit tens of thousands of positions to the engine to stumble an a mis-evaluation that is obvious enough that you could use it to find a bug. And an easy way to generate that many positions is just to play games, as each game gives you some 60 new positions.

Losses against a weaker opponent are often more significant than wins against a stronger one, because they can be the result of bugs (while in the other case that would be bugs in the opponent, which you don't care about). So it is best to test against a 200-Elo weaker engine. You can then go through the losses, and look in the Eval Graph if you see sudden score jumps in favor of the opponent (which indicate blunders).

You should not worry about wrong evaluations or moves that are wrong because of known evaluation deficiencies. If you lose games because the opponnet creates a winning passer in the middle-game, by Chessic knowledge the move that allowed him to create that passer should be considered a blunder. But you can never expect an engine to see that if it has no passer evaluation. For such an engine it is just bad luck. It might lead to a jump of the opponent's score in an opponent that has this eval knowledge, but would just lead to a steady drop of your own score as the disastrous consequences (e.g. its unstoppable advance, or the retreat of pieces to bad squares needed to stop it) of that passer become apparent with time.
Daniel Anulliero
Posts: 773
Joined: Fri Jan 04, 2013 4:55 pm
Location: Nice

Re: No tuning

Post by Daniel Anulliero »

Henk wrote:
Daniel Anulliero wrote:
Henk wrote:
bob wrote:
Henk wrote:How many times did I tune a bad implementation. So tuning for Skipper is just a waste of time.
Step one: make certain code works.

Step two: make certain step one was done correctly.
Yes it is test, test, test.
Test, test, test, test and
Test.

I forget a while (true).
Mr Henk can you show some respect for all the chess programmers experts here (Mr hyatt, muller, Schüle , etc sorry for all other guy I forgot :wink: )
They all try to help you to debug your engine Skipper (since to years it play just like the 1978's dedicated chess machines like challenger 3, Boris and microchess)
Show some modesty, listen the advices from these guy very very strong at chess programming, read chess programming wiki, stop trolling also!
And may be one day , Skipper will win some games , not only against POS
That is your interpretation. Also there is no need to create engines that all use same techniques and ideas. On the contrary.
If it is a hobby yes , need it ! I looove to réinvent the wheel ! 😆
And the next year Mr Henk will show us his new search scheme without alpha beta and pvs !! :wink:
Henk
Posts: 7251
Joined: Mon May 27, 2013 10:31 am

Re: No tuning

Post by Henk »

Daniel Anulliero wrote:
Henk wrote:
Daniel Anulliero wrote:
Henk wrote:
bob wrote:
Henk wrote:How many times did I tune a bad implementation. So tuning for Skipper is just a waste of time.
Step one: make certain code works.

Step two: make certain step one was done correctly.
Yes it is test, test, test.
Test, test, test, test and
Test.

I forget a while (true).
Mr Henk can you show some respect for all the chess programmers experts here (Mr hyatt, muller, Schüle , etc sorry for all other guy I forgot :wink: )
They all try to help you to debug your engine Skipper (since to years it play just like the 1978's dedicated chess machines like challenger 3, Boris and microchess)
Show some modesty, listen the advices from these guy very very strong at chess programming, read chess programming wiki, stop trolling also!
And may be one day , Skipper will win some games , not only against POS
That is your interpretation. Also there is no need to create engines that all use same techniques and ideas. On the contrary.
If it is a hobby yes , need it ! I looove to réinvent the wheel ! 😆
And the next year Mr Henk will show us his new search scheme without alpha beta and pvs !! :wink:
Yes of course or start cloning Ippolit now. Best original chess engines have ELO below 1400. I rather prefer to lose from POS then copy an idea.
User avatar
Steve Maughan
Posts: 1315
Joined: Wed Mar 08, 2006 8:28 pm
Location: Florida, USA

Re: No tuning

Post by Steve Maughan »

Henk wrote:No wonder some developers start copying and cloning.
Those who do are not "developers"

- Steve
http://www.chessprogramming.net - Juggernaut & Maverick Chess Engine
Daniel Anulliero
Posts: 773
Joined: Fri Jan 04, 2013 4:55 pm
Location: Nice

Re: No tuning

Post by Daniel Anulliero »

Henk wrote:
Daniel Anulliero wrote:
Henk wrote:
Daniel Anulliero wrote:
Henk wrote:
bob wrote:
Henk wrote:How many times did I tune a bad implementation. So tuning for Skipper is just a waste of time.
Step one: make certain code works.

Step two: make certain step one was done correctly.
Yes it is test, test, test.
Test, test, test, test and
Test.

I forget a while (true).
Mr Henk can you show some respect for all the chess programmers experts here (Mr hyatt, muller, Schüle , etc sorry for all other guy I forgot :wink: )
They all try to help you to debug your engine Skipper (since to years it play just like the 1978's dedicated chess machines like challenger 3, Boris and microchess)
Show some modesty, listen the advices from these guy very very strong at chess programming, read chess programming wiki, stop trolling also!
And may be one day , Skipper will win some games , not only against POS
That is your interpretation. Also there is no need to create engines that all use same techniques and ideas. On the contrary.
If it is a hobby yes , need it ! I looove to réinvent the wheel ! 😆
And the next year Mr Henk will show us his new search scheme without alpha beta and pvs !! :wink:

Yes of course or start cloning Ippolit now. Best original chess engines have ELO below 1400. I rather prefer to lose from POS then copy an idea.
Ok I understand now , you know nothing about chess computer ! Go here:
http://www.computerhistory.org/collecti ... uterchess/
Read all the stuff and come back here lol
Henk
Posts: 7251
Joined: Mon May 27, 2013 10:31 am

Re: No tuning

Post by Henk »

Daniel Anulliero wrote:
Henk wrote:
Daniel Anulliero wrote:
Henk wrote:
Daniel Anulliero wrote:
Henk wrote:
bob wrote:
Henk wrote:How many times did I tune a bad implementation. So tuning for Skipper is just a waste of time.
Step one: make certain code works.

Step two: make certain step one was done correctly.
Yes it is test, test, test.
Test, test, test, test and
Test.

I forget a while (true).
Mr Henk can you show some respect for all the chess programmers experts here (Mr hyatt, muller, Schüle , etc sorry for all other guy I forgot :wink: )
They all try to help you to debug your engine Skipper (since to years it play just like the 1978's dedicated chess machines like challenger 3, Boris and microchess)
Show some modesty, listen the advices from these guy very very strong at chess programming, read chess programming wiki, stop trolling also!
And may be one day , Skipper will win some games , not only against POS
That is your interpretation. Also there is no need to create engines that all use same techniques and ideas. On the contrary.
If it is a hobby yes , need it ! I looove to réinvent the wheel ! 😆
And the next year Mr Henk will show us his new search scheme without alpha beta and pvs !! :wink:

Yes of course or start cloning Ippolit now. Best original chess engines have ELO below 1400. I rather prefer to lose from POS then copy an idea.
Ok I understand now , you know nothing about chess computer ! Go here:
http://www.computerhistory.org/collecti ... uterchess/
Read all the stuff and come back here lol
Please don't tell me how to spend my time unless you pay me salary.