Author: blass uri
Date: 12:03:39 06/26/00
Go up one level in this thread
On June 26, 2000 at 10:52:52, Simon Finn wrote:
>On June 26, 2000 at 08:36:35, blass uri wrote:
>
>>On June 26, 2000 at 08:07:02, blass uri wrote:
>>
>>>On June 26, 2000 at 05:47:28, Simon Finn wrote:
>>>
>>>>>static int compare(solution* a, solution* b)
>>>>>{
>>>>> int i;
>>>>> for (i = 0; i < SOLUTION_SIZE; i++)
>>>>> {
>>>>> if (a[i] < b[i]) return -1;
>>>>> if (a[i] > b[i]) return 1;
>>>>
>>>>Sorry - that should be:
>>>> if ((*a)[i] < (*b)[i]) return -1;
>>>>
>>>>etc.
>>>>
>>>>> }
>>>>> return 0;
>>>
>>>
>>>This compare is slow because it can take SOLUTION_SIZE steps and it often takes
>>>more than 1 step.
>
>There's a trade-off.
>
>Computing a hash-key will take SOLUTION_SIZE steps,
>but you only do it once per solution.
>
>Comparing two solutions often takes many fewer steps
>(often only 1), but you do it log(n) times per solution.
>
>If log(n) is about 20, and SOLUTION_SIZE is 256, hashing
>loses unless the *average* number of steps in the comparision
>is more than 10. This depends on your data, of course.
>
>Are your solutions really that similar?
My solutions are often similiar(I did not calculate the average number but I do
not care about SOLUTION_SIZE steps per solution because I do clearly more than
SOLUTION_SIZE steps only to calculate the solutions.
SOLUTION_SIZE is not a fixed number and it is 256 only at level 8.
It is 2 at depth 1, 4 at depth 2 when my target is to find if there is a
solution at depth 9.
The problem that I investigate is easy to explain.
You choose a number with 9 digits when all the digits are 0 or 1 and my target
is to guess your number or to be almost correct in guessing your number(one
mistake is allowed)
The question is how many guesses I need to be sure that I achieve my target.
My program tries to attack this question by solving equations and inequalities.
Uri
This page took 0.01 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.