Having trouble understanding advanced move ordering techniques

Discussion of chess software programming and technical issues.

Moderator: Ras

pedrojdm2021
Posts: 157
Joined: Fri Apr 30, 2021 7:19 am
Full name: Pedro Duran

Re: Having trouble understanding advanced move ordering techniques

Post by pedrojdm2021 »

Mergi wrote: Mon Feb 14, 2022 12:41 am Depth and node count is a lie. I wouldn't worry about trying to implement new features, as you seem to have plenty enough already. Now it's all about optimizing those that you already have and pruning as aggresivelly as possible. This is especially true when it comes to things like late move reductions - there's a huge potential to cut a lot of nodes besides just the classic -1 depth, if you are brave enough.

It also seems like your depth 9 output gives 10 PV moves. You seem to be possibly doing some extra work.
That's true, but it's also risky doing more than the classical, i have tried one of the formulas that it points in Chess Programming wiki for LMR:
Senpai reduces by one ply for the first 6 moves and by depth / 3 for remaining moves.
The results in speed are amazing! but the results in strenght are catrastofic. it made my engine blind for many situations, and started to lost every game.

I think i need to implement another formula that does not made the engine blind
OliverBr
Posts: 797
Joined: Tue Dec 18, 2007 9:38 pm
Location: Munich, Germany
Full name: Dr. Oliver Brausch

Re: Having trouble understanding advanced move ordering techniques

Post by OliverBr »

Mike Sherwin wrote: Sun Feb 13, 2022 7:31 am I have trouble also with this. When my engine RomiChess first came out, june 2005, it was the deepest searching engine that I was aware of. Now OliThink searches deeper faster. And of course SF depth is incredible. But why? I have not been able to figure it out.
Until OliThink 5.3.3 there wasn't much "guess"-pruning. This had the advantage that it could solve some "strange" riddles and "absurd" positions, but the performance in general chess matches wasn't that good.

Then I started to implement a lot of pruning and yes: It's going deeper and deeper in search, but only because of a lot pruning.
The bad side is, that it misses sometimes some spectacular tactical move, but it showed, that generally it plays better chess.

It looks like a contradiction...
Chess Engine OliThink: http://brausch.org/home/chess
OliThink GitHub:https://github.com/olithink
pedrojdm2021
Posts: 157
Joined: Fri Apr 30, 2021 7:19 am
Full name: Pedro Duran

Re: Having trouble understanding advanced move ordering techniques

Post by pedrojdm2021 »

OliverBr wrote: Mon Feb 21, 2022 3:56 am
Mike Sherwin wrote: Sun Feb 13, 2022 7:31 am I have trouble also with this. When my engine RomiChess first came out, june 2005, it was the deepest searching engine that I was aware of. Now OliThink searches deeper faster. And of course SF depth is incredible. But why? I have not been able to figure it out.
Until OliThink 5.3.3 there wasn't much "guess"-pruning. This had the advantage that it could solve some "strange" riddles and "absurd" positions, but the performance in general chess matches wasn't that good.

Then I started to implement a lot of pruning and yes: It's going deeper and deeper in search, but only because of a lot pruning.
The bad side is, that it misses sometimes some spectacular tactical move, but it showed, that generally it plays better chess.

It looks like a contradiction...
That's my conclusion too. The more pruning you add to the engine, the less intelligent it will be.
You have to compensate that with a better evaluation function to keep the engine strong.
User avatar
mvanthoor
Posts: 1784
Joined: Wed Jul 03, 2019 4:42 pm
Location: Netherlands
Full name: Marcel Vanthoor

Re: Having trouble understanding advanced move ordering techniques

Post by mvanthoor »

pedrojdm2021 wrote: Mon Feb 21, 2022 6:08 pm That's my conclusion too. The more pruning you add to the engine, the less intelligent it will be.
You have to compensate that with a better evaluation function to keep the engine strong.
I think pruning doesn't make the engine less intelligent; it is more akin to making it more careless and apt to oversights. Like a human, who sees (for example) a move that loses a pawn and then stops analyzing there. ("This loses a pawn; that can't be a good move.") But, had the human analyzed a bit farther, he would have seen that losing that pawn places the opponent's queen on the wrong side of the board and a mate in 3 attack can follow.

Pruning to aggressively can make the engine miss such things too.

I've always considered the search as "board vision" ("what happens if I do this, and what will the position be?") and the evaluation as chess knowledge ("will this be good for me?").

Pruning makes the engine see farther, but you _must_ at some point back it up with a good evaluation, or the engine will not be able to make decisions if what it sees is good or not. If the evaluation is not good enough (like, only counting material), then the engine will see deeper, but make dumb decisions anyway.
Author of Rustic, an engine written in Rust.
Releases | Code | Docs | Progress | CCRL
pedrojdm2021
Posts: 157
Joined: Fri Apr 30, 2021 7:19 am
Full name: Pedro Duran

Re: Having trouble understanding advanced move ordering techniques

Post by pedrojdm2021 »

mvanthoor wrote: Mon Feb 21, 2022 6:19 pm
pedrojdm2021 wrote: Mon Feb 21, 2022 6:08 pm That's my conclusion too. The more pruning you add to the engine, the less intelligent it will be.
You have to compensate that with a better evaluation function to keep the engine strong.
I think pruning doesn't make the engine less intelligent; it is more akin to making it more careless and apt to oversights. Like a human, who sees (for example) a move that loses a pawn and then stops analyzing there. ("This loses a pawn; that can't be a good move.") But, had the human analyzed a bit farther, he would have seen that losing that pawn places the opponent's queen on the wrong side of the board and a mate in 3 attack can follow.

Pruning to aggressively can make the engine miss such things too.

I've always considered the search as "board vision" ("what happens if I do this, and what will the position be?") and the evaluation as chess knowledge ("will this be good for me?").

Pruning makes the engine see farther, but you _must_ at some point back it up with a good evaluation, or the engine will not be able to make decisions if what it sees is good or not. If the evaluation is not good enough (like, only counting material), then the engine will see deeper, but make dumb decisions anyway.
Yeah, i totally agree, that is what i wanted to say somehow