Will CCC explode now? :-)

Discussion of anything and everything relating to chess playing software and machines.

Moderator: Ras

User avatar
Mike S.
Posts: 1480
Joined: Thu Mar 09, 2006 5:33 am

Will CCC explode now? :-)

Post by Mike S. »

The next days and weeks will be hot :mrgreen: Will CCC survive this or perish in desparation and anarchy? Maybe I should quit for a while, at least for the rest of January. But I expect one 'number of postings per hour record' after the other. Smoking keyboards! :D

C U in February.
Regards, Mike
gerold
Posts: 10121
Joined: Thu Mar 09, 2006 12:57 am
Location: van buren,missouri

Re: Will CCC explode now? :-)

Post by gerold »

Mike S. wrote:The next days and weeks will be hot :mrgreen: Will CCC survive this or perish in desparation and anarchy? Maybe I should quit for a while, at least for the rest of January. But I expect one 'number of postings per hour record' after the other. Smoking keyboards! :D

C U in February.
Come on Mike you can't leave now. :) :) :)
User avatar
Dr.Wael Deeb
Posts: 9773
Joined: Wed Mar 08, 2006 8:44 pm
Location: Amman,Jordan

Re: Will CCC explode now? :-)

Post by Dr.Wael Deeb »

gerold wrote:
Mike S. wrote:The next days and weeks will be hot :mrgreen: Will CCC survive this or perish in desparation and anarchy? Maybe I should quit for a while, at least for the rest of January. But I expect one 'number of postings per hour record' after the other. Smoking keyboards! :D

C U in February.
Come on Mike you can't leave now. :) :) :)
Aha,the party didn't begin yet :lol:
_No one can hit as hard as life.But it ain’t about how hard you can hit.It’s about how hard you can get hit and keep moving forward.How much you can take and keep moving forward….
Guetti

Re: Will CCC explode now? :-)

Post by Guetti »

Mike S. wrote:The next days and weeks will be hot :mrgreen: Will CCC survive this or perish in desparation and anarchy? Maybe I should quit for a while, at least for the rest of January. But I expect one 'number of postings per hour record' after the other. Smoking keyboards! :D

C U in February.
Howdy Mike, don't miss CCC. :)

Booooom!!!!

Sorry, to late! :(
User avatar
Graham Banks
Posts: 44907
Joined: Sun Feb 26, 2006 10:52 am
Location: Auckland, NZ

Re: Will CCC explode now? :-)

Post by Graham Banks »

Mike S. wrote:The next days and weeks will be hot :mrgreen: Will CCC survive this or perish in desparation and anarchy? Maybe I should quit for a while, at least for the rest of January. But I expect one 'number of postings per hour record' after the other. Smoking keyboards! :D

C U in February.
Hi Mike,

as long as members can express their views without resorting to personal abuse, it should be fine. :wink:
I must note that discussions have been very interesting and abuse free of late.

Regards, Graham.
gbanksnz at gmail.com
Ryan Benitez
Posts: 719
Joined: Thu Mar 09, 2006 1:21 am
Location: Portland Oregon

Re: Will CCC explode now? :-)

Post by Ryan Benitez »

I am not going to say that Strelka did or did not cut and paste code from another program or if it does or does not pose moral issues. I just think that a little bit of data to look at is enough to let every individual come to their own conclusion. Well I am getting cold so I am going to go search for something to trow on the fire so I can stay warm.

// From utility.c in crafty

unsigned int Random32(void) {
/*
random numbers from Mathematica 2.0.
SeedRandom = 1;
Table[Random[Integer, {0, 2^32 - 1}]
*/
static const unsigned long x[55] = {
1410651636UL, 3012776752UL, 3497475623UL, 2892145026UL, 1571949714UL,
3253082284UL, 3489895018UL, 387949491UL, 2597396737UL, 1981903553UL,
3160251843UL, 129444464UL, 1851443344UL, 4156445905UL, 224604922UL,
1455067070UL, 3953493484UL, 1460937157UL, 2528362617UL, 317430674UL,
3229354360UL, 117491133UL, 832845075UL, 1961600170UL, 1321557429UL,
747750121UL, 545747446UL, 810476036UL, 503334515UL, 4088144633UL,
2824216555UL, 3738252341UL, 3493754131UL, 3672533954UL, 29494241UL,
1180928407UL, 4213624418UL, 33062851UL, 3221315737UL, 1145213552UL,
2957984897UL, 4078668503UL, 2262661702UL, 65478801UL, 2527208841UL,
1960622036UL, 315685891UL, 1196037864UL, 804614524UL, 1421733266UL,
2017105031UL, 3882325900UL, 810735053UL, 384606609UL, 2393861397UL };
static int init = 1;
static unsigned long y[55];
static int j, k;
unsigned long ul;

if (init)
{
int i;

init = 0;
for (i = 0; i < 55; i++) y = x;
j = 24 - 1;
k = 55 - 1;
}

ul = (y[k] += y[j]);
if (--j < 0) j = 55 - 1;
if (--k < 0) k = 55 - 1;
return((unsigned int)ul);
}

BITBOARD Random64(void) {
BITBOARD result;
unsigned int r1, r2;

r1=Random32();
r2=Random32();
result=r1 | (BITBOARD) r2<<32;
return (result);
}

// from board.c in strelka

unsigned int Random32(void)
{ static const unsigned long x[55] = {
1410651636UL, 3012776752UL, 3497475623UL, 2892145026UL, 1571949714UL,
3253082284UL, 3489895018UL, 387949491UL, 2597396737UL, 1981903553UL,
3160251843UL, 129444464UL, 1851443344UL, 4156445905UL, 224604922UL,
1455067070UL, 3953493484UL, 1460937157UL, 2528362617UL, 317430674UL,
3229354360UL, 117491133UL, 832845075UL, 1961600170UL, 1321557429UL,
747750121UL, 545747446UL, 810476036UL, 503334515UL, 4088144633UL,
2824216555UL, 3738252341UL, 3493754131UL, 3672533954UL, 29494241UL,
1180928407UL, 4213624418UL, 33062851UL, 3221315737UL, 1145213552UL,
2957984897UL, 4078668503UL, 2262661702UL, 65478801UL, 2527208841UL,
1960622036UL, 315685891UL, 1196037864UL, 804614524UL, 1421733266UL,
2017105031UL, 3882325900UL, 810735053UL, 384606609UL, 2393861397UL
};
static int init = 1;
static unsigned long y[55];
static int j, k;
unsigned long ul;

if (init) {
int i;

init = 0;
for (i = 0; i < 55; i++) y = x;
j = 24 - 1;
k = 55 - 1;
}
ul = (y[k] += y[j]);
if (--j < 0) j = 55 - 1;
if (--k < 0) k = 55 - 1;
return ((unsigned int) ul);
}

unsigned __int64 Random64(void)
{ unsigned __int64 result;
unsigned int r1, r2;

r1 = Random32();
r2 = Random32();
result = r1 | (unsigned __int64) r2 << 32;
return (result);
}
Last edited by Ryan Benitez on Fri Jan 11, 2008 8:49 pm, edited 1 time in total.
User avatar
Dr.Wael Deeb
Posts: 9773
Joined: Wed Mar 08, 2006 8:44 pm
Location: Amman,Jordan

Re: Will CCC explode now? :-)

Post by Dr.Wael Deeb »

Graham Banks wrote:
Mike S. wrote:The next days and weeks will be hot :mrgreen: Will CCC survive this or perish in desparation and anarchy? Maybe I should quit for a while, at least for the rest of January. But I expect one 'number of postings per hour record' after the other. Smoking keyboards! :D

C U in February.
Hi Mike,

as long as members can express their views without resorting to personal abuse, it should be fine. :wink:
I must note that discussions have been very interesting and abuse free of late.

Regards, Graham.
I agree 100% with my old friend Graham :mrgreen:
_No one can hit as hard as life.But it ain’t about how hard you can hit.It’s about how hard you can get hit and keep moving forward.How much you can take and keep moving forward….
Uri Blass
Posts: 11020
Joined: Thu Mar 09, 2006 12:37 am
Location: Tel-Aviv Israel

Re: Will CCC explode now? :-)

Post by Uri Blass »

Ryan Benitez wrote:I am not going to say that Strelka did or did not cut and paste code from another program or if it does or does not pose moral issues. I just think that a little bit of data to look at is enough to let every individual come to their own conclusion. Well I am getting cold so I am going to go search for something to trow on the fire so I can stay warm.

// From utility.c in crafty

unsigned int Random32(void) {
/*
random numbers from Mathematica 2.0.
SeedRandom = 1;
Table[Random[Integer, {0, 2^32 - 1}]
*/
static const unsigned long x[55] = {
1410651636UL, 3012776752UL, 3497475623UL, 2892145026UL, 1571949714UL,
3253082284UL, 3489895018UL, 387949491UL, 2597396737UL, 1981903553UL,
3160251843UL, 129444464UL, 1851443344UL, 4156445905UL, 224604922UL,
1455067070UL, 3953493484UL, 1460937157UL, 2528362617UL, 317430674UL,
3229354360UL, 117491133UL, 832845075UL, 1961600170UL, 1321557429UL,
747750121UL, 545747446UL, 810476036UL, 503334515UL, 4088144633UL,
2824216555UL, 3738252341UL, 3493754131UL, 3672533954UL, 29494241UL,
1180928407UL, 4213624418UL, 33062851UL, 3221315737UL, 1145213552UL,
2957984897UL, 4078668503UL, 2262661702UL, 65478801UL, 2527208841UL,
1960622036UL, 315685891UL, 1196037864UL, 804614524UL, 1421733266UL,
2017105031UL, 3882325900UL, 810735053UL, 384606609UL, 2393861397UL };
static int init = 1;
static unsigned long y[55];
static int j, k;
unsigned long ul;

if (init)
{
int i;

init = 0;
for (i = 0; i < 55; i++) y = x;
j = 24 - 1;
k = 55 - 1;
}

ul = (y[k] += y[j]);
if (--j < 0) j = 55 - 1;
if (--k < 0) k = 55 - 1;
return((unsigned int)ul);
}

BITBOARD Random64(void) {
BITBOARD result;
unsigned int r1, r2;

r1=Random32();
r2=Random32();
result=r1 | (BITBOARD) r2<<32;
return (result);
}

// from board.c in strelka

unsigned int Random32(void)
{ static const unsigned long x[55] = {
1410651636UL, 3012776752UL, 3497475623UL, 2892145026UL, 1571949714UL,
3253082284UL, 3489895018UL, 387949491UL, 2597396737UL, 1981903553UL,
3160251843UL, 129444464UL, 1851443344UL, 4156445905UL, 224604922UL,
1455067070UL, 3953493484UL, 1460937157UL, 2528362617UL, 317430674UL,
3229354360UL, 117491133UL, 832845075UL, 1961600170UL, 1321557429UL,
747750121UL, 545747446UL, 810476036UL, 503334515UL, 4088144633UL,
2824216555UL, 3738252341UL, 3493754131UL, 3672533954UL, 29494241UL,
1180928407UL, 4213624418UL, 33062851UL, 3221315737UL, 1145213552UL,
2957984897UL, 4078668503UL, 2262661702UL, 65478801UL, 2527208841UL,
1960622036UL, 315685891UL, 1196037864UL, 804614524UL, 1421733266UL,
2017105031UL, 3882325900UL, 810735053UL, 384606609UL, 2393861397UL
};
static int init = 1;
static unsigned long y[55];
static int j, k;
unsigned long ul;

if (init) {
int i;

init = 0;
for (i = 0; i < 55; i++) y = x;
j = 24 - 1;
k = 55 - 1;
}
ul = (y[k] += y[j]);
if (--j < 0) j = 55 - 1;
if (--k < 0) k = 55 - 1;
return ((unsigned int) ul);
}

unsigned __int64 Random64(void)
{ unsigned __int64 result;
unsigned int r1, r2;

r1 = Random32();
r2 = Random32();
result = r1 | (unsigned __int64) r2 << 32;
return (result);
}


I cannot find the code that you talk about in strelka2 in board.c

Uri
User avatar
pedrox
Posts: 1056
Joined: Fri Mar 10, 2006 6:07 am
Location: Basque Country (Spain)

Re: Will CCC explode now? :-)

Post by pedrox »

The function that does not is good to get any conclusions, I also use it in danasah, 99% of the programs use any algorithm that is based on ideas of others, but that's not so bad.

What's the egtb? Why is permitted then use the code of other peoples? Fruit use this code.

Code: Select all

/* GNU Chess 5.0 - random.c - random number code
   Copyright (c) 1999-2002 Free Software Foundation, Inc.

   GNU Chess is based on the two research programs 
   Cobalt by Chua Kong-Sian and Gazebo by Stuart Cracraft.

   GNU Chess is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 2, or (at your option)
   any later version.

   GNU Chess is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with GNU Chess; see the file COPYING.  If not, write to
   the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
   Boston, MA 02111-1307, USA.

   Contact Info: 
     bug-gnu-chess@gnu.org
     cracraft@ai.mit.edu, cracraft@stanfordalumni.org, cracraft@earthlink.net
*/
/*
 *
 */

#include <stdio.h>
#include "common.h"

uint32_t Rand32 (void)
/****************************************************************************
 *
 *  A 32 bit random number generator.  An implementation in C of the 
 *  algorithm given by Knuth, the art of computer programming, vol. 2,
 *  pp. 26-27.  We use e=32, so we have to evaluate y(n) = y(n-24) + y(n-55)
 *  mod 2^32, which is implicitly done by unsigned arithmetic. 
 *
 ****************************************************************************/
{
/* 
 *  Random numbers from Mathematica 2.0
 *  SeedRandom = 1;
 *  Table[Random[Integer, {0, 2^32 - 1}]
 */
   static uint32_t x[55] =  
   {
	1410651636UL,
	3012776752UL,
	3497475623UL,
	2892145026UL,
	1571949714UL,
	3253082284UL,
	3489895018UL,
	387949491UL,
	2597396737UL,
	1981903553UL,
	3160251843UL,
	129444464UL,
	1851443344UL,
	4156445905UL,
	224604922UL,
	1455067070UL,
	3953493484UL,
	1460937157UL,
	2528362617UL,
	317430674UL,
	3229354360UL,
	117491133UL,
	832845075UL,
	1961600170UL,
	1321557429UL,
	747750121UL,
	545747446UL,
	810476036UL,
	503334515UL,
	4088144633UL,
	2824216555UL,
	3738252341UL,
	3493754131UL,
	3672533954UL,
	29494241UL,
	1180928407UL,
	4213624418UL,
	33062851UL,
	3221315737UL,
	1145213552UL,
	2957984897UL,
	4078668503UL,
	2262661702UL,
	65478801UL,
	2527208841UL,
	1960622036UL,		
	315685891UL,
	1196037864UL,
	804614524UL,
	1421733266UL,
	2017105031UL,
	3882325900UL,
	810735053UL,
	384606609UL,
	2393861397UL
   };
   static int init = true;
   static uint32_t y[55];
   static int j, k;
   uint32_t ul;

   if (init)
   {
      int i;
      init = false;
      for (i = 0; i < 55; i++)
         y[i] = x[i];
      j = 24 - 1;
      k = 55 - 1;
   }
   ul = (y[k] += y[j]);
   if (--j < 0) j = 55 - 1;
   if (--k < 0) k = 55 - 1;
   return (ul);
}

HashType Rand64 (void)
{
  HashType b;

  b = Rand32();
  b = b << 32;
  b |= Rand32 ();
  return (b);
}

Ryan Benitez
Posts: 719
Joined: Thu Mar 09, 2006 1:21 am
Location: Portland Oregon

Re: Will CCC explode now? :-)

Post by Ryan Benitez »

check 1.8