TalkChess.com
Hosted by Your Move Chess & Games

Author Message
Lucas Braesch

Joined: 31 May 2010
Posts: 1824

Post subject: Re: futility pruining, razoring question    Posted: Fri Apr 06, 2012 3:34 am

here's my razoring code. it's a little uncommon as I reduce instead of pruning (and prune when horizon reached). but this seems to work much better than pruning

razor parameters
 Code: const bool UseRazoring = true; static const int RazorDepth = 3; static inline int RazorMargin(int depth) {    assert(1 <= depth && depth <= RazorDepth);    return 2*MP + (depth-1)*MP/4; }

MP is the value of a pawn in the middlegame. the RazorMargin formula is just a guess (no optimization done). And given that constraint, it appeared that RazorDepth == 3 was best.

in the main search
 Code: // Razoring    if (UseRazoring && depth <= RazorDepth       && !is_pv && !is_mate_score(beta) && !in_check)    {       if (current_eval + RazorMargin(depth) <= alpha) {          const int score = qsearch(B, alpha, beta, 0, ply+1, is_pv, si+1);          if (score <= alpha && --depth <= 0)             return score;       }    }

as for futility pruning, I don't think what I do is really good. I need to do more experiment on it.

Last edited by Lucas Braesch on Fri Apr 06, 2012 3:36 am; edited 1 time in total
 Display posts from previous: All Posts1 Day7 Days2 Weeks1 Month3 Months6 Months1 Year Oldest FirstNewest First
Subject Author Date/Time
Marco Belli Wed Apr 04, 2012 6:21 pm
Robert Hyatt Thu Apr 05, 2012 7:07 pm
Karlo Bala Jr. Thu Apr 05, 2012 7:59 pm
Vincent Diepeveen Thu Apr 05, 2012 11:47 pm
Re: futility pruining, razoring question Lucas Braesch Fri Apr 06, 2012 3:34 am
Martin Sedlak Fri Apr 06, 2012 3:35 am
Martin Sedlak Fri Apr 06, 2012 4:10 am
Martin Sedlak Fri Apr 06, 2012 5:15 am
Marco Costalba Fri Apr 06, 2012 5:45 am
Lucas Braesch Fri Apr 06, 2012 7:22 am
Martin Sedlak Fri Apr 06, 2012 7:30 am
Lucas Braesch Fri Apr 06, 2012 8:36 am
Marco Costalba Fri Apr 06, 2012 11:42 am
Lucas Braesch Fri Apr 06, 2012 1:21 pm
Ricardo Barreira Fri Apr 06, 2012 3:00 pm
Vincent Diepeveen Fri Apr 06, 2012 5:21 pm
Lucas Braesch Sat Apr 07, 2012 1:59 am
Vincent Diepeveen Sat Apr 07, 2012 8:22 am
Marco Costalba Sat Apr 07, 2012 9:52 am
Vincent Diepeveen Sat Apr 07, 2012 1:53 pm
Ed Schroder Sat Apr 07, 2012 3:46 pm
Vincent Diepeveen Sat Apr 07, 2012 4:07 pm
Lucas Braesch Sun Apr 08, 2012 3:08 am
Vincent Diepeveen Sun Apr 08, 2012 10:12 am
Matthew R. Brades Sun Apr 08, 2012 11:18 am
Marco Belli Mon Apr 09, 2012 7:42 pm
Marco Belli Mon Apr 09, 2012 8:23 pm
Martin Sedlak Mon Apr 09, 2012 9:04 pm
Marco Belli Mon Apr 09, 2012 9:24 pm
Marco Belli Tue Apr 10, 2012 10:52 am
Martin Sedlak Tue Apr 10, 2012 11:58 am
John Merlino Sat Apr 07, 2012 5:10 pm
Vincent Diepeveen Sat Apr 07, 2012 5:41 pm
John Merlino Sat Apr 07, 2012 5:54 pm

 Jump to: Select a forum Computer Chess Club Forums----------------Computer Chess Club: General TopicsComputer Chess Club: Tournaments and MatchesComputer Chess Club: Programming and Technical DiscussionsComputer Chess Club: Engine Origins Other Forums----------------Chess Thinkers ForumForum Help and Suggestions
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum