EGBB implementation

Discussion of chess software programming and technical issues.

Moderator: Ras

User avatar
Kempelen
Posts: 620
Joined: Fri Feb 08, 2008 10:44 am
Location: Madrid - Spain

Re: EGBB implementation

Post by Kempelen »

Daniel Shawul wrote:The move generator I have inside produce castling moves. In fact scorpio sent Ke1-g1 as best move?? The move generator produces castling moves even if there are no rooks :) The old bit bases also crash at this illegal position so this is definitely not a new problem.
Using scorpio you can "setboard the position" and then "score" multiple times to probe it. No problems there.

I have uploaded the source code of egbb probe which compiles with no problems with VS 2008 after i removed tons of warnings associated with deprecated functions. So please try http://www.geocities.com/dshawul/egbbdll_new.zip, and see if there is any change.
Hi Daniel,

For me, it continues crashing. In my case it first probe this position:
8/6p1/7k/8/8/2K5/1P6/8 b - -

and it returns ok, but it crashs in the second attempt with this position:
8/6p1/7k/8/2K5/8/1P6/8 b - -

I have try to store result in the TT before returning, and also disabling the TT, but that looks is not the problem...
Fermin Serrano
Author of 'Rodin' engine
http://sites.google.com/site/clonfsp/
User avatar
Desperado
Posts: 879
Joined: Mon Dec 15, 2008 11:45 am

Re: EGBB implementation

Post by Desperado »

Hi Fermin + Daniel,

i had a first look at the egbbdll sources and compiled them
without any problems for x32 + x64 platforms.

started with the original settings given in the source

Code: Select all

/*
Define PARALLEL to enable multi threading
*/
#define PARALLEL
#define USESPINLOCK

/*smp optional code*/
#ifdef PARALLEL
#	 define SMP_CODE(x) x
#else
#    define SMP_CODE(x)
#endif

#ifdef PARALLEL
#    define VOLATILE volatile
/*threads*/
#    ifdef _MSC_VER
#        include <process.h>
#        define pthread_t HANDLE
#        define t_create(f,p,t) t = (pthread_t) _beginthread(f,0,(void*)p)
#        define t_sleep(x)    Sleep(x)
#    else
#        include <pthread.h>
#        define t_create(f,p,t) pthread_create(&t,0,(void*(*)(void*))&f,(void*)p)
#        define t_sleep(x)    usleep((x) * 1000)
#    endif
/*locks*/
#    ifdef _MSC_VER
#        ifdef USESPINLOCK
#             define LOCK VOLATILE int
#             define l_create(x)   ((x) = 0)
#             define l_lock(x)     while(InterlockedExchange((LPLONG)&(x),1) != 0) {while((x) != 0);}
#             define l_unlock(x)   ((x) = 0)
#        else
#             define LOCK CRITICAL_SECTION
#             define l_create(x)   InitializeCriticalSection(&x)
#             define l_lock(x)     EnterCriticalSection(&x)
#             define l_unlock(x)   LeaveCriticalSection(&x)
#        endif   
#    else
#			  define LOCK pthread_mutex_t
#			  define l_create(x)   pthread_mutex_init(&(x),0)
#			  define l_lock(x)     pthread_mutex_lock(&(x))
#			  define l_unlock(x)   pthread_mutex_unlock(&(x))
#    endif
#else
#    define VOLATILE
#    define l_lock(x)
#    define l_unlock(x)
#endif
started with:

1: ok

Code: Select all

#define PARALLEL
#define USESPINLOCK
2: ok

Code: Select all

#define PARALLEL
// #define USESPINLOCK
3: compile errors

Code: Select all

// #define PARALLEL
// #define USESPINLOCK
changed the following to get it to run.

Code: Select all

#else //NOT PARALLEL
#    define LOCK volatile int //corrected
#    define l_create(x)	        //added
#    define l_lock(x)
#    define l_unlock(x)
#endif
1.
==========

So it looks it never really was compiled for _non parallel_ settings ?!

2.
==========

This let me think that like my intuition somewhere else in the thread
something strange was going on with multithreading.
Which would underline the type of error it was producing (access ok n-times n+1 time it crashes).

Of course this is at the moment just a thought, and has to be prooved
further.

2.a
==========

Code: Select all

int probe_egbb_xxx(int player, int w_king, int b_king,
			   int piece1, int square1,
			   int piece2, int square2,
			   int piece3, int square3
			   ) {

    
	register int wdl_score,score,all_c,p_dist,material,ktable;

	//get score
	if(piece1 == _EMPTY)
		square1 = INVALID;
	if(piece2 == _EMPTY)
		square2 = INVALID;
	if(piece3 == _EMPTY)
		square3 = INVALID;

	PSEARCHER psearcher;
	l_lock(searcher_lock);
	for(int i = 0;i < 8;i++) {
		if(!searchers[i].used) {
			psearcher = &searchers[i];
			psearcher->used = 1;
			break;
		}
	}
	l_unlock(searcher_lock);

..........................
..........................
..........................

if here is to find a problem with l_lock/l_unlock, this would explain
at least my problems.
(i will check the InterLockedExchange / InterLockedExchange64 issues)

Summary:
==========

So far, no problems with compiling the dlls.
I will have a _deeper_ look on it today.

@Fermin:

Because i am not able to use the dlls for the moment, would sent
you the dlls you need, if you like.

@Daniel:

thx for the source!

Unfortunatelly there is something to find, because more than hardcoding
the input for the probeEgbb cannot be done (i think) outside the dll.

one more question: does the uploaded source is the base for
the latest released egbdlls (and the settings, i was able to look at) ?

regards, Michael
User avatar
Kempelen
Posts: 620
Joined: Fri Feb 08, 2008 10:44 am
Location: Madrid - Spain

Re: EGBB implementation

Post by Kempelen »

Desperado wrote: @Fermin:

Because i am not able to use the dlls for the moment, would sent
you the dlls you need, if you like.
Thanks, send it to me: clonfsp_at_hotmail.com
Fermin Serrano
Author of 'Rodin' engine
http://sites.google.com/site/clonfsp/
User avatar
Desperado
Posts: 879
Joined: Mon Dec 15, 2008 11:45 am

Re: EGBB implementation

Post by Desperado »

Kempelen wrote:
Desperado wrote: @Fermin:

Because i am not able to use the dlls for the moment, would sent
you the dlls you need, if you like.
Thanks, send it to me: clonfsp_at_hotmail.com
done :)
Daniel Shawul
Posts: 4186
Joined: Tue Mar 14, 2006 11:34 am
Location: Ethiopia

Re: EGBB implementation

Post by Daniel Shawul »

@Fermin,
Make sure that the egbbs are loaded and the message "Egbbprobe v3.3" is displayed. Here is scorpio's run for both, with no problems.

Code: Select all

feature done=0
ht 524288 X 64 = 32MB
eht 524288 X 16 = 8MB
pht 524288 X 16 = 8MB
processors [1]
EgbbProbe 3.3 by Daniel Shawul
Egbbs loaded !
loading_time = 11s
force
setboard 8/6p1/7k/8/8/2K5/1P6/8 b - -
d

        ________
        ______p_
        _______k
        ________
        ________
        __K_____
        _P______
        ________
score
bitbase_score = 0
score
bitbase_score = 0
score
bitbase_score = 0
score
bitbase_score = 0
setboard 8/6p1/7k/8/2K5/8/1P6/8 b - -
d

        ________
        ______p_
        _______k
        ________
        __K_____
        ________
        _P______
        ________
score
bitbase_score = 0
score
bitbase_score = 0
score
bitbase_score = 0
score
bitbase_score = 0
score
bitbase_score = 0

User avatar
Desperado
Posts: 879
Joined: Mon Dec 15, 2008 11:45 am

Re: EGBB implementation

Post by Desperado »

@Daniel:

After comiling reinstalling the bitbases now, i decided
to do some tests on the 2 given positions again:
(before using my own compiled dlls)

Position Fermin: 8/6p1/7k/8/8/2K5/1P6/8 b - -

- bright 0.3a ok
- bright 0.4a ok
- toga 1.4 beta5c ok
- cyclone 3.4 ok
- Fruit 2.3.1 ok

Position Fermin: 8/6p1/7k/8/8/2K5/1P6/8 w - -

- bright 0.3a crashing
- bright 0.4a crashing
- cyclone ok
...
Position Michael: 8/8/5P2/8/3B2k1/1P6/1K6/8 w - - 0 1

fruit 2.3.1 is the only one that doesnt crash.
(but fruit may work around the problem through its hashtables)

All others are crashing...
Daniel Shawul
Posts: 4186
Joined: Tue Mar 14, 2006 11:34 am
Location: Ethiopia

Re: EGBB implementation

Post by Daniel Shawul »

@Michael,
I just tested bright 0.3 on my laptop (single core) and it runs fine on the postion, later i will run it with 4 cores.

Code: Select all


bright-0.3a
(c) 2007 AJ Siemelink
All rights reserved

inifile=bright.ini
book found: drdeeb-ii.bbk, 861662 positions
EgbbProbe 3.3 by Daniel Shawul
Egbbs loaded !
egbb.3men=1
egbb.4men=1
egbb.5men=1
EGBB: loaded, maxmen=5, ram=4
starting main search thread...
started 0 new worker threads

   +---+---+---+---+---+---+---+---+
 8 |*r*|*n*|*b*|*q*|*k*|*b*|*n*|*r*|
   +---+---+---+---+---+---+---+---+
 7 |*p*|*p*|*p*|*p*|*p*|*p*|*p*|*p*|
   +---+---+---+---+---+---+---+---+
 6 |   |   |   |   |   |   |   |   |
   +---+---+---+---+---+---+---+---+
 5 |   |   |   |   |   |   |   |   |
   +---+---+---+---+---+---+---+---+
 4 |   |   |   |   |   |   |   |   |
   +---+---+---+---+---+---+---+---+
 3 |   |   |   |   |   |   |   |   |
   +---+---+---+---+---+---+---+---+
 2 |(P)|(P)|(P)|(P)|(P)|(P)|(P)|(P)|
   +---+---+---+---+---+---+---+---+
 1 |(R)|(N)|(B)|(Q)|(K)|(B)|(N)|(R)|  40-40=0
   +---+---+---+---+---+---+---+---+
     a   b   c   d   e   f   g   h

rnbqkbnr/pppppppp/////PPPPPPPP/RNBQKBNR w KQkq - 0 0
 hash=6975491b85d41ed6
phash=d2fbd4e9dcbfcead
% fen 8/8/5P2/8/3B2k1/1P6/1K6/8 w - - 0 1

   +---+---+---+---+---+---+---+---+
 8 |   |   |   |   |   |   |   |   |
   +---+---+---+---+---+---+---+---+
 7 |   |   |   |   |   |   |   |   |
   +---+---+---+---+---+---+---+---+
 6 |   |   |   |   |   |(P)|   |   |
   +---+---+---+---+---+---+---+---+
 5 |   |   |   |   |   |   |   |   |
   +---+---+---+---+---+---+---+---+
 4 |   |   |   |(B)|   |   |*k*|   |
   +---+---+---+---+---+---+---+---+
 3 |   |(P)|   |   |   |   |   |   |
   +---+---+---+---+---+---+---+---+
 2 |   |(K)|   |   |   |   |   |   |
   +---+---+---+---+---+---+---+---+
 1 |   |   |   |   |   |   |   |   |  5-0=5  BPP
   +---+---+---+---+---+---+---+---+
     a   b   c   d   e   f   g   h

//5P//3B2k/1P/1K/ w - - 0 0
 hash=8f7200df775ff83d
phash=f2a038a7b62b4b78
% st 60
no such command: st
% mt 60
millis=60000
  easy=18750
  next=37500
  hi  =60000
  lo  =60000
% go
0127437013:go()...
Uci:First search out of book is at 1 ply
Expected current status==POSITION, got 0
out of book=1
NO TIME CALCULATED
Nominal search time is 60.00 seconds, infinite=0
0127437029:go() ok
% eval=1288
  [1/1]     0.000       1     1280  Bd4c5
  [1/1]     0.015       9     1372  ++9/17 f6f7
  [1/1]     0.015      10     1372  f6f7
  [1/1]     0.031      18     1372  ok/18.0
  [2/1]     0.031      19     5455  f6f7
  [2/1]     0.062      35     5455  ok/1.9
  [3/1]     0.062      36     5455  f6f7
  [3/1]     0.078      52     5455  ok/1.5
  [4/1]     0.078      53     5455  f6f7
  [4/1]     0.078      69     5455  ok/1.3
  [5/1]     0.078      91     5335  f6f7 Kg4f5
  [5/1]     0.078     135     5348  ++12/17 Kb2c3
  [5/1]     0.093     155     5348  Kb2c3 Kg4f5
  [5/1]     0.093     170     5348  ok/2.5
  [6/4]     0.093     250     5438  Kb2c3 Kg4f5 f6f7
  [6/4]     0.093     274     5706  ++2/17 f6f7
  [6/10]    0.109     424     5706  f6f7 Kg4f5 f7f8=Q+
  [6/10]    0.109     710     5706  ok/4.2
  [7/10]    0.109     742     5706  f6f7 Kg4f5 f7f8=Q+
  [7/10]    0.124    1045     5706  ok/1.5
  [8/10]    0.124    1276     5656  f6f7 Kg4f5 f7f8=Q+ Kf5e4
  [8/12]    0.140    8036     5656  ok/7.7
  [9/12]    0.171    8801     5697  f6f7 Kg4f5 f7f8=Q+ Kf5e4 b3b4
  [9/12]    0.218   19037     5697  ok/2.4
 [10/12]    0.234   19308     5697  f6f7 Kg4f5 f7f8=Q+ Kf5e4 b3b4
 [10/14]    0.249   31943     5697  ok/1.7
 [11/16]    0.280   40404     5661  f6f7 Kg4f5 f7f8=Q+ Kf5e4 Qf8d6 Ke4d3
 [11/16]    0.390   93980     5661  ok/2.9
 [12/17]    0.468     108k    5702  f6f7 Kg4f5 f7f8=Q+ Kf5e4 b3b4 Ke4d5 Kb2c3
 [12/17]    0.702     199k    5702  ok/2.2
 [13/17]    0.764     220k    5702  f6f7 Kg4f5 f7f8=Q+ Kf5e4 b3b4 Ke4d5 Kb2c3
 [13/17]    1.092     375k    5702  ok/1.9
 [14/18]    1.279     451k    5688  f6f7 Kg4f5 f7f8=Q+ Kf5e4 b3b4 Ke4d5 Kb2c3 Kd
5e4
 [14/18]    1.794     725k    5688  ok/1.9
 [15/20]    2.698     939k    5741  f6f7 Kg4f5 f7f8=Q+ Kf5e4 Qf8e8+ Ke4f4 Qe8e6
Kf4g5 b3b4
 [15/20]    4.586    1407k    5741  ok/1.9
 [16/20]    6.021    1927k    5748  f6f7 Kg4f5 f7f8=Q+ Kf5e6 Qf8f6+ Ke6d7 Bd4b6
Kd7e8 Kb2c3
 [16/20]    8.065    2602k    5748  ok/1.8
 [17/20]    9.235    3058k    5726  f6f7 Kg4f5 f7f8=Q+ Kf5e6 Qf8d8 Ke6f7 Qd8d7+
Kf7f8 Kb2c3 Kf8g8
 [17/20]   12.074    4111k    5726  ok/1.6
 [18/22]   16.957    5367k    5770  f6f7 Kg4f5 f7f8=Q+ Kf5e6 Qf8d8 Ke6f5 Qd8f6+
Kf5g4 Kb2c3 Kg4g3 b3b4
 [18/22]   25.397    6949k    5770  ok/1.7
 [19/24]   29.172    7938k    5770  f6f7 Kg4f5 f7f8=Q+ Kf5e6 Qf8d8 Ke6f5 Qd8f6+
Kf5g4 Kb2c3 Kg4g3 b3b4
 [19/24]   31.044    8393k    5771  ++4/17 Bd4e5
 [19/24]   32.947    8883k    5770  --Bd4e5
 [19/24]   33.290    8928k    5771  ++5/17 Kb2c3
 [19/24]   35.349    9398k    5770  --Kb2c3
 [19/24]   35.537    9446k    5771  ++6/17 Kb2a2
 [19/24]   35.771    9512k    5770  --Kb2a2
 [19/24]   37.299    9720k    5771  ++10/17 Kb2b1
 [19/24]   37.471    9780k    5770  --Kb2b1
 [19/24]   39.593   10014k    5770  ok/stop
nodes  : i=66.39%, f=32.10%, q= 1.50%, nps=252k
inodes : pv= 0.02%, cut=14.08%, all= 6.82%, end= 0.00%
tt     : probes=9672k, hits=72.01%, cuts=56.21%, upd=72.64%, full=25.67%
order  : 1stpv=133.24%, 1stcut=92.22%
killers:  0.00%, #=283776/0, killed= 4.17%
null   :  0.00%, cuts=-1.#J%
iid    :  8.81%
reduce :  tries=5343k, fail= 0.00%
smp    : splits=0 , fail=-1.#J%
master :   10014k wait=0.00%, admin=0.00%, work= 0.00%, nps=252k, time=0, kills=
0
Daniel Shawul
Posts: 4186
Joined: Tue Mar 14, 2006 11:34 am
Location: Ethiopia

Re: EGBB implementation

Post by Daniel Shawul »

And bright 0.4a on 4 cores doesn't crash either :? . I will check the other engines next.

Code: Select all


bright-0.4a
(c) 2006-2008 AJ Siemelink
All rights reserved

inifile=bright.ini
could not read book file: drdeeb-iii.bbk
EgbbProbe 3.3.1 by Daniel Shawul
Egbbs loaded !
egbb.3men=1
egbb.4men=1
egbb.5men=1
EGBB: loaded, maxmen=5, ram=4
!--using parallel search with 4 threads!
starting main search thread...
starting worker1...
starting worker2...
starting worker3...
started 3 new worker threads

   +---+---+---+---+---+---+---+---+
 8 |*r*|*n*|*b*|*q*|*k*|*b*|*n*|*r*|
   +---+---+---+---+---+---+---+---+
 7 |*p*|*p*|*p*|*p*|*p*|*p*|*p*|*p*|
   +---+---+---+---+---+---+---+---+
 6 |   |   |   |   |   |   |   |   |
   +---+---+---+---+---+---+---+---+
 5 |   |   |   |   |   |   |   |   |
   +---+---+---+---+---+---+---+---+
 4 |   |   |   |   |   |   |   |   |
   +---+---+---+---+---+---+---+---+
 3 |   |   |   |   |   |   |   |   |
   +---+---+---+---+---+---+---+---+
 2 |(P)|(P)|(P)|(P)|(P)|(P)|(P)|(P)|
   +---+---+---+---+---+---+---+---+
 1 |(R)|(N)|(B)|(Q)|(K)|(B)|(N)|(R)|  40-40=0
   +---+---+---+---+---+---+---+---+
     a   b   c   d   e   f   g   h

rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 0
 hash=6975491b85d41ed6
phash=d2fbd4e9dcbfcead
% fen 8/8/5P2/8/3B2k1/1P6/1K6/8 w - - 0 1

   +---+---+---+---+---+---+---+---+
 8 |   |   |   |   |   |   |   |   |
   +---+---+---+---+---+---+---+---+
 7 |   |   |   |   |   |   |   |   |
   +---+---+---+---+---+---+---+---+
 6 |   |   |   |   |   |(P)|   |   |
   +---+---+---+---+---+---+---+---+
 5 |   |   |   |   |   |   |   |   |
   +---+---+---+---+---+---+---+---+
 4 |   |   |   |(B)|   |   |*k*|   |
   +---+---+---+---+---+---+---+---+
 3 |   |(P)|   |   |   |   |   |   |
   +---+---+---+---+---+---+---+---+
 2 |   |(K)|   |   |   |   |   |   |
   +---+---+---+---+---+---+---+---+
 1 |   |   |   |   |   |   |   |   |  5-0=5  BPP
   +---+---+---+---+---+---+---+---+
     a   b   c   d   e   f   g   h

8/8/5P2/8/3B2k1/1P6/1K6/8 w - - 0 0
 hash=8f7200df775ff83d
phash=f2a038a7b62b4b78
% mt 60
millis=60000
  easy=3599
  next=36000
  hi  =60000
  lo  =60000
% go
0630051296:go()...
Uci:First search out of book is at 1 ply
Expected current status==POSITION, got 0
out of book=1
go(): no time/depth/node limit
Nominal search time is 60.00 seconds, infinite=0, nodes=0
0630051296:go() ok
eval=1116
  % [1/1]     0.016       1     1104  Bd4c5
  [1/1]     0.016       9     1156  ++9/17 f6f7
  [1/1]     0.016      10     1156  f6f7
  [1/1]     0.016      18     1156  ok/18.0
  [2/1]     0.016      19     5454  f6f7
  [2/1]     0.016      35     5454  ok/1.9
  [3/1]     0.016      36     5454  f6f7
  [3/1]     0.016      52     5454  ok/1.5
  [4/1]     0.016      53     5454  f6f7
  [4/1]     0.016      69     5454  ok/1.3
  [5/5]     0.016     148     5333  f6f7 Kg4f5
  [5/5]     0.016     189     5346  ++12/17 Kb2c3
  [5/5]     0.016     209     5346  Kb2c3 Kg4f5
  [5/5]     0.016     224     5346  ok/3.2
  [6/5]     0.016     283     5435  Kb2c3 Kg4f5 f6f7
  [6/5]     0.016     300     5703  ++2/17 f6f7
  [6/5]     0.016     372     5703  f6f7 Kg4f5 f7f8=Q+
  [6/5]     0.016     658     5703  ok/2.9
  [7/5]     0.016     690     5703  f6f7 Kg4f5 f7f8=Q+
  [7/5]     0.032     993     5703  ok/1.5
  [8/10]    0.032    1299     5652  f6f7 Kg4f5 f7f8=Q+ Kf5e4
  [8/10]    0.032    5475     5652  ok/5.5
  [9/10]    0.032    6053     5692  f6f7 Kg4f5 f7f8=Q+ Kf5e4 b3b4
  [9/12]    0.047   17580     5692  ok/3.2
 [10/12]    0.047   17827     5692  f6f7 Kg4f5 f7f8=Q+ Kf5e4 b3b4
 [10/14]    0.063   27629     5692  ok/1.6
 [11/18]    0.063   35354     5665  f6f7 Kg4f5 f7f8=Q+ Kf5e4 Qf8c5 Ke4f4
 [11/18]    0.094   88100     5665  ok/3.2
 [12/18]    0.110     100k    5695  f6f7 Kg4f5 f7f8=Q+ Kf5e4 b3b4 Ke4d5 Kb2c3
 [12/18]    0.188     187k    5695  ok/2.2
 [13/18]    0.204     208k    5695  f6f7 Kg4f5 f7f8=Q+ Kf5e4 b3b4 Ke4d5 Kb2c3
 [13/18]    0.297     356k    5695  ok/1.9
 [14/18]    0.344     439k    5680  f6f7 Kg4f5 f7f8=Q+ Kf5e4 b3b4 Ke4d5 Kb2c3 Kd
5e4
 [14/18]    0.485     741k    5680  ok/2.1
 [15/18]    0.704     987k    5729  f6f7 Kg4f5 f7f8=Q+ Kf5e4 Qf8e8+ Ke4f4 b3b4 K
f4f5 Kb2c3
 [15/18]    1.157    1506k    5729  ok/2.0
 [16/18]    1.297    1704k    5732  f6f7 Kg4f5 f7f8=Q+ Kf5e4 Qf8h6 Ke4f5 Qh6e3 K
f5g4 b3b4
 [16/19]    1.735    2389k    5732  ok/1.6
 [17/20]    2.969    5188k    5704  f6f7 Kg4f5 f7f8=Q+ Kf5e6 Bd4c5 Ke6d7 Qf8d6+
Kd7c8 Qd6e7 Kc8b8
 [17/20]    3.485    6056k    5704  ok/2.5
 [18/21]    6.344    8610k    5976  f6f7 Kg4f5 f7f8=Q+ Kf5e6 Qf8e8+ Ke6d6 Bd4b6
Kd6d5 Bb6c5 Kd5xc5 Qe8d7 Kc5b6 b3b4 Kb6a6 Qd7c7 Ka6b5 Kb2a1 Kb5xb4
 [18/22]    7.797   10264k    5976  ok/1.7
 [19/22]    9.016   11601k    5995  f6f7 Kg4f5 f7f8=Q+ Kf5e6 Qf8e8+ Ke6d6 Bd4b6
Kd6d5 Bb6c5 Kd5xc5 b3b4+ Kc5xb4 Qe8c6 Kb4a5 Qc6b7 Ka5a4 Kb2c3 Ka4a5 Kc3d4
 [19/22]    9.813   12744k    6467  ++4/17 Bd4e5
 [19/24]   10.625   16239k    5995  --Bd4e5
 [19/24]   11.391   17071k    5995  ok/1.7
 [20/24]   15.704   33609k     +10# f6f7 Kg4f5 f7f8=Q+ Kf5e6 Qf8e8+ Ke6d6 Bd4b6
Kd6d5 Bb6c5 Kd5xc5 Qe8e6 Kc5d4 Kb2c2 Kd4c5 Kc2c3 Kc5b5 b3b4 Kb5a4 Qe6a6+
 [20/24]   17.219   38807k     +10# (optimal)
nodes  : i=57.78%, f=38.37%, q= 3.85%, p= 0.00%, nps=2253k
inodes : pv= 0.01%, cut=16.45%, all= 6.40%, end= 0.02%
tt     : probes=33045k, hits=80.00%, cuts=62.89%, upd=77.34%, full=59.98%
order  : 1stpv=117.71%, 1stcut=96.94%
killers:  0.00%, #=991793/0, killed= 4.32%
null   :  0.00%, cuts=-1.#J%
iid    :  5.69%
reduce :  tries=18519k, fail= 0.01%
smp    : splits=156k, fail= 1.39%
master :    9345k wait=0.81%, admin=0.00%, work= 0.00%, nps=542k, time=139, kill
s=679
slave1 :   10422k wait=1.10%, admin=0.09%, work=99.09%, nps=605k, time=17266, ki
lls=763
slave2 :    9205k wait=1.18%, admin=0.09%, work=99.18%, nps=534k, time=17297, ki
lls=690
slave3 :    9833k wait=1.27%, admin=0.09%, work=99.45%, nps=571k, time=17359, ki
lls=681
User avatar
Desperado
Posts: 879
Joined: Mon Dec 15, 2008 11:45 am

Re: EGBB implementation

Post by Desperado »

@Daniel:

the only stable version, which manages all configurations and
positions given is Fruit 2.3.1

All others crashing constantly in my position, and sometimes
Fermins position with white to move.

But all engines use the egbb proper (it looks like), because
none is making an execption on Fermins position with black to move.

Well, there is definitely something going wrong, at least on my system.
Therefore it may be really a matter of multithreading, where the
os of course has influence too.

Did you already run it on Vista64 ?
I think there is no way arround to examine your given code much more
deeply.

(BTW, my own compiled dlls doesent help either)
cheers
Daniel Shawul
Posts: 4186
Joined: Tue Mar 14, 2006 11:34 am
Location: Ethiopia

Re: EGBB implementation

Post by Daniel Shawul »

All have passed.

Toga 1.4 beta 5 on 4 cores

Code: Select all

FEN: 8/8/5P2/8/3B2k1/1P6/1K6/8 w - - 0 1 

TogaII14-5c-4cpu:
  1/1	00:00	           2	0	+9.94	Kb2a1
  1/1	00:00	           3	0	+10.22	Kb2b1
  1/1	00:00	           4	0	+10.33	Kb2c1
  1/1	00:00	           6	0	+10.58	Kb2c2
  1/2	00:00	          19	0	+10.60	b3b4 Kg4f5
  1/6	00:00	          80	0	+14.34	f6f7 Kg4g5
  2/6	00:00	          82	0	+54.15	f6f7
  3/6	00:00	         100	0	+54.15	f6f7
  4/6	00:00	         133	0	+54.15	f6f7
  5/6	00:00	         166	0	+54.15	f6f7
  6/6	00:00	         246	0	+54.15	f6f7
  7/6	00:00	         625	0	+54.15	f6f7
  8/6	00:00	         979	0	+54.15	f6f7
  9/6	00:00	       1.733	0	+54.15	f6f7
 10/6	00:00	       2.442	0	+54.15	f6f7
 11/6	00:00	       3.615	0	+54.15	f6f7
 12/7	00:00	       6.092	0	+54.15	f6f7
 13/12	00:00	       9.220	0	+54.15	f6f7
 14/12	00:00	      12.774	0	+54.15	f6f7
 15/12	00:00	      17.578	0	+54.15	f6f7
 16/12	00:00	      23.787	0	+54.15	f6f7
 17/12	00:00	      29.676	0	+54.15	f6f7
 18/12	00:00	      39.272	0	+54.15	f6f7
 19/12	00:00	      51.454	0	+54.15	f6f7
 20/12	00:00	      60.193	0	+54.15	f6f7
 21/13	00:01	      79.145	312.909	+54.15	f6f7
 22/16	00:01	      98.031	322.374	+54.15	f6f7
 23/16	00:01	     118.054	331.719	+54.15	f6f7
 24/16	00:02	     149.410	281.670	+54.15	f6f7
 25/18	00:02	     191.823	293.595	+54.15	f6f7
 26/18	00:03	     227.247	303.533	+54.15	f6f7
 27/18	00:04	     289.454	280.011	+54.15	f6f7
 28/18	00:04	     348.281	293.897	+54.15	f6f7
Cyclone Xtreme

Code: Select all

FEN: 8/8/5P2/8/3B2k1/1P6/1K6/8 w - - 0 1 

Cyclone xTreme:
  1/1	00:00	           2	0	+9.96	Kb2a1
  1/1	00:00	           3	0	+10.24	Kb2b1
  1/1	00:00	           4	0	+10.35	Kb2c1
  1/1	00:00	           6	0	+10.60	Kb2c2
  1/1	00:00	           9	0	+54.01	b3b4
  1/1	00:00	          18	0	+54.15	f6f7
  2/1	00:00	          20	0	+54.15	f6f7
  3/1	00:00	          38	0	+54.15	f6f7
  4/1	00:00	          56	0	+54.15	f6f7
  5/1	00:00	          74	0	+54.15	f6f7
  6/3	00:00	         140	0	+54.15	f6f7
  7/4	00:00	         396	0	+54.15	f6f7
  8/4	00:00	         658	0	+54.15	f6f7
  9/5	00:00	       1.496	0	+54.15	f6f7
 10/6	00:00	       3.246	0	+54.15	f6f7
 11/6	00:00	       5.204	0	+54.15	f6f7
 12/7	00:00	       9.101	0	+54.15	f6f7
 13/8	00:00	      15.790	0	+54.15	f6f7
 14/8	00:00	      22.532	0	+54.15	f6f7
 15/9	00:00	      32.947	0	+54.15	f6f7
 16/10	00:00	      47.196	0	+54.15	f6f7
 17/10	00:00	      61.279	0	+54.15	f6f7
 18/11	00:00	      80.063	0	+54.15	f6f7
 19/12	00:00	     103.090	0	+54.15	f6f7
 20/12	00:00	     125.762	0	+54.15	f6f7
 21/13	00:00	     153.941	0	+54.15	f6f7
 22/14	00:00	     187.091	0	+54.15	f6f7
 23/14	00:01	     219.323	802.639	+54.15	f6f7
 24/15	00:01	     261.413	769.422	+54.15	f6f7
 25/18	00:01	     307.339	779.054	+54.15	f6f7
 26/18	00:01	     352.426	784.472	+54.15	f6f7
 27/18	00:02	     411.240	716.131	+54.15	f6f7
 28/18	00:02	     474.277	718.598	+54.15	f6f7
 29/18	00:03	     536.084	718.609	+54.15	f6f7
 30/19	00:03	     615.446	673.352	+54.15	f6f7
 31/20	00:04	     697.166	670.995	+54.15	f6f7
Fruit 2.3.1

Code: Select all

FEN: 8/8/5P2/8/3B2k1/1P6/1K6/8 w - - 0 1 

Fruit-2-3-1:
   1	00:00	         596	0	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