What next?

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

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

Re: What next?

Post by hgm »

Dann Corbit wrote:The magic of the zobrist hash is that it uses xor.

Since you are using xor, the same operation that added a chessman on a square is the operation to subtract the chessman.
Actually I have always considered that a weakness of the Zobrist scheme: for no clear advantage you cannot see the difference between two pieces on the same square or zero. So in my engines I always use additive Zobrist keys. Then I can place as many pieces as I want on the same square, without creating any ambiguity.

That way I need no kludges to hash the holdings of a Crazyhouse or Shogi game. In micro-Max an additional reason was that +- have better operator priorities than ^, so that they would not have to be protected by parentheses everywhere (saving some characters).

@Erick:

MVV sorting in QS (or something at least as good) is way more important than hashing, but it is not always obvious. When you play without something (LVA is a nice refinement, but not essential.) Without it, initially you hardly won't notice anything, perhaps a slowdown of 50% f you are lucky. But almost every game will go through a stage where you get a tremendous search explosion, when you don't sort the captures. You will then see the search depth drop from its normal 11 ply (say) to 3, 2 or sometimes even 1 ply. At that point the engine will play a horibleblunder, of course, so you basically lose every game.
evandam
Posts: 18
Joined: Mon Feb 07, 2011 9:12 pm

Re: What next?

Post by evandam »

OK the MVVLVA is complete. Some initial tests look good.

I tested the time and nodes searched for a depth of 4 of the first 20 silent but deadly epd test positions.
  • %faster %fewer nodes
    -19.1% -21.1%
    -22.1% -21.0%
    -26.3% -30.2%
    57.4% -2.9%
    -82.3% -82.1%
    -42.1% -33.7%
    -88.4% -89.2%
    -91.7% -93.0%
    -7.3% -15.9%
    -2.9% -14.7%
    6.6% 0.7%
    -13.0% -18.6%
    -72.2% -73.8%
    -69.4% -67.2%
    -69.9% -69.0%
    -19.9% -16.2%
    -40.7% -30.0%
    -50.4% -66.6%
    -16.1% -18.1%
    -80.2% -80.3%
Sorry for the formatting, not sure how to make it better. You can clearly see that the MVVLVA made a pretty drastic improvement on the time to search to a depth of 4 and the number of nodes searched to do it.

Weird thing is that playing a 40/3 Tourney The old one seems to hold his own say within 10 elo using Bayeselo stuff. Now granted I don't really have enough games yet, but I thought it would be more apparent. Oh well.

So now I'm going to look into null move pruning and then work on some eval tuning. I have the TT started and I'll go back to that when I run out of easier things to implement.

Thanks again for the suggestions.
evandam
Posts: 18
Joined: Mon Feb 07, 2011 9:12 pm

Re: What next?

Post by evandam »

OK so remember when I said my evaluation was "pretty minimal". Well it turns out it was pretty bad too. I changed it and ran against my previous version and was 157-17-27!

I've now pitted myself against the bottom 4 int the 40/4 CCRL, trying to replicate their test conditions and that is running now. So the engines I'm going against are. ALChess 1.5b (1745), Zotron 4.4.6 (1683), Piranha 0.5 (1608), and MiniMardi 1.3 (1528).

Next is Null Move Pruning.
smatovic
Posts: 2645
Joined: Wed Mar 10, 2010 10:18 pm
Location: Hamburg, Germany
Full name: Srdja Matovic

Re: What next?

Post by smatovic »

Code: Select all

OK the MVVLVA is complete. Some initial tests look good. 
You could use aditional to MVV-LVA for captures some simple Board-Eval function for Non-Captures...

--
Srdja