Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: slow coding

Author: Ryan B.

Date: 15:38:53 11/17/05

Go up one level in this thread


On November 17, 2005 at 18:34:34, Daniel Mehrmannn wrote:

>On November 17, 2005 at 18:13:36, Dann Corbit wrote:
>
>>On November 17, 2005 at 17:05:24, Jarkko Pesonen wrote:
>>
>>>http://www.uciengines.de/UCI-Engines/TogaII/togaii.html
>>>
>>>engine name Toga 1.0MV.6
>>>
>>
>>static int full_search(board_t * board, int alpha, int beta, int depth, int
>>height, mv_t pv[], int node_type) {
>>// ...
>>// I set FutilityMargin in the general case, because some paths
>>// could leave it uninitialized.
>>   int FutilityMargin = FutilityMargin3;
>>
>>Consider the following when depth >= 3:
>>
>>			if (depth < 2)
>>				FutilityMargin = FutilityMargin1;
>>			else if (depth < 3)
>>				FutilityMargin = FutilityMargin2;
>>			/* else
>>				FutilityMargin = FutilityMargin3; */
>>
>>Perhaps futility pruning is never used in such a case, but then if so there is
>>no harm in setting the value.
>
>btw this looks like a very slow coding. It's better to use here switch()/case
>stuff for an faster code instead the expensive if() stuff.
>
>Best,
>Daniel


with so few options this is trivial.

Ryan



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.