McCain X1 Source Available

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

Moderators: hgm, Rebel, chrisw

User avatar
MikeB
Posts: 4889
Joined: Thu Mar 09, 2006 6:34 am
Location: Pen Argyl, Pennsylvania

McCain X1 Source Available

Post by MikeB »

Will post some exe's once I have them:

https://github.com/MichaelB7/Stockfish/ ... McCain.zip

One source - - build 4 different flavors of stockfish - stockfish, McCain and you can add some matefinder code to either version. You also build the current-dev Stockfish with the 3 book opening option if you choose by leaving the FEATURE1 item uncommented in the makefile( default)
Note: only the MccCain will be distributed , the other flavors are for those who are able to build it themselves - feel free to share - please provide above link to GitHub if you do share.

A lot of updates - too many to mention all of them here :

NOTE - if you pull it from Github, please go to the McCain branch , the master branch is now in sync with current-dev Stockfish

The highithed changes :

Opening Book cleanup - now accepts 3 polyglot books :
  • Opening book 1 - could be GM or opening - generally a very specific book
    Opening book 2 - wider book, would kick in once opening book 1 is"out of book"
    Opening book 3 - wider book, would kick in once opening book 2 is"out of book"
The source provided enables one to build quickly 4 different engines:
  • Stockfish: current-dev Stockfish ( as of today less 3 non functional commits made today (2/7)
    Stockfish-m: current-dev Stockfish with some additional matefinder code
    McCain-X1: includes all ofcurrent-dev Stockfis with added functional modifications and features
    McCain-X1-m: McCain-X1 with some additional matefinder code
makefile options:
  • The version and features - ae controlled by commenting in and out the 3 lines in red font ( toggle is on uncounted and off with the ### ) pound signs.
### Uncomment the line below for McCain, comment in (add ####) for Stockfish
VERSION=maverick
####
### should be no reason to change anything below here!
### Only McCain with added feature will be publicly distributed , although feel free to play with other versions privately
### features include : Cerebellum book functionality, play by Elo (UCI limit strength), keyboard shortcuts and a few other items
FEATURE1=add_features
### FEATURE2=matefinder


Will have some exe's available for download later tonight - I have some errands to do right now.
Image
User avatar
MikeB
Posts: 4889
Joined: Thu Mar 09, 2006 6:34 am
Location: Pen Argyl, Pennsylvania

Re: McCain X1 Source Available

Post by MikeB »

We now have some Windows and macOS exe's. The Linux flavors have not compile properly and the reason is unknown at this time. The makefile contains the bench for McCain - if you compile the Linux flavor and the the the total node count matches the makefile (4914655) , please let me know.

Also you can post your Linux binaries here and I will post them to Github.

Thank you.

Link for McCain X1 binaries:
https://github.com/MichaelB7/Stockfish/releases/tag/X1
Image
User avatar
MikeB
Posts: 4889
Joined: Thu Mar 09, 2006 6:34 am
Location: Pen Argyl, Pennsylvania

Re: McCain X1 Source Available

Post by MikeB »

MikeB wrote: Sat Feb 09, 2019 4:41 am We now have some Windows and macOS exe's. The Linux flavors have not compile properly and the reason is unknown at this time. The makefile contains the bench for McCain - if you compile the Linux flavor and the the the total node count matches the makefile (4914655) , please let me know.

Also you can post your Linux binaries here and I will post them to Github.

Thank you.

Link for McCain X1 binaries:
https://github.com/MichaelB7/Stockfish/releases/tag/X1
I updated the macOS versions to work properly on modern CPUs. Only the macOS modern CPU exe's versions work were updated.
Image
peter
Posts: 3185
Joined: Sat Feb 16, 2008 7:38 am
Full name: Peter Martan

Re: McCain X1 Source Available

Post by peter »

MikeB wrote: Sat Feb 09, 2019 4:41 am We now have some Windows and macOS exe's.
Thank's a lot, Michael, especially for White's and Black's contempt instead of sidewise "Defensive"- Option, numeric contempt for both sides, in game- playing mode too, is somwhat easier to understand to me.

BTW, tried Monge-compile x64 only, works well with Windows7Pro in Shredder and Hiarcs GUI, not in Fritz, as usual.
:)
Peter.
User avatar
Scally
Posts: 232
Joined: Thu Sep 28, 2017 9:34 pm
Location: Bermondsey, London
Full name: Alan Cooper

Re: McCain X1 Source Available

Post by Scally »

Hi Michael,

Thanks for the update. All 4 Engines compiled fine on my RPi 3b+ late last night will hopefully be on Picochess Sunday evening UK time.

Al.
Joerg Oster
Posts: 937
Joined: Fri Mar 10, 2006 4:29 pm
Location: Germany

Re: McCain X1 Source Available

Post by Joerg Oster »

MikeB wrote: Sat Feb 09, 2019 5:39 am
MikeB wrote: Sat Feb 09, 2019 4:41 am We now have some Windows and macOS exe's. The Linux flavors have not compile properly and the reason is unknown at this time. The makefile contains the bench for McCain - if you compile the Linux flavor and the the the total node count matches the makefile (4914655) , please let me know.

Also you can post your Linux binaries here and I will post them to Github.

Thank you.

Link for McCain X1 binaries:
https://github.com/MichaelB7/Stockfish/releases/tag/X1
I updated the macOS versions to work properly on modern CPUs. Only the macOS modern CPU exe's versions work were updated.
From what I have googled, e. g.

Code: Select all

uint_fast8_t
must NOT necessarily be 8 bits, it can be larger ...
See https://stackoverflow.com/questions/350 ... t-least8-t
Why did you change this in tt.h?
Jörg Oster
User avatar
MikeB
Posts: 4889
Joined: Thu Mar 09, 2006 6:34 am
Location: Pen Argyl, Pennsylvania

Re: McCain X1 Source Available

Post by MikeB »

Joerg Oster wrote: Sat Feb 09, 2019 10:00 am
MikeB wrote: Sat Feb 09, 2019 5:39 am
MikeB wrote: Sat Feb 09, 2019 4:41 am We now have some Windows and macOS exe's. The Linux flavors have not compile properly and the reason is unknown at this time. The makefile contains the bench for McCain - if you compile the Linux flavor and the the the total node count matches the makefile (4914655) , please let me know.

Also you can post your Linux binaries here and I will post them to Github.

Thank you.

Link for McCain X1 binaries:
https://github.com/MichaelB7/Stockfish/releases/tag/X1
I updated the macOS versions to work properly on modern CPUs. Only the macOS modern CPU exe's versions work were updated.
From what I have googled, e. g.

Code: Select all

uint_fast8_t
must NOT necessarily be 8 bits, it can be larger ...
See https://stackoverflow.com/questions/350 ... t-least8-t
Why did you change this in tt.h?

"Thus a uint8_t is guaranteed to be exactly 8 bits wide. A uint_least8_t is the smallest integer guaranteed to be at least 8 bits wide. An uint_fast8_t is the fastest integer guaranteed to be at least 8 bits wide. So we can now finally answer our question. If we are trying to consume the minimum amount of data memory, then our TBD_DATATYPE should be uint_least8_t. If we are trying to make our code run as fast as possible then we should use uint_fast8_t. Thus the bottom line is this. If you want to start writing efficient, portable embedded code, the first step you should take is start using the C99 data types ‘least’ and ‘fast’. If your compiler isn’t C99 compliant then complain until it is – or change vendors. If you make this change I think you’ll be pleasantly surprised at the improvements in code size and speed that you’ll achieve."

https://embeddedgurus.com/stack-overflo ... eger-size/
Image
Steppenwolf
Posts: 75
Joined: Thu Jan 31, 2019 4:54 pm
Full name: Sven Steppenwolf

Re: McCain X1 Source Available

Post by Steppenwolf »

@MikeB

Dear Mike, maybe you can help me and the macOS users?
See my post please: viewtopic.php?f=7&t=69852
User avatar
MikeB
Posts: 4889
Joined: Thu Mar 09, 2006 6:34 am
Location: Pen Argyl, Pennsylvania

Re: McCain X1 Source Available

Post by MikeB »

Steppenwolf wrote: Sat Feb 09, 2019 1:24 pm @MikeB

Dear Mike, maybe you can help me and the macOS users?
See my post please: viewtopic.php?f=7&t=69852
I can try - there is no reason why you should not be able to build - there is one little tweak that has to be made. In the meantime , get macports installed on your Mac - that is a requirement Without having all the dynamic libraries on your Mac , my compile will never work - so you might as well go the whole 9 yards and get the whole set up and that way you can rebuild yourself as there are updates. I will work on building a Mac fork on GitHub that will have everything required - then you just clone my fork to your laptop/desktop. But you will need to install macports ( or brew - I happen to prefer Macports - but both should work - just don’t install both brew and macports - they don’t play nice with each other) to build some of the requirements
Image
Steppenwolf
Posts: 75
Joined: Thu Jan 31, 2019 4:54 pm
Full name: Sven Steppenwolf

Re: McCain X1 Source Available

Post by Steppenwolf »

Dear MikeB,

your efforts are very much appreciated!
One simple naive question: why do I have to use use macports or brew to be installed?
I also do not use these libraries when running the mac-binary of Stockfish?