CRoberson wrote:
The proper way will put QxQ before PxR and RxR before PxB.
So, complete ordering is:
PxQ, B|NxQ, RxQ, QxQ, PxR, QxR, B|NxR, RxR, PxB|N, B|NxB|N,RxB|N, QxB|N, ........
There was a discussion about move MVV/LVA and other 'static' move orderings (i.e. not adapting to the fact if the victim is defended) on CCC some months ago.
The Achilles heel of orthodox MVV/LVA is of course that QxR is ordered before PxB|N, while it can bring disaster if the R is defended, and the second is 'always' good.
That QxQ (which can be neutral) is better tried before 'obviously good' captures like PxR is already explained above: if he does not recapture you gained a Q, and if he does, you almost always do the PxR on the third ply anyway. So QxQ will have almost always as least as good a score as a competing PxR, but QxQ is a lot safer (because after starting with PxR the opponent will play QxQ, to bring disaster if your own Q happened to be undefended!).
QxR is a more tricky move. If the R turns out to be defended, though, the recapture of your Q will be tried by the opponent as first reply. In QS (or in fact at any depths <= 2) this in general immediately ends the sub-tree, as all remaing captures you have are likely to be futile after the loss of a Q for a R, and the XxQ refutation would thus be a cut move. So a 'gambling' QxR wastes only 2 nodes, even if the R turns out to be defended. This should be weighed against the possibility for an RxQ retaliation on your PxB alternative: if the Q attacks the R along a file/rank, the R attacks the Q back!
So a refinement could be to make te ordering depend on if QxR is along an orthogonal or a diagonal. PxN before QxR(orth) (or QxB(diag)) is really doomed, while trying one of the latter first at leat might work out if the victim is undefended. Even if you don't look which of your pieces is under attack in general, some of these mutual attacks you can recognize for free. Even QxP (the very last MVV/LVA move) offers more chance for success than any other capture if a P attacks the Q back...
The way Joker orders the moves is initially MVV, but after that for HxL captures the victim value is downgraded to the SEE value. And in a depth>=1 node, where null move is tried before any captures, so that we know which of our pieces is under attack if the null move is refuted, any victim value below the threatened piece is replaced by the see value as well, and the SEE value of the null-move-refuting move is added to the sort score of captures with the threatened piece, or of the attacker of it. Of all moves with equal sort score, the one with the LVA is then tried first.