Discussion of chess software programming and technical issues.
Moderators: hgm, Harvey Williamson, bob
Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
-
rvida
- Posts: 481
- Joined: Thu Apr 16, 2009 10:00 am
- Location: Slovakia, EU
Post
by rvida » Fri Sep 16, 2011 2:29 am
Pascal source code of something called "OpenCritter_1.1.36" is available from
http://sourceforge.net/projects/critter ... r%20Chess/
This is a dead branch of Critter (dated back to somewhere between 0.90 - 1.00 C++ versions). While it is completely written by me, keep in mind that it is a remnant of an experimental branch that was heavily "ippolitized"

Nevertheless, it seems to be the strongest Pascal engine out there.
In the ZIP file there is a Win32 binary, book file, Gaviota TB probing DLLs, and complete sources.
Sources can be compiled with Delphi XE. FreePascal and Linux support is present but atm there are some errors (but they should be trivial to fix - mostly a missing ^ dereference operator).
Richard
-
bhlangonijr
- Posts: 482
- Joined: Thu Oct 16, 2008 2:23 am
- Location: Milky Way
-
Contact:
Post
by bhlangonijr » Fri Sep 16, 2011 3:14 am
rvida wrote:Pascal source code of something called "OpenCritter_1.1.36" is available from
http://sourceforge.net/projects/critter ... r%20Chess/
This is a dead branch of Critter (dated back to somewhere between 0.90 - 1.00 C++ versions). While it is completely written by me, keep in mind that it is a remnant of an experimental branch that was heavily "ippolitized"

Nevertheless, it seems to be the strongest Pascal engine out there.
In the ZIP file there is a Win32 binary, book file, Gaviota TB probing DLLs, and complete sources.
Sources can be compiled with Delphi XE. FreePascal and Linux support is present but atm there are some errors (but they should be trivial to fix - mostly a missing ^ dereference operator).
Richard
Hello Richard,
Very nice of you sharing the code of Critter.
Thanks,
-
Ferdy
- Posts: 3607
- Joined: Sun Aug 10, 2008 1:15 pm
- Location: Philippines
Post
by Ferdy » Fri Sep 16, 2011 4:58 am
Thanks.
I hope it is free to get ideas from these sources

-
Ajedrecista
- Posts: 1363
- Joined: Wed Jul 13, 2011 7:04 pm
- Location: Madrid, Spain.
-
Contact:
Post
by Ajedrecista » Fri Sep 16, 2011 11:31 am
Hello Richard!
rvida wrote:Pascal source code of something called "OpenCritter_1.1.36" is available from
http://sourceforge.net/projects/critter ... r%20Chess/
This is a dead branch of Critter (dated back to somewhere between 0.90 - 1.00 C++ versions). While it is completely written by me, keep in mind that it is a remnant of an experimental branch that was heavily "ippolitized"

Nevertheless, it seems to be the strongest Pascal engine out there.
In the ZIP file there is a Win32 binary, book file, Gaviota TB probing DLLs, and complete sources.
Sources can be compiled with Delphi XE. FreePascal and Linux support is present but atm there are some errors (but they should be trivial to fix - mostly a missing ^ dereference operator).
Richard
Thank you very much for this code. I am sure that many people will benefit from it... not me, because I am not a programmer, but I wanted to thank you. Critter is getting more and more strong and it is outstanding!
I suppose you are working in an improved version of Critter... how are your feelings? Are you going to release Critter 1.3 (or the version number that you want) soon (when?)? And also do you expect some Elo gain (or other improvements)? Thanks in advance for your great work.
Regards from Spain.
Ajedrecista.
-
Steve Maughan
- Posts: 1025
- Joined: Wed Mar 08, 2006 7:28 pm
- Location: Florida, USA
-
Contact:
Post
by Steve Maughan » Fri Sep 16, 2011 12:32 pm
Hi Richard,
Great. I'll take a look.
Quick question. You're probably the best person to ask, what is the speed difference between Delphi 32 bit and a PGO Intel C version? So, if the C version does 1 million nodes / second, what will the Delphi version do?
BTW will this compile on the new Delphi XE 2 64 bit platform?
Steve
-
mcostalba
- Posts: 2679
- Joined: Sat Jun 14, 2008 7:17 pm
Post
by mcostalba » Fri Sep 16, 2011 5:42 pm
rvida wrote:Pascal source code of something called "OpenCritter_1.1.36" is available
Thanks a lot Richard !
I am really eager to take a deep look at your sources, unfortunately these weeks are really terrible for me, I have almost no free time ! So I'd have to postpone to somewhere in future....
Marco
-
JuLieN
- Posts: 2945
- Joined: Mon May 05, 2008 10:16 am
- Location: Nantes (France)
-
Contact:
Post
by JuLieN » Fri Sep 16, 2011 6:14 pm
Thanks a lot, Richard!

I took a look and it is vastly different from my engine (hence the difference of strength too, I guess

), so I probably can't really use it (also I'm a bit too lazy and proud to try to understand someone else's code...), but it gives me two thoughts anyway:
1- it's a bit sad to see an abandoned pascal engine, so maybe someone could continue it and try to improve it? (Not me, I'm too busy with mine ^^)
2- yet by itself it's a new strong engine that testers will be pleased to include in their tournaments.
-
Steve Maughan
- Posts: 1025
- Joined: Wed Mar 08, 2006 7:28 pm
- Location: Florida, USA
-
Contact:
Post
by Steve Maughan » Fri Sep 16, 2011 6:17 pm
Hi Richard,
As released it doen't compile for Win64. This is due to the ASM BSF and BSR commands.
Anyone know the 64 bit equivalents? Or Pascal if push comes to shove.
Thanks,
Steve
-
rvida
- Posts: 481
- Joined: Thu Apr 16, 2009 10:00 am
- Location: Slovakia, EU
Post
by rvida » Fri Sep 16, 2011 6:45 pm
Steve Maughan wrote:Hi Richard,
As released it doen't compile for Win64. This is due to the ASM BSF and BSR commands.
Anyone know the 64 bit equivalents? Or Pascal if push comes to shove.
Thanks,
Steve
Unfortunately I can not test this as I do not have 64bit Delphi yet, but try replacing lines 40..48 in the file magic64.inc:
Code: Select all
function BSF(b: TBitboard): TSquare; assembler;
asm
bsfq b, %rax
end;
function BSR(b: TBitboard): TSquare; assembler;
asm
bsrq b, %rax
end;
with
Code: Select all
function BSF(b: TBitboard): TSquare; assembler;
asm
BSF RAX, b
end;
function BSR(b: TBitboard): TSquare; assembler;
asm
BSR RAX, b
end;
In platform.inc replace
Code: Select all
{$ifdef FPC}
{$ifdef CPU64}
{$define IS_64BIT}
{$else}
{$asmmode Intel}
{$endif}
{$define HasPrefetch}
{$define HasBitscan}
{$else}
{$SetPEFlags 1}
{$ImportedData Off}
{$TypeInfo Off}
{$DenyPackageUnit On}
{$PointerMath On}
{$define WinThreads}
type
size_t = cardinal;
{$endif}
with
Code: Select all
{$ifdef FPC}
{$ifdef CPU64}
{$define IS_64BIT}
{$else}
{$asmmode Intel}
{$endif}
{$define HasPrefetch}
{$define HasBitscan}
{$else}
{$ifdef CPUX64}
{$define IS_64BIT}
type
size_t = uint64;
{$else}
{$SetPEFlags 1}
type
size_t = cardinal;
{$endif}
{$ImportedData Off}
{$TypeInfo Off}
{$DenyPackageUnit On}
{$PointerMath On}
{$define WinThreads}
{$endif}
Richard
-
Steve Maughan
- Posts: 1025
- Joined: Wed Mar 08, 2006 7:28 pm
- Location: Florida, USA
-
Contact:
Post
by Steve Maughan » Fri Sep 16, 2011 7:14 pm
Hi Richard,
I managed to get it to compile. I needed to make the changes you suggested and add a {$ifdef WIN64} section to "platform.inc".
However, it crashes at line 707 of uBitboard.pas with an access violation as s = -7.
FYI, sq = A1, occ = 0, mask = 35604928818740736, i = 1
This may be helpful,
http://goo.gl/iBxgO
Steve