Moderator: Andres Valverde
Volker B?hm wrote:The only idea to add the "uncernity effect" that seems good is to count the amount of winning moves in a position and search more if there are only few good moves.
Dann Corbit wrote:Jeremiah Pennery's wall detection code (found in some Crafty versions) solves WAC.230 by noticing that black is about to form a fortress.
You can also solve it quickly by giving a huge value to passed pawns (besides breaking the fortress wall, you are also trading a rook for a passer), but that solution causes bad game play in general.
Crafty main.c section wrote: * 19.1 changes to the outside passed pawn and outside candidate pawn *
* code to more correctly recognize when one side has a simple end- *
* game position that is easy to win. futility pruning and razoring *
* (Jeremiah Penery) was added. to endable it, you will need to add *
* -DFUTILITY to the Makefile options, otherwise it is disabled by *
* default. EvaluateWinner() had a bug dealing with KR vs KN or *
* KRR vs KRN(B) that has been fixed. *
*
H.G.Muller wrote:Well, Volker, what can I say? You might not agree with the underlying motivation, but the idea works quite satisfactory in practice.
All of the evaluation terms you mention are good to have, as I wrote elsewhere in this forum, the very reason for evaluation is to anticipate what lies beyond the horizon, so that deepening the search does not make the move score vary wildly and unpredictably. But they don't do a thing for the problem Jonatan raises:
If there are multiple paths to equivalent (or even identical) end-leaves of the search tree, why would the computer prefer the shorter one? This problem even exists if the eventual goal (the check-mate) does ly within the horizon. It can of course be solved by some ad hoc trick (e.g. make the score of the check-mate dependent on the move number), but if you don't use a general solution the problem will always come back to haunt you in another form.
Volker B?hm wrote:1. How do you handle extensions? Example you have a gain that could be driven out of horizont by checks of your opponent. Typically you add check extensions to keep the gain inside the horizont. Will you reduced the value of your gain because the opponent can do several useless checks?
2. How do you handle search depth reductions? Will reduced searched positions get a bonus because searching less deep in "very quiet" positions?
3. For hashing the same position sould allways get the same score and return the same score down the tree even if it is reached by different moves or a different arrangement of moves. How do you handle this?
Jonatan Pettersson wrote:Might be a silly question but I'm having some trouble with my engine not choosing the fastest line to victory. If it can see a good move 3 plies ahead, it might not do it if there's no way to stop it (like having a pawn close to promotion and not moving it until it's actually at risk of capture).
Mate is not a problem since that's taken care of in my search (lowering the mate value deeper in the search).
Is there a good way of making the engine pick any good line quick, even if it can do it undisturbed further down in the search?
Tord Romstad wrote:Hi Volker,
Good post!Volker B?hm wrote:The only idea to add the "uncernity effect" that seems good is to count the amount of winning moves in a position and search more if there are only few good moves.
This is essentially exactly what multi-cut pruning does. At nodes where you expect a fail high (based on the static eval, a hash table score, a reduced depth search, or whatever), search the first x moves with reduced depth, without allowing a beta cutoff. If at least y of the x first moves produce a score >= beta, return a fail high score without doing a full depth search.
I've tried it in Glaurung a couple of times, without success.
Tord
mathmoi wrote:It seems to me that Iterative deepening will resolve this issue. No ?
if (ply<3) tree->search_data[ply].worst_50moves=board->50moves_cnt;
else
{
tree->search_data[ply].worst_50moves=tree->search_data[ply-1].worst_50moves;
if (board->50moves_cnt>tree->search_data[ply].worst_50moves) tree->search_data[ply].worst_50moves=board->50moves_cnt;
}
board->drawfactor=100;
if (tree->search_data[ply].worst_50moves>10)
{
board->drawfactor=100-((tree->search_data[ply].worst_50moves-10)*2);
if (board->drawfactor<10) board->drawfactor=10;
}
score=(score*board->drawfactor)/100;
Daniel Mehrmann wrote:Tord Romstad wrote:Hi Volker,
Good post!Volker B?hm wrote:The only idea to add the "uncernity effect" that seems good is to count the amount of winning moves in a position and search more if there are only few good moves.
This is essentially exactly what multi-cut pruning does. At nodes where you expect a fail high (based on the static eval, a hash table score, a reduced depth search, or whatever), search the first x moves with reduced depth, without allowing a beta cutoff. If at least y of the x first moves produce a score >= beta, return a fail high score without doing a full depth search.
I've tried it in Glaurung a couple of times, without success.
Tord
But works perfectly for Homer. I don't need NullMove or IDD
MC-Pruning doing all me like odering, pruning, IDD and some other stuff.
Best,
Daniel
Tony van Roon-Werten wrote:Hi all,
I've been playing around with this stuff for a while, it looks like I've found a decent solution.
I started with using the 50 move counter, and reducing the score with a percentage depending on that counter.
It didn't work. What the engine did, was fooling around for 10 ply in search and then right before the last ply, making an irreversable move, since then the evaluation would not be punished. But the next iteration, it would just fool around 11 ply and then 12 etc.
So I use the following, wich seems to work OK.
- Code: Select all
if (ply<3) tree->search_data[ply].worst_50moves=board->50moves_cnt;
else
{
tree->search_data[ply].worst_50moves=tree->search_data[ply-1].worst_50moves;
if (board->50moves_cnt>tree->search_data[ply].worst_50moves) tree->search_data[ply].worst_50moves=board->50moves_cnt;
}
board->drawfactor=100;
if (tree->search_data[ply].worst_50moves>10)
{
board->drawfactor=100-((tree->search_data[ply].worst_50moves-10)*2);
if (board->drawfactor<10) board->drawfactor=10;
}
score=(score*board->drawfactor)/100;
The idea is that, when searching fe 10 ply, the optimium score will be reached by playing the irreversable move at ply 5, meaning it will search the remaining 5 ply with the consequences of that move (with a lower best score).
Tony
Return to Programming and Technical Discussions
Users browsing this forum: No registered users and 4 guests