is LVA as in MVV-LVA useless ?

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.
Post Reply
MahmoudUthman
Posts: 234
Joined: Sat Jan 17, 2015 10:54 pm

is LVA as in MVV-LVA useless ?

Post by MahmoudUthman » Tue Jun 04, 2019 10:24 am

Looking at SF's code it seems to be ordering captures & promotions using MVV only + CaptureHistory, and according to this pull the LVA part is insignificant or even useless, unfortunately I don't have the resources to test such a -"is (such a) right here or should it be just (such)"- subtle difference in Elo, has anyone else tried using MVV only? and if so, how consisting were the results with SF's one?
Also in case of MVV only ordering do you consider the Victim in promotion=V-(promoted piece), or just V ?

Joost Buijs
Posts: 960
Joined: Thu Jul 16, 2009 8:47 am
Location: Almere, The Netherlands

Re: is LVA as in MVV-LVA useless ?

Post by Joost Buijs » Tue Jun 04, 2019 5:26 pm

I don't see any reason why Stockfish prefers MVV over MVV-LVA, they talk about code complexity but to me it seems that one additional subtraction is not very complex at all, probably it tested 0.1 Elo better.

mar
Posts: 1992
Joined: Fri Nov 26, 2010 1:00 pm
Location: Czech Republic
Full name: Martin Sedlak

Re: is LVA as in MVV-LVA useless ?

Post by mar » Tue Jun 04, 2019 7:58 pm

Joost Buijs wrote:
Tue Jun 04, 2019 5:26 pm
I don't see any reason why Stockfish prefers MVV over MVV-LVA, they talk about code complexity but to me it seems that one additional subtraction is not very complex at all, probably it tested 0.1 Elo better.
Exactly, LVA serves a sole purpose to resolve ties. A couple of instructions and 70k games later, big mouth arrogant idiots "debunk myths", give me a break :D
Martin Sedlak

Joerg Oster
Posts: 684
Joined: Fri Mar 10, 2006 3:29 pm
Location: Germany

Re: is LVA as in MVV-LVA useless ?

Post by Joerg Oster » Tue Jun 04, 2019 8:48 pm

mar wrote:
Tue Jun 04, 2019 7:58 pm
Joost Buijs wrote:
Tue Jun 04, 2019 5:26 pm
I don't see any reason why Stockfish prefers MVV over MVV-LVA, they talk about code complexity but to me it seems that one additional subtraction is not very complex at all, probably it tested 0.1 Elo better.
Exactly, LVA serves a sole purpose to resolve ties. A couple of instructions and 70k games later, big mouth arrogant idiots "debunk myths", give me a break :D
LOL :D
Jörg Oster

AndrewGrant
Posts: 472
Joined: Tue Apr 19, 2016 4:08 am
Location: U.S.A
Full name: Andrew Grant
Contact:

Re: is LVA as in MVV-LVA useless ?

Post by AndrewGrant » Tue Jun 04, 2019 9:57 pm

I would make the argument that Stockfish as an engine is powerful enough to not rely on relatively simple methods of move sorting. I joined the chess world a bit late to see the massive elo gains from adding various continuation histories to Stockfish, but I think it would be naive to not consider the possibility that Stockfish's move history for captures may far exceed trivial tie breaking rules of MVV-LVA.

Personally, I still use MVV-LVA, with only some minor nuance for dealing with promotions and enpassant. Although, I have not tried capture history in any form, as I have plenty of other ideas to play around with before taking something so non-ubiquitous from Stockfish.

mjlef
Posts: 1424
Joined: Thu Mar 30, 2006 12:08 pm
Contact:

Re: is LVA as in MVV-LVA useless ?

Post by mjlef » Wed Jun 05, 2019 1:33 am

MahmoudUthman wrote:
Tue Jun 04, 2019 10:24 am
Looking at SF's code it seems to be ordering captures & promotions using MVV only + CaptureHistory, and according to this pull the LVA part is insignificant or even useless, unfortunately I don't have the resources to test such a -"is (such a) right here or should it be just (such)"- subtle difference in Elo, has anyone else tried using MVV only? and if so, how consisting were the results with SF's one?
Also in case of MVV only ordering do you consider the Victim in promotion=V-(promoted piece), or just V ?
Capture move ordering has changed a few times in Komodo. The last version before a recent change used a form of MVV - LVA, but did it without a subtraction. It merely generated all pawn capturing things first, scoring the move a value equivalent as MVV, then all knight capturings, then bishop, rook, queen and king in that order. Then do a stable sort, which automatically keeps the LVA first as a tie break. Of course stable sorts can sometimes be slower, but few captures are possible in most positions and the time savings of having to do the subtraction did speed it up a bit.

Mark

konsolas
Posts: 182
Joined: Sun Jun 12, 2016 3:44 pm
Location: London
Full name: Vincent
Contact:

Re: is LVA as in MVV-LVA useless ?

Post by konsolas » Sun Jun 09, 2019 6:15 pm

It's strange that SEE is still used to differentiate good captures from bad captures, yet its score somehow isn't useful in ordering the moves.

Joost Buijs
Posts: 960
Joined: Thu Jul 16, 2009 8:47 am
Location: Almere, The Netherlands

Re: is LVA as in MVV-LVA useless ?

Post by Joost Buijs » Sun Jun 09, 2019 7:41 pm

SEE is perfectly useable for ordering captures, the problem is that you have to calculate SEE for all captures before you can sort them and this is somewhat slower than calculating MVV-LVA for all captures. In my main search I use SEE throughout for ordering captures, in quiescence I use MVV-LVA for ordering and SEE to determine if a capture is worth playing or not.

User avatar
xr_a_y
Posts: 733
Joined: Sat Nov 25, 2017 1:28 pm
Location: France

Re: is LVA as in MVV-LVA useless ?

Post by xr_a_y » Sun Jun 09, 2019 8:29 pm

Joost Buijs wrote:
Sun Jun 09, 2019 7:41 pm
SEE is perfectly useable for ordering captures, the problem is that you have to calculate SEE for all captures before you can sort them and this is somewhat slower than calculating MVV-LVA for all captures. In my main search I use SEE throughout for ordering captures, in quiescence I use MVV-LVA for ordering and SEE to determine if a capture is worth playing or not.
Same for me

jorose
Posts: 261
Joined: Thu Jan 22, 2015 2:21 pm
Location: Zurich, Switzerland
Full name: Jonathan Rosenthal

Re: is LVA as in MVV-LVA useless ?

Post by jorose » Mon Jun 10, 2019 3:52 pm

I recently tried using my full blown move ordering (just without SEE) in QSearch, but it scored something like -8.5 +- 6 at the end of my test. I would imagine the reason was simply how expensive the calculation is.

I am currently intending to train a set of weights on only root QS (as in the first call to QS, not any of the recursive QS calls) to figure out which features are most relevant to predict whether each respective move will either fail high or improve on standing pat. I don't know what we care about more in QS, as while we want to fail high, it also seems counterintuitive for prior move ordering to depend on parts of the search independent of the current board position. Based on the features I have, it could learn MVV-LVA or something much more complicated.

I will get back to this thread with my findings once I have done this.
-Jonathan

Post Reply