I think I did right this:
Iteration p (full width search till p)
Find a move at depth p that gives check then full width search will be do now till p+1.
At depth p+1 the in check side could avoid it, and do it but not gives check (that could be possible for example by a "descubierto" in spanish that means for example that moving the king allow an own tower to atack the opposite king).
There is no more check extensions and enter in QS that search just for captures or promotions.
At the end, my check extension only allows the engine to search one ply depther when gives check but do not allow it to study sucesive checks with corresponding uniques moves as I thought "check extensions" will allow.
I hope I could made you understand me nevertheless my Apache like english.
1-I did it wrong?
2-I did it right and just is wrong what I understood by "check extension"?
3-I didn´t too bad but I must do it better?
Thanks!
Starting with check extensions.
Moderators: hgm, Rebel, chrisw
-
- Posts: 464
- Joined: Sat Feb 28, 2015 4:37 pm
- Location: Argentina
-
- Posts: 931
- Joined: Tue Mar 09, 2010 3:46 pm
- Location: New York
- Full name: Álvaro Begué (RuyDos)
Re: Starting with check extensions.
It's probably a good thing to stop thinking about search this way. You start searching the root at some depth-left of p. The children of a position with depth-left d will get depth-left d-1, except if the move was a check, in which case they will get depth-left d (this is what I understand as check extensions). When depth-left is 0, you call quiescence search.Luis Babboni wrote:I think I did right this:
Iteration p (full width search till p)
Find a move at depth p that gives check then full width search will be do now till p+1. [...]
I seem to remember you have a non-recursive implementation of minimax. There should still be a way to do this in your implementation. If it's not trivial, perhaps it's time for you to consider a recursive implementation.
-
- Posts: 464
- Joined: Sat Feb 28, 2015 4:37 pm
- Location: Argentina
Re: Starting with check extensions.
I think I could exlain myself wrongly.AlvaroBegue wrote:It's probably a good thing to stop thinking about search this way. You start searching the root at some depth-left of p. The children of a position with depth-left d will get depth-left d-1, except if the move was a check, in which case they will get depth-left d (this is what I understand as check extensions). When depth-left is 0, you call quiescence search.Luis Babboni wrote:I think I did right this:
Iteration p (full width search till p)
Find a move at depth p that gives check then full width search will be do now till p+1. [...]
I seem to remember you have a non-recursive implementation of minimax. There should still be a way to do this in your implementation. If it's not trivial, perhaps it's time for you to consider a recursive implementation.
Suppouse this position:
k in A8, K in A1, N in d5 and P in h2 (this pawn is just to avoid stalemate cause not enough material to checkmate).
Regarding alpha beta, at iteration 1 my engine could anlyze moves in this order:
1-Ka2
2-Kb2
3 Kb1
4-Ne7
5-Nf6
6-Nf4
7-Ne3
8-Nc3
9-Nb4
10-Nb6+, 11-ka7 (here is where check extensions work)
............, 12-kb7
............, 13-kb8
14-Nc7+, 15-ka7
............, 16-kb7
............, 17-kb8
18-Ph3
19-Ph4
-
- Posts: 2204
- Joined: Sat Jan 18, 2014 10:24 am
- Location: Andorra
Re: Starting with check extensions.
This is a basic check extension, yes. Sure can be refined but its ok.
Daniel José - http://www.andscacs.com
-
- Posts: 931
- Joined: Tue Mar 09, 2010 3:46 pm
- Location: New York
- Full name: Álvaro Begué (RuyDos)
Re: Starting with check extensions.
Actually, no, that's not an extension at all. If you didn't have this extension, you would be entering QS in check, and in that case QS should behave like a depth-1 search anyway (i.e., not allow stand-pat and search every legal move). So you'll end up with the same tree.cdani wrote:This is a basic check extension, yes. Sure can be refined but its ok.
-
- Posts: 2204
- Joined: Sat Jan 18, 2014 10:24 am
- Location: Andorra
Re: Starting with check extensions.
I was not talking about the last ply before QS. I was talking in general for any ply, so yes, is an extension.AlvaroBegue wrote:Actually, no, that's not an extension at all. If you didn't have this extension, you would be entering QS in check, and in that case QS should behave like a depth-1 search anyway (i.e., not allow stand-pat and search every legal move). So you'll end up with the same tree.cdani wrote:This is a basic check extension, yes. Sure can be refined but its ok.
Daniel José - http://www.andscacs.com
-
- Posts: 2204
- Joined: Sat Jan 18, 2014 10:24 am
- Location: Andorra
Re: Starting with check extensions.
Also if you enter in the QS after this extension, in the first example of Luis:cdani wrote:I was not talking about the last ply before QS. I was talking in general for any ply, so yes, is an extension.AlvaroBegue wrote:Actually, no, that's not an extension at all. If you didn't have this extension, you would be entering QS in check, and in that case QS should behave like a depth-1 search anyway (i.e., not allow stand-pat and search every legal move). So you'll end up with the same tree.cdani wrote:This is a basic check extension, yes. Sure can be refined but its ok.
10-Nb6+, 11-ka7 (here is where check extensions work)
and if ka7 was a check also (obviously not in this example), the first ply of QS will behave like you said of no stand-pat and such.
Daniel José - http://www.andscacs.com
-
- Posts: 931
- Joined: Tue Mar 09, 2010 3:46 pm
- Location: New York
- Full name: Álvaro Begué (RuyDos)
Re: Starting with check extensions.
But if you read the description a couple of posts earlier, he is precisely talking about the last ply before QS. ("Find a move at depth p that gives check then full width search will be do now till p+1.")cdani wrote:I was not talking about the last ply before QS. I was talking in general for any ply, so yes, is an extension.AlvaroBegue wrote:Actually, no, that's not an extension at all. If you didn't have this extension, you would be entering QS in check, and in that case QS should behave like a depth-1 search anyway (i.e., not allow stand-pat and search every legal move). So you'll end up with the same tree.cdani wrote:This is a basic check extension, yes. Sure can be refined but its ok.
-
- Posts: 931
- Joined: Tue Mar 09, 2010 3:46 pm
- Location: New York
- Full name: Álvaro Begué (RuyDos)
Re: Starting with check extensions.
I still don't see what the difference is between this and no extension.cdani wrote:Also if you enter in the QS after this extension, in the first example of Luis:cdani wrote:I was not talking about the last ply before QS. I was talking in general for any ply, so yes, is an extension.AlvaroBegue wrote:Actually, no, that's not an extension at all. If you didn't have this extension, you would be entering QS in check, and in that case QS should behave like a depth-1 search anyway (i.e., not allow stand-pat and search every legal move). So you'll end up with the same tree.cdani wrote:This is a basic check extension, yes. Sure can be refined but its ok.
10-Nb6+, 11-ka7 (here is where check extensions work)
and if ka7 was a check also (obviously not in this example), the first ply of QS will behave like you said of no stand-pat and such.
-
- Posts: 2204
- Joined: Sat Jan 18, 2014 10:24 am
- Location: Andorra
Re: Starting with check extensions.
Ok.AlvaroBegue wrote:But if you read the description a couple of posts earlier, he is precisely talking about the last ply before QS. ("Find a move at depth p that gives check then full width search will be do now till p+1.")cdani wrote: I was not talking about the last ply before QS. I was talking in general for any ply, so yes, is an extension.
If standard search and QS behave similar, of course no difference. But most engines like Andscacs do different things.AlvaroBegue wrote:I still don't see what the difference is between this and no extension.cdani wrote: Also if you enter in the QS after this extension, in the first example of Luis:
10-Nb6+, 11-ka7 (here is where check extensions work)
and if ka7 was a check also (obviously not in this example), the first ply of QS will behave like you said of no stand-pat and such.
Daniel José - http://www.andscacs.com