That even sounds fast. Do you already have a Quiescence Search?
It also depends on what evaluation you have. E.g. with material only (and no Piece-Square Tables) alpha-beta becomes very efficient, because every move that is not a tactical blunder scores the same, which means that you almost always ...
Search found 17 matches
- Tue Dec 23, 2014 1:21 pm
- Forum: Programming and Technical Discussions
- Topic: Plain alphabeta speed
- Replies: 4
- Views: 2620
- Tue Dec 23, 2014 1:29 am
- Forum: Programming and Technical Discussions
- Topic: Plain alphabeta speed
- Replies: 4
- Views: 2620
Plain alphabeta speed
So, I just finished polishing my move generator and now that I have a very fast generator I moved to the search completely..
Common engines like stockfish crunch 20 depth in a matter of 1-2 seconds in my computer but my plain alpha beta with no improvements just can get to 7-8 depth in +/- 10 ...
Common engines like stockfish crunch 20 depth in a matter of 1-2 seconds in my computer but my plain alpha beta with no improvements just can get to 7-8 depth in +/- 10 ...
- Wed Sep 17, 2014 1:51 pm
- Forum: Programming and Technical Discussions
- Topic: Negamax framework
- Replies: 8
- Views: 4779
Re: Negamax framework
Your evaluation takes into account the person whose turn it is.
Hence, a score of +300 for white will be -300 for black.
int eval(Chessboard *b){
int score = 0;
score += material(b, !b->turn) - material(b, b->turn); // !b->turn - b->turn because make_move changes side to move right ...
Hence, a score of +300 for white will be -300 for black.
int eval(Chessboard *b){
int score = 0;
score += material(b, !b->turn) - material(b, b->turn); // !b->turn - b->turn because make_move changes side to move right ...
- Tue Sep 16, 2014 8:04 pm
- Forum: Programming and Technical Discussions
- Topic: Negamax framework
- Replies: 8
- Views: 4779
Re: Negamax framework
Did you notice this:
int score = eval(node); // This is a leaf node. Calculate the score from white's perspective.
Compare that to what you are doing.
Now, it is fine to calculate for the side to move's perspective. In fact, that is what most programs really do. But if you do that, you won't need ...
int score = eval(node); // This is a leaf node. Calculate the score from white's perspective.
Compare that to what you are doing.
Now, it is fine to calculate for the side to move's perspective. In fact, that is what most programs really do. But if you do that, you won't need ...
- Tue Sep 16, 2014 11:23 am
- Forum: Programming and Technical Discussions
- Topic: Negamax framework
- Replies: 8
- Views: 4779
Re: Negamax framework
I am doing that. I'm returning the score on the point of view of the side to move but still get wrong evaluations.
int negamax(Chessboard *b, uint8_t depth, int c){
if(!depth)
return c * eval(b);
int value, best = -INF;
Move moves[MAX_MOVES];
Move *it = moves, *end = gen_moves(b, moves ...
int negamax(Chessboard *b, uint8_t depth, int c){
if(!depth)
return c * eval(b);
int value, best = -INF;
Move moves[MAX_MOVES];
Move *it = moves, *end = gen_moves(b, moves ...
- Tue Sep 16, 2014 12:18 am
- Forum: Programming and Technical Discussions
- Topic: Negamax framework
- Replies: 8
- Views: 4779
Negamax framework
I understand how the negamax works. It takes the equivalente that max{min{x1, x2, ...}, min{y1, y2...}} = max{ -max, -max}
But I'm not getting the right results when combining the negamax alpha-beta with the evaluation function. Can someone explain me what changes I have to do in the evaluation ...
But I'm not getting the right results when combining the negamax alpha-beta with the evaluation function. Can someone explain me what changes I have to do in the evaluation ...
- Wed Sep 10, 2014 8:38 pm
- Forum: Programming and Technical Discussions
- Topic: Minimax tree search checkmates
- Replies: 4
- Views: 2793
Re: Minimax tree search checkmates
There are two tricks here.
(1) Stockfish and many others extend a check when it is given, rather than when escaping the check. That means a check at ply=1 on a 1 ply search will NOT hit the q-search at ply 2. Ply 1 gets extended which takes us to ply 2 full width, then ply=3 might start the q ...
(1) Stockfish and many others extend a check when it is given, rather than when escaping the check. That means a check at ply=1 on a 1 ply search will NOT hit the q-search at ply 2. Ply 1 gets extended which takes us to ply 2 full width, then ply=3 might start the q ...
- Wed Sep 10, 2014 11:49 am
- Forum: Programming and Technical Discussions
- Topic: Minimax tree search checkmates
- Replies: 4
- Views: 2793
Re: Minimax tree search checkmates
If a given position is a checkmate, then there are no legal moves. So in that situation, if you are in check, you do not even need to call eval.
If you are trying to create a mate solver, then you can use proof search.
There is no penalty at all for using alpha-beta over pure mini-max search, so I ...
If you are trying to create a mate solver, then you can use proof search.
There is no penalty at all for using alpha-beta over pure mini-max search, so I ...
- Tue Sep 09, 2014 12:17 pm
- Forum: Programming and Technical Discussions
- Topic: Minimax tree search checkmates
- Replies: 4
- Views: 2793
Minimax tree search checkmates
When searching using any minimax tree search algorithm at the beginning of the search we should always check if that node we are searching is a leaf node to return the evaluation score. Imagine a position that we have mate in 1.. What programmers do to detect Mate? Do I have to generate at ...
- Fri Aug 08, 2014 2:48 pm
- Forum: Programming and Technical Discussions
- Topic: En-passant legality test
- Replies: 9
- Views: 4730
Re: En-passant legality test
Of course rays must be precalculated bitboards. Look at the code:
tss &= bb_ray(kpos, m->fsq);
That's an O(nb our pieces cost) to generate legal moves directly. It's very cheap! It's an order of magnitude less than O(nb legal moves).
I don't understand how is that supposed to work..
Image this ...
tss &= bb_ray(kpos, m->fsq);
That's an O(nb our pieces cost) to generate legal moves directly. It's very cheap! It's an order of magnitude less than O(nb legal moves).
I don't understand how is that supposed to work..
Image this ...