Page 1 of 6
Phalanx source code
Posted: Fri Feb 10, 2012 12:28 am
by Elorejano
Hi!
I need a "workable" Phalanx source code.
Im reffering this because theres not source of Phalanx Reborn from Jim Abblet (this freezes alyway)
Nor works 100% the version of ScidvsPC, but seems that are mainly for analisys.
Dann CorbittĀ“s are no longer available.
Any ideas?
Thanks in advance
Re: Phalanx source code
Posted: Fri Feb 10, 2012 12:31 am
by JuLieN
Yes, I compiled the latest one for MacOSX. You can download it here:
http://julien.marcel.free.fr/macchess/phalanx-XXIII.zip
(Sources included).
Re: Phalanx source code
Posted: Fri Feb 10, 2012 2:08 am
by Elorejano
Thanks!
Is this "ScidvsPC" version?
Thx
Re: Phalanx source code
Posted: Fri Feb 10, 2012 7:12 am
by Jim Ablett
Elorejano wrote:Hi!
I need a "workable" Phalanx source code.
Im reffering this because theres not source of Phalanx Reborn from Jim Abblet (this freezes alyway)
Nor works 100% the version of ScidvsPC, but seems that are mainly for analisys.
Dann CorbittĀ“s are no longer available.
Any ideas?
Thanks in advance
If you are running Phalanx on Windows you need to disable polling with a command line switch (or change in src before compiling) otherwise engine will not work correctly. You can also compile with Cygwin which will use the Unix polling correctly.
Code: Select all
Phalanx XXII
Usage: phalanx [options] [<moves> <minutes> [<increment in seconds>]]
phalanx [options] [<seconds per move>]
phalanx bench
phalanx bcreate [options]
Options: -t <transposition table size in kilobytes>
-f <fixed search time in seconds>
-x <+/-> xboard mode on/off default: on
-p <+/-> permanent brain on/off default: off
-s <+/-> show thinking on/off default: off
-c <+/-> cpu time default: off
-o <+/-> polling input default: on
-b <+/-> opening book default: on
-r <resign value in centipawns> default: 0 (no resigning)
-e <easy level 0...100> default: 0 (best play)
-l <+/-> learning on/off default: on
-v print version and exit
-P <primary book directory>
-S <secondary book directory>
-L <learning file directory>
-g <log file name>
Examples: phalanx -c+ -s+ -o - -x- -f 60 -t4000
xboard -fcp "phalanx -l+ -r800"
Jim.
Re: Phalanx source code
Posted: Fri Feb 10, 2012 8:15 am
by stevenaaus
Jim is right. Moreover, i spent hours looking for win32 polling code on the web, and it doesn't seem to exist (apart from compiling with cygwin.)
To disable polling the command is "phalanx.exe -o -"
The relevant code is in evaluate.c:
Code: Select all
if(Flag.polling)
{
static fd_set readfds;
static struct timeval tv;
int data;
FD_ZERO (&readfds);
FD_SET (fileno(stdin), &readfds);
tv.tv_sec=0;
tv.tv_usec=0;
select(16, &readfds, 0, 0, &tv);
data=FD_ISSET(fileno(stdin), &readfds);
if(data) interrupt(0);
}
The FD_SET (etc) procs don't exist for Win32 except through cygwin, (which i don't have installed).
The best code is definitely in Scid vs. PC source, where a few bugs were fixed last year (including correctly parsing enpassent from FEN.)
Sorry for being so slack about keeping the sourceforge phalanx page up to date. I'll update it now with a note about the win32 issues.
Re: Phalanx source code
Posted: Sat Feb 11, 2012 12:21 am
by Elorejano
Thank, masters!
I will try..
Re: Phalanx source code
Posted: Sat Feb 11, 2012 12:32 pm
by stevenaaus
Jim has sent me polling code for win32 (from Olithink) and it is in Scid vs. PC svn
After a quick test - it doesn't seem to update properly after a move, (when Scid sends)
Code: Select all
exit
force
setboard rn1qkb1r/1pp1pppp/p4n2/3p4/3P1Bb1/P6P/1PPNPPP1/R2QKBNR b KQkq - 0 5
analyze
So this needs sorting out, but definitely a big improvement.
Re: Phalanx source code
Posted: Sat Feb 11, 2012 12:56 pm
by stevenaaus
Re: Phalanx source code
Posted: Sat Feb 11, 2012 2:08 pm
by Jim Ablett
stevenaaus wrote:Jim has sent me polling code for win32 (from Olithink) and it is in Scid vs. PC svn
After a quick test - it doesn't seem to update properly after a move, (when Scid sends)
Code: Select all
exit
force
setboard rn1qkb1r/1pp1pppp/p4n2/3p4/3P1Bb1/P6P/1PPNPPP1/R2QKBNR b KQkq - 0 5
analyze
So this needs sorting out, but definitely a big improvement.
Fixed this issue now I think.
http://dl.dropbox.com/u/5047625/phalanx ... 0-rev2.zip
Jim.
Re: Phalanx source code
Posted: Sun Feb 12, 2012 6:06 pm
by Elorejano
Thanks Jim!
But seems that Phalanx have time management bug. When is outoff book, its think too much, made a move, another "eternity" and loses on time.
Im using winboard and Arena
I dont know if is related to polling issues but in my computer (AMD, 2 cores, windowaXP).
Tell me if a winboard or Arena debug are needed