Number 1:
Do I make my nullmove all-powerful and watch it play rubbishly in the endgame etc, or do I make my Futility Pruning all-powerful and starve nullmove of nodes?
Number 2:
Play well, and slowly, or play rubbishly, but go extremely fast.
Number 3:
Evaluation (ATM I only have PSTs, and mobility made it bring out it's queen on move 2..) or Search (Alpha-Beta, has no move ordering as I'm not sure how to implement it, Futility, Extended Futility, Limited Razoring, Nullmove, LMR, Some extensions, FHR and some other stuff)?
Number 4:
Blog (lucichess.blogspot.com ) or Tinker?
Matthew:out
A few things to debate for my chess engine
Moderators: hgm, Rebel, chrisw
-
- Posts: 1334
- Joined: Sun Jul 17, 2011 11:14 am
-
- Posts: 2929
- Joined: Sat Jan 22, 2011 12:42 am
- Location: NL
Re: A few things to debate for my chess engine
I think Bob Hyatt reported that, in Crafty, it hurts to not do null-move everywhere. I may be misremembering the exact details.ZirconiumX wrote:Number 1:
Do I make my nullmove all-powerful and watch it play rubbishly in the endgame etc, or do I make my Futility Pruning all-powerful and starve nullmove of nodes?
Anyway, the answer is that you tune for optimal playing strength, so you look for the middle-ground (and then find heuristics that let you avoid the middle-ground and be more agressive with your pruning).
Not sure what you mean, but again: you tune for optimal playing strength.Number 2:
Play well, and slowly, or play rubbishly, but go extremely fast.
You need both (by the way, move ordering is a must-have).Number 3:
Evaluation (ATM I only have PSTs, and mobility made it bring out it's queen on move 2..) or Search (Alpha-Beta, has no move ordering as I'm not sure how to implement it, Futility, Extended Futility, Limited Razoring, Nullmove, LMR, Some extensions, FHR and some other stuff)?
Again, you tune for optimal playing strength.
-
- Posts: 20943
- Joined: Mon Feb 27, 2006 7:30 pm
- Location: Birmingham, AL
Re: A few things to debate for my chess engine
For question one, sounds like you need to tune your null-move search a bit. You certainly don't want to try it in a pawn-only endgame, as null-move will completely hide zugzwang and cause you to play poorly. Turn it off when no pieces are left. However, that is not cautious enough, as with just a knight, you still see lots of zugzwang positions, and null-move fails because not moving should NEVER be better than making a move, yet in zugzwang that is exactly what happens, and null-move breaks the search.ZirconiumX wrote:Number 1:
Do I make my nullmove all-powerful and watch it play rubbishly in the endgame etc, or do I make my Futility Pruning all-powerful and starve nullmove of nodes?
Number 2:
Play well, and slowly, or play rubbishly, but go extremely fast.
Number 3:
Evaluation (ATM I only have PSTs, and mobility made it bring out it's queen on move 2..) or Search (Alpha-Beta, has no move ordering as I'm not sure how to implement it, Futility, Extended Futility, Limited Razoring, Nullmove, LMR, Some extensions, FHR and some other stuff)?
Number 4:
Blog (lucichess.blogspot.com ) or Tinker?
Matthew:out
I'd solve those issues first, as I don't see any issues related to null-move hurting endgames in my program. Just remember that if zugzwang is possible, so are errors. The benefits far outweigh the costs, if it is done carefully.
-
- Posts: 3232
- Joined: Mon May 31, 2010 1:29 pm
- Full name: lucasart
Re: A few things to debate for my chess engine
Starting from a basic PVS algorithm, with simple eval (material + pst), you'll find null move is a massive improvement. Probably 150 elo alone, at least.ZirconiumX wrote:Number 1:
Do I make my nullmove all-powerful and watch it play rubbishly in the endgame etc, or do I make my Futility Pruning all-powerful and starve nullmove of nodes?
Number 2:
Play well, and slowly, or play rubbishly, but go extremely fast.
Number 3:
Evaluation (ATM I only have PSTs, and mobility made it bring out it's queen on move 2..) or Search (Alpha-Beta, has no move ordering as I'm not sure how to implement it, Futility, Extended Futility, Limited Razoring, Nullmove, LMR, Some extensions, FHR and some other stuff)?
Number 4:
Blog (lucichess.blogspot.com ) or Tinker?
Matthew:out
null move doesn;'t make it play rubbish in the endgame. I don't know on what basis you say that. perhaps you implemented incorrectly your null move ? I don't do nullmove when the side to play has no pieces, to avoid zugzwang. More refined programs to a null move verification search.
futility pruning on the other hand, and razoring improve very little, and make your program tactically weaker. Futility pruning is probably not worth much elo on its own.
-
- Posts: 3232
- Joined: Mon May 31, 2010 1:29 pm
- Full name: lucasart
Re: A few things to debate for my chess engine
That's a very good and accurate summary. From experience I fully agree.bob wrote:For question one, sounds like you need to tune your null-move search a bit. You certainly don't want to try it in a pawn-only endgame, as null-move will completely hide zugzwang and cause you to play poorly. Turn it off when no pieces are left. However, that is not cautious enough, as with just a knight, you still see lots of zugzwang positions, and null-move fails because not moving should NEVER be better than making a move, yet in zugzwang that is exactly what happens, and null-move breaks the search.ZirconiumX wrote:Number 1:
Do I make my nullmove all-powerful and watch it play rubbishly in the endgame etc, or do I make my Futility Pruning all-powerful and starve nullmove of nodes?
Number 2:
Play well, and slowly, or play rubbishly, but go extremely fast.
Number 3:
Evaluation (ATM I only have PSTs, and mobility made it bring out it's queen on move 2..) or Search (Alpha-Beta, has no move ordering as I'm not sure how to implement it, Futility, Extended Futility, Limited Razoring, Nullmove, LMR, Some extensions, FHR and some other stuff)?
Number 4:
Blog (lucichess.blogspot.com ) or Tinker?
Matthew:out
I'd solve those issues first, as I don't see any issues related to null-move hurting endgames in my program. Just remember that if zugzwang is possible, so are errors. The benefits far outweigh the costs, if it is done carefully.
Regarding the null move implementation, I suggest you look at Fruit. In particular Fruit does a null move only when the static eval fails high. There are certainly many other ways to do it, but this one is simple and very good. In particular it ensures that no 2 null move can be played in a row.
I first misimplemented my nullmove and had problems where 2 Null Moves vcould be played consecutively: that will screw up your search completely!
-
- Posts: 3232
- Joined: Mon May 31, 2010 1:29 pm
- Full name: lucasart
Re: A few things to debate for my chess engine
also study well your move ordering!
it's worth spending time making statistics on which moves produce cutoffs, and run a test suite, until you reach depth with less and less nodes.
it's worth spending time making statistics on which moves produce cutoffs, and run a test suite, until you reach depth with less and less nodes.
-
- Posts: 27811
- Joined: Fri Mar 10, 2006 10:06 am
- Location: Amsterdam
- Full name: H G Muller
Re: A few things to debate for my chess engine
How can that be? It is just a recursive implementation of Internal Iterative Deepening.lucasart wrote:I first misimplemented my nullmove and had problems where 2 Null Moves vcould be played consecutively: that will screw up your search completely!
Micro-Max does an unlimited number of null-moves in a row, and it doesn't seem to hurt it.
-
- Posts: 1334
- Joined: Sun Jul 17, 2011 11:14 am
Re: A few things to debate for my chess engine
Right - Results
TT - It worked for Magic but is sh... in LUCI (in 3ms it does 1 ply, and triggers GDB when it gets to ply 2)
Nullmove - Normal parameter at the function call (fails to complete ply 1)
Fruit fail-high Nullmove also fails to complete ply 1, verified nullmove also fails to complete ply 1.
No Nullmove or TT - Fails to complete ply 1...
Hmmmm... (I think it may be the generator)
Matthew:out
TT - It worked for Magic but is sh... in LUCI (in 3ms it does 1 ply, and triggers GDB when it gets to ply 2)
Nullmove - Normal parameter at the function call (fails to complete ply 1)
Fruit fail-high Nullmove also fails to complete ply 1, verified nullmove also fails to complete ply 1.
No Nullmove or TT - Fails to complete ply 1...
Hmmmm... (I think it may be the generator)
Matthew:out
-
- Posts: 686
- Joined: Thu Mar 03, 2011 4:57 pm
- Location: Germany
Re: A few things to debate for my chess engine
but probably not 2 in a row consecutively, because that means you were back to the position you started from just 2 plys deeper.Micro-Max does an unlimited number of null-moves in a row, and it doesn't seem to hurt it.
Thomas...
-
- Posts: 1334
- Joined: Sun Jul 17, 2011 11:14 am
Re: A few things to debate for my chess engine
Last problem fixed - I'd been a bit too zealous with block comments and commented out the bit that calls the move generator.
Matthew:out
Matthew:out