Code Monkey home page Code Monkey logo

goldfish's Introduction

Project Status: Active – The project has reached a stable, usable state and is being actively developed. Build Status Coverage Status codecov Codacy Badge Language grade: C/C++ Language grade: Python Total alerts license

Play link CCRL 40/40 Rating CCRL 40/4 Rating

Goldfish

Stockfish's very distant and not so bright cousin

What is this?

This is a UCI chess engine. That means it is a program that can analyse chess positions and propose best moves. The program does not have its own UI, but rather it implements the text based Universal Chess Interface (UCI), which makes it usable in most modern chess applications. This includes a live version of Goldfish that you can play on lichess.org.

Why is this?

This is not, nor does it attempt to be, the best chess engine out there. It is was originally developed from scratch as a practice project for learning C++. The end vision at that point was to have a working chess engine with a UCI interface. In 2018 the engine was playable, and somewhat stable. However, it was bad. Really bad. At this point it was decided to abandon my initial work instead of trying to work around bad design decisions made by the former me.

The current version is based on fluxroot/pulse. Thanks a lot to the original author for his great work. Starting with this project meant a stable starting point, with all the rules sorted out, basic search in place and a test suite to make sure it all works as expected.

At this point, the newest version of Goldfish has been substantially revamped and improved in most aspects (see Road map).

Why Goldfish?

For some reason, several top chess engines have names of different fish, e.g. Stockfish, Rybka and others. Goldfish are known for their very limited memory, and so it seemed only fitting for my somewhat limited program to be named this.

Road map

The current plan for the project is to improve the strength. The following is a non-exhaustive list of possibilities for future additions, including all features that have been added so far. The list is inspired in large part by this writeup.

  • Making the engine playable on lichess.org
  • Complete refactoring of base types
  • Null move pruning
  • Transposition table
  • Syzygy endgame tablebases
  • Check extensions
  • Killer move heuristic
  • Principal variation search
  • Internal iterative deepening
  • Aspiration window search (repealed by PR #27, needs tuning before reapplying)
  • Futility pruning
  • Razoring
  • Delta pruning in quiescence search.
    • Prune when no move can improve enough
    • Prune captures that are insufficient to improve
  • Staged move generation
  • Better search algorithms, such as MTD-bi (?)
  • More sophisticated static evaluation
    • Extra considerations for passed pawns
    • Piece square tables
    • King safety
    • Center control
    • Rooks on the 7th rank
    • Bishops on main diagonals

Each significant change will result in a new version of the engine (see releases). In the following you see a relative rating between the current versions, based on test matches played with a variety of (short) time controls. In this rating system, v1.0 is held at 2000 rating points, and the others are adjusted accordingly. This gives an impression of the relative improvements of the engine over time, but cannot be compared directly to any other rating systems (e.g. FIDE).

# PLAYER RATING POINTS PLAYED (%)
1 Goldfish v1.13.0 2357.0 619.0 1080 57
2 Goldfish v1.12.1 2305.3 748.0 1613 46
3 Goldfish v1.12.0 2278.2 833.5 1528 55
4 Goldfish v1.11.1 2264.3 1095.0 2015 54
5 Goldfish v1.9.0 2249.5 1826.5 3538 52
6 Goldfish v1.11.0 2249.2 549.5 1100 50
7 Goldfish v1.7.0 2184.4 1086.5 2053 53
8 Goldfish v1.8.2 2179.7 392.0 783 50
9 Goldfish v1.7.1 2177.2 244.0 477 51
10 Goldfish v1.8.0 2169.9 324.0 650 50
11 Goldfish v1.8.1 2167.0 485.5 1000 49
12 Goldfish v1.6.0 2154.2 625.0 1151 54
13 Goldfish v1.7.2 2151.5 69.5 150 46
14 Goldfish v1.5.1 2096.0 606.0 1325 46
15 Goldfish v1.5 2094.1 554.5 1145 48
16 Goldfish v1.4 2091.3 646.5 1325 49
17 Goldfish v1.3 2076.8 314.0 680 46
18 Goldfish v1.2 2046.4 237.5 585 41
19 Goldfish v1.1 2005.2 210.0 597 35
20 Goldfish v1.0 2000.0 129.5 397 33

Detailed head-to-head statistics can be found here.

This is meant as a project to work on just for the fun of it. Contributions are very welcome if you feel like it.

Build

The project is written in C++17. It can be built using CMake, which hopefully makes this as portable as possible. Recommend building in a separate directory:

$ mkdir build && cd build
$ # If CMake fails to locate a suitably modern compiler, you select what to use explicitly.
$ export CXX=g++-8  # Or some C++17 compliant compiler of choice.
$ export CC=gcc-8   # If necessary, also specify the C compiler.
$ cmake .. -DCMAKE_BUILD_TYPE=Release
$ make

After the compiling is done you should have two executables in the build directory: goldfish.x and unit_tests.x. The former is the interface to the engine it self.

Windows

There are pre-compiled executables available for recent versions, available under Releases. These are handy if you simply want to run Goldfish locally on a Windows machine.

To build from source, the recommended approach is using Cygwin. Download and run the setup-x86_64.exe (64 bit) installer. When you get to the Select Packages part of the installation, make sure to include the latest versions of these packages:

  • gcc-core
  • gcc-g++
  • cmake
  • make

In order to see all available packages you might need to select Full in the View pull-down. You select packages by changing the field labeled Skip to be the latest version available in the menu.

After this, you should be able to follow the steps above (you will not need to do export ...).

Run

Although it is possible to use the text based interface directly, it's recommended to run this through a UCI compatible graphical user interface, such as Scid. Or better still, play on lichess.org.

After building the goldfish.x executable, you can run it directly. The engine speaks using the UCI protocol.

goldfish's People

Contributors

bsamseth avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

goldfish's Issues

Compiling issues under MSYS2+MinGW

No trouble compiling v1.11.1. Since v1.11.2 and including v1.12 MSYS2 complains about a lot of header files missing (ansi.h, newlib.h etc.), which are apparently standard on Posix but not Windows.

After copying the missing .h files from my Cygwin install there are a lot of errors, which may be the result of incompatibility between the existing MinGW defs and those "imported" from Cygwin.

The complete log follows.

admin@NA3 MINGW64 ~
$ cd goldfish-master/build

admin@NA3 MINGW64 ~/goldfish-master/build
$ export CXX=g++

admin@NA3 MINGW64 ~/goldfish-master/build
$ cmake .. -DCMAKE_BUILD_TYPE=Release
System is unknown to cmake, create:
Platform/MINGW64_NT-6.1 to use this system, please send your config file to [email protected] so it can be added to cmake
Your CMakeCache.txt file was copied to CopyOfCMakeCache.txt. Please send that file to [email protected].
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
-- Configuring done
-- Generating done
-- Build files have been written to: /home/admin/goldfish-master/build

admin@NA3 MINGW64 ~/goldfish-master/build
$ make
[  2%] Building CXX object CMakeFiles/engine.dir/src/benchmark.cpp.obj
In file included from C:/MinGW/msys64/mingw64/x86_64-w64-mingw32/include/pthread.h:64,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/x86_64-w64-mingw32/bits/gthr-default.h:35,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/x86_64-w64-mingw32/bits/gthr.h:148,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/ext/atomicity.h:35,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/bits/basic_string.h:39,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/string:52,
                 from C:/MinGW/msys64/home/admin/goldfish-master/include/benchmark.hpp:3,
                 from C:/MinGW/msys64/home/admin/goldfish-master/src/benchmark.cpp:1:
C:/MinGW/msys64/mingw64/include/sys/types.h:141:18: error: conflicting declaration 'typedef __ino_t ino_t'
 typedef __ino_t  ino_t;  /* inode number */
                  ^~~~~
In file included from C:/MinGW/msys64/mingw64/include/c++/8.3.0/cwchar:44,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/bits/postypes.h:40,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/bits/char_traits.h:40,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/string:40,
                 from C:/MinGW/msys64/home/admin/goldfish-master/include/benchmark.hpp:3,
                 from C:/MinGW/msys64/home/admin/goldfish-master/src/benchmark.cpp:1:
C:/MinGW/msys64/mingw64/x86_64-w64-mingw32/include/wchar.h:411:26: note: previous declaration as 'typedef short unsigned int ino_t'
   typedef unsigned short ino_t;
                          ^~~~~
In file included from C:/MinGW/msys64/mingw64/include/c++/8.3.0/x86_64-w64-mingw32/bits/gthr-default.h:35,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/x86_64-w64-mingw32/bits/gthr.h:148,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/ext/atomicity.h:35,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/bits/basic_string.h:39,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/string:52,
                 from C:/MinGW/msys64/home/admin/goldfish-master/include/benchmark.hpp:3,
                 from C:/MinGW/msys64/home/admin/goldfish-master/src/benchmark.cpp:1:
C:/MinGW/msys64/mingw64/x86_64-w64-mingw32/include/pthread.h:180:14: error: conflicting declaration 'typedef long int pthread_once_t'
 typedef long pthread_once_t;
              ^~~~~~~~~~~~~~
In file included from C:/MinGW/msys64/mingw64/include/sys/types.h:225,
                 from C:/MinGW/msys64/mingw64/x86_64-w64-mingw32/include/pthread.h:64,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/x86_64-w64-mingw32/bits/gthr-default.h:35,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/x86_64-w64-mingw32/bits/gthr.h:148,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/ext/atomicity.h:35,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/bits/basic_string.h:39,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/string:52,
                 from C:/MinGW/msys64/home/admin/goldfish-master/include/benchmark.hpp:3,
                 from C:/MinGW/msys64/home/admin/goldfish-master/src/benchmark.cpp:1:
C:/MinGW/msys64/mingw64/include/sys/_pthreadtypes.h:32:1: note: previous declaration as 'typedef struct pthread_once_t pthread_once_t'
 pthread_once_t;
 ^~~~~~~~~~~~~~
In file included from C:/MinGW/msys64/mingw64/include/c++/8.3.0/x86_64-w64-mingw32/bits/gthr-default.h:35,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/x86_64-w64-mingw32/bits/gthr.h:148,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/ext/atomicity.h:35,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/bits/basic_string.h:39,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/string:52,
                 from C:/MinGW/msys64/home/admin/goldfish-master/include/benchmark.hpp:3,
                 from C:/MinGW/msys64/home/admin/goldfish-master/src/benchmark.cpp:1:
C:/MinGW/msys64/mingw64/x86_64-w64-mingw32/include/pthread.h:181:18: error: conflicting declaration 'typedef unsigned int pthread_mutexattr_t'
 typedef unsigned pthread_mutexattr_t;
                  ^~~~~~~~~~~~~~~~~~~
In file included from C:/MinGW/msys64/mingw64/include/sys/types.h:225,
                 from C:/MinGW/msys64/mingw64/x86_64-w64-mingw32/include/pthread.h:64,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/x86_64-w64-mingw32/bits/gthr-default.h:35,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/x86_64-w64-mingw32/bits/gthr.h:148,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/ext/atomicity.h:35,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/bits/basic_string.h:39,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/string:52,
                 from C:/MinGW/msys64/home/admin/goldfish-master/include/benchmark.hpp:3,
                 from C:/MinGW/msys64/home/admin/goldfish-master/src/benchmark.cpp:1:
C:/MinGW/msys64/mingw64/include/sys/_pthreadtypes.h:20:55: note: previous declaration as 'typedef struct __pthread_mutexattr_t* pthread_mutexattr_t'
 typedef struct __pthread_mutexattr_t {char __dummy;} *pthread_mutexattr_t;
                                                       ^~~~~~~~~~~~~~~~~~~
In file included from C:/MinGW/msys64/mingw64/include/c++/8.3.0/x86_64-w64-mingw32/bits/gthr-default.h:35,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/x86_64-w64-mingw32/bits/gthr.h:148,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/ext/atomicity.h:35,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/bits/basic_string.h:39,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/string:52,
                 from C:/MinGW/msys64/home/admin/goldfish-master/include/benchmark.hpp:3,
                 from C:/MinGW/msys64/home/admin/goldfish-master/src/benchmark.cpp:1:
C:/MinGW/msys64/mingw64/x86_64-w64-mingw32/include/pthread.h:182:18: error: conflicting declaration 'typedef unsigned int pthread_key_t'
 typedef unsigned pthread_key_t;
                  ^~~~~~~~~~~~~
In file included from C:/MinGW/msys64/mingw64/include/sys/types.h:225,
                 from C:/MinGW/msys64/mingw64/x86_64-w64-mingw32/include/pthread.h:64,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/x86_64-w64-mingw32/bits/gthr-default.h:35,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/x86_64-w64-mingw32/bits/gthr.h:148,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/ext/atomicity.h:35,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/bits/basic_string.h:39,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/string:52,
                 from C:/MinGW/msys64/home/admin/goldfish-master/include/benchmark.hpp:3,
                 from C:/MinGW/msys64/home/admin/goldfish-master/src/benchmark.cpp:1:
C:/MinGW/msys64/mingw64/include/sys/_pthreadtypes.h:18:49: note: previous declaration as 'typedef struct __pthread_key_t* pthread_key_t'
 typedef struct __pthread_key_t {char __dummy;} *pthread_key_t;
                                                 ^~~~~~~~~~~~~
In file included from C:/MinGW/msys64/mingw64/include/c++/8.3.0/x86_64-w64-mingw32/bits/gthr-default.h:35,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/x86_64-w64-mingw32/bits/gthr.h:148,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/ext/atomicity.h:35,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/bits/basic_string.h:39,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/string:52,
                 from C:/MinGW/msys64/home/admin/goldfish-master/include/benchmark.hpp:3,
                 from C:/MinGW/msys64/home/admin/goldfish-master/src/benchmark.cpp:1:
C:/MinGW/msys64/mingw64/x86_64-w64-mingw32/include/pthread.h:183:15: error: conflicting declaration 'typedef void* pthread_barrierattr_t'
 typedef void *pthread_barrierattr_t;
               ^~~~~~~~~~~~~~~~~~~~~
In file included from C:/MinGW/msys64/mingw64/include/sys/types.h:225,
                 from C:/MinGW/msys64/mingw64/x86_64-w64-mingw32/include/pthread.h:64,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/x86_64-w64-mingw32/bits/gthr-default.h:35,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/x86_64-w64-mingw32/bits/gthr.h:148,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/ext/atomicity.h:35,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/bits/basic_string.h:39,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/string:52,
                 from C:/MinGW/msys64/home/admin/goldfish-master/include/benchmark.hpp:3,
                 from C:/MinGW/msys64/home/admin/goldfish-master/src/benchmark.cpp:1:
C:/MinGW/msys64/mingw64/include/sys/_pthreadtypes.h:23:57: note: previous declaration as 'typedef struct __pthread_barrierattr_t* pthread_barrierattr_t'
 typedef struct __pthread_barrierattr_t {char __dummy;} *pthread_barrierattr_t;
                                                         ^~~~~~~~~~~~~~~~~~~~~
In file included from C:/MinGW/msys64/mingw64/include/c++/8.3.0/x86_64-w64-mingw32/bits/gthr-default.h:35,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/x86_64-w64-mingw32/bits/gthr.h:148,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/ext/atomicity.h:35,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/bits/basic_string.h:39,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/string:52,
                 from C:/MinGW/msys64/home/admin/goldfish-master/include/benchmark.hpp:3,
                 from C:/MinGW/msys64/home/admin/goldfish-master/src/benchmark.cpp:1:
C:/MinGW/msys64/mingw64/x86_64-w64-mingw32/include/pthread.h:184:13: error: conflicting declaration 'typedef int pthread_condattr_t'
 typedef int pthread_condattr_t;
             ^~~~~~~~~~~~~~~~~~
In file included from C:/MinGW/msys64/mingw64/include/sys/types.h:225,
                 from C:/MinGW/msys64/mingw64/x86_64-w64-mingw32/include/pthread.h:64,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/x86_64-w64-mingw32/bits/gthr-default.h:35,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/x86_64-w64-mingw32/bits/gthr.h:148,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/ext/atomicity.h:35,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/bits/basic_string.h:39,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/string:52,
                 from C:/MinGW/msys64/home/admin/goldfish-master/include/benchmark.hpp:3,
                 from C:/MinGW/msys64/home/admin/goldfish-master/src/benchmark.cpp:1:
C:/MinGW/msys64/mingw64/include/sys/_pthreadtypes.h:21:54: note: previous declaration as 'typedef struct __pthread_condattr_t* pthread_condattr_t'
 typedef struct __pthread_condattr_t {char __dummy;} *pthread_condattr_t;
                                                      ^~~~~~~~~~~~~~~~~~
In file included from C:/MinGW/msys64/mingw64/include/c++/8.3.0/x86_64-w64-mingw32/bits/gthr-default.h:35,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/x86_64-w64-mingw32/bits/gthr.h:148,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/ext/atomicity.h:35,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/bits/basic_string.h:39,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/string:52,
                 from C:/MinGW/msys64/home/admin/goldfish-master/include/benchmark.hpp:3,
                 from C:/MinGW/msys64/home/admin/goldfish-master/src/benchmark.cpp:1:
C:/MinGW/msys64/mingw64/x86_64-w64-mingw32/include/pthread.h:185:13: error: conflicting declaration 'typedef int pthread_rwlockattr_t'
 typedef int pthread_rwlockattr_t;
             ^~~~~~~~~~~~~~~~~~~~
In file included from C:/MinGW/msys64/mingw64/include/sys/types.h:225,
                 from C:/MinGW/msys64/mingw64/x86_64-w64-mingw32/include/pthread.h:64,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/x86_64-w64-mingw32/bits/gthr-default.h:35,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/x86_64-w64-mingw32/bits/gthr.h:148,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/ext/atomicity.h:35,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/bits/basic_string.h:39,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/string:52,
                 from C:/MinGW/msys64/home/admin/goldfish-master/include/benchmark.hpp:3,
                 from C:/MinGW/msys64/home/admin/goldfish-master/src/benchmark.cpp:1:
C:/MinGW/msys64/mingw64/include/sys/_pthreadtypes.h:35:56: note: previous declaration as 'typedef struct __pthread_rwlockattr_t* pthread_rwlockattr_t'
 typedef struct __pthread_rwlockattr_t {char __dummy;} *pthread_rwlockattr_t;
                                                        ^~~~~~~~~~~~~~~~~~~~
In file included from C:/MinGW/msys64/mingw64/include/c++/8.3.0/x86_64-w64-mingw32/bits/gthr-default.h:35,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/x86_64-w64-mingw32/bits/gthr.h:148,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/ext/atomicity.h:35,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/bits/basic_string.h:39,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/string:52,
                 from C:/MinGW/msys64/home/admin/goldfish-master/include/benchmark.hpp:3,
                 from C:/MinGW/msys64/home/admin/goldfish-master/src/benchmark.cpp:1:
C:/MinGW/msys64/mingw64/x86_64-w64-mingw32/include/pthread.h:196:19: error: conflicting declaration 'typedef uintptr_t pthread_t'
 typedef uintptr_t pthread_t;
                   ^~~~~~~~~
In file included from C:/MinGW/msys64/mingw64/include/sys/types.h:225,
                 from C:/MinGW/msys64/mingw64/x86_64-w64-mingw32/include/pthread.h:64,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/x86_64-w64-mingw32/bits/gthr-default.h:35,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/x86_64-w64-mingw32/bits/gthr.h:148,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/ext/atomicity.h:35,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/bits/basic_string.h:39,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/string:52,
                 from C:/MinGW/msys64/home/admin/goldfish-master/include/benchmark.hpp:3,
                 from C:/MinGW/msys64/home/admin/goldfish-master/src/benchmark.cpp:1:
C:/MinGW/msys64/mingw64/include/sys/_pthreadtypes.h:15:45: note: previous declaration as 'typedef struct __pthread_t* pthread_t'
 typedef struct __pthread_t {char __dummy;} *pthread_t;
                                             ^~~~~~~~~
In file included from C:/MinGW/msys64/mingw64/include/c++/8.3.0/x86_64-w64-mingw32/bits/gthr-default.h:35,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/x86_64-w64-mingw32/bits/gthr.h:148,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/ext/atomicity.h:35,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/bits/basic_string.h:39,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/string:52,
                 from C:/MinGW/msys64/home/admin/goldfish-master/include/benchmark.hpp:3,
                 from C:/MinGW/msys64/home/admin/goldfish-master/src/benchmark.cpp:1:
C:/MinGW/msys64/mingw64/x86_64-w64-mingw32/include/pthread.h:220:8: error: redefinition of 'struct timespec'
 struct timespec {
        ^~~~~~~~
In file included from C:/MinGW/msys64/home/admin/goldfish-master/include/machine/types.h:21,
                 from C:/MinGW/msys64/mingw64/include/sys/types.h:226,
                 from C:/MinGW/msys64/mingw64/x86_64-w64-mingw32/include/pthread.h:64,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/x86_64-w64-mingw32/bits/gthr-default.h:35,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/x86_64-w64-mingw32/bits/gthr.h:148,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/ext/atomicity.h:35,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/bits/basic_string.h:39,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/string:52,
                 from C:/MinGW/msys64/home/admin/goldfish-master/include/benchmark.hpp:3,
                 from C:/MinGW/msys64/home/admin/goldfish-master/src/benchmark.cpp:1:
C:/MinGW/msys64/mingw64/include/sys/_timespec.h:45:8: note: previous definition of 'struct timespec'
 struct timespec {
        ^~~~~~~~
In file included from C:/MinGW/msys64/mingw64/include/c++/8.3.0/x86_64-w64-mingw32/bits/gthr-default.h:35,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/x86_64-w64-mingw32/bits/gthr.h:148,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/ext/atomicity.h:35,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/bits/basic_string.h:39,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/string:52,
                 from C:/MinGW/msys64/home/admin/goldfish-master/include/benchmark.hpp:3,
                 from C:/MinGW/msys64/home/admin/goldfish-master/src/benchmark.cpp:1:
C:/MinGW/msys64/mingw64/x86_64-w64-mingw32/include/pthread.h:251:16: error: using typedef-name 'pthread_attr_t' after 'struct'
 typedef struct pthread_attr_t pthread_attr_t;
                ^~~~~~~~~~~~~~
In file included from C:/MinGW/msys64/mingw64/include/sys/types.h:225,
                 from C:/MinGW/msys64/mingw64/x86_64-w64-mingw32/include/pthread.h:64,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/x86_64-w64-mingw32/bits/gthr-default.h:35,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/x86_64-w64-mingw32/bits/gthr.h:148,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/ext/atomicity.h:35,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/bits/basic_string.h:39,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/string:52,
                 from C:/MinGW/msys64/home/admin/goldfish-master/include/benchmark.hpp:3,
                 from C:/MinGW/msys64/home/admin/goldfish-master/src/benchmark.cpp:1:
C:/MinGW/msys64/mingw64/include/sys/_pthreadtypes.h:19:50: note: 'pthread_attr_t' has a previous declaration here
 typedef struct __pthread_attr_t {char __dummy;} *pthread_attr_t;
                                                  ^~~~~~~~~~~~~~
In file included from C:/MinGW/msys64/mingw64/include/c++/8.3.0/x86_64-w64-mingw32/bits/gthr-default.h:35,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/x86_64-w64-mingw32/bits/gthr.h:148,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/ext/atomicity.h:35,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/bits/basic_string.h:39,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/string:52,
                 from C:/MinGW/msys64/home/admin/goldfish-master/include/benchmark.hpp:3,
                 from C:/MinGW/msys64/home/admin/goldfish-master/src/benchmark.cpp:1:
C:/MinGW/msys64/mingw64/x86_64-w64-mingw32/include/pthread.h:251:31: error: conflicting declaration 'typedef int pthread_attr_t'
 typedef struct pthread_attr_t pthread_attr_t;
                               ^~~~~~~~~~~~~~
In file included from C:/MinGW/msys64/mingw64/include/sys/types.h:225,
                 from C:/MinGW/msys64/mingw64/x86_64-w64-mingw32/include/pthread.h:64,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/x86_64-w64-mingw32/bits/gthr-default.h:35,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/x86_64-w64-mingw32/bits/gthr.h:148,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/ext/atomicity.h:35,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/bits/basic_string.h:39,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/string:52,
                 from C:/MinGW/msys64/home/admin/goldfish-master/include/benchmark.hpp:3,
                 from C:/MinGW/msys64/home/admin/goldfish-master/src/benchmark.cpp:1:
C:/MinGW/msys64/mingw64/include/sys/_pthreadtypes.h:19:50: note: previous declaration as 'typedef struct __pthread_attr_t* pthread_attr_t'
 typedef struct __pthread_attr_t {char __dummy;} *pthread_attr_t;
                                                  ^~~~~~~~~~~~~~
In file included from C:/MinGW/msys64/mingw64/include/c++/8.3.0/x86_64-w64-mingw32/bits/gthr-default.h:35,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/x86_64-w64-mingw32/bits/gthr.h:148,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/ext/atomicity.h:35,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/bits/basic_string.h:39,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/string:52,
                 from C:/MinGW/msys64/home/admin/goldfish-master/include/benchmark.hpp:3,
                 from C:/MinGW/msys64/home/admin/goldfish-master/src/benchmark.cpp:1:
C:/MinGW/msys64/mingw64/x86_64-w64-mingw32/include/pthread.h:252:8: error: using typedef-name 'pthread_attr_t' after 'struct'
 struct pthread_attr_t
        ^~~~~~~~~~~~~~
In file included from C:/MinGW/msys64/mingw64/include/sys/types.h:225,
                 from C:/MinGW/msys64/mingw64/x86_64-w64-mingw32/include/pthread.h:64,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/x86_64-w64-mingw32/bits/gthr-default.h:35,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/x86_64-w64-mingw32/bits/gthr.h:148,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/ext/atomicity.h:35,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/bits/basic_string.h:39,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/string:52,
                 from C:/MinGW/msys64/home/admin/goldfish-master/include/benchmark.hpp:3,
                 from C:/MinGW/msys64/home/admin/goldfish-master/src/benchmark.cpp:1:
C:/MinGW/msys64/mingw64/include/sys/_pthreadtypes.h:19:50: note: 'pthread_attr_t' has a previous declaration here
 typedef struct __pthread_attr_t {char __dummy;} *pthread_attr_t;
                                                  ^~~~~~~~~~~~~~
In file included from C:/MinGW/msys64/mingw64/include/c++/8.3.0/x86_64-w64-mingw32/bits/gthr-default.h:35,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/x86_64-w64-mingw32/bits/gthr.h:148,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/ext/atomicity.h:35,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/bits/basic_string.h:39,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/string:52,
                 from C:/MinGW/msys64/home/admin/goldfish-master/include/benchmark.hpp:3,
                 from C:/MinGW/msys64/home/admin/goldfish-master/src/benchmark.cpp:1:
C:/MinGW/msys64/mingw64/x86_64-w64-mingw32/include/pthread.h:268:18: error: conflicting declaration 'typedef intptr_t pthread_spinlock_t'
 typedef intptr_t pthread_spinlock_t;
                  ^~~~~~~~~~~~~~~~~~
In file included from C:/MinGW/msys64/mingw64/include/sys/types.h:225,
                 from C:/MinGW/msys64/mingw64/x86_64-w64-mingw32/include/pthread.h:64,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/x86_64-w64-mingw32/bits/gthr-default.h:35,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/x86_64-w64-mingw32/bits/gthr.h:148,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/ext/atomicity.h:35,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/bits/basic_string.h:39,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/string:52,
                 from C:/MinGW/msys64/home/admin/goldfish-master/include/benchmark.hpp:3,
                 from C:/MinGW/msys64/home/admin/goldfish-master/src/benchmark.cpp:1:
C:/MinGW/msys64/mingw64/include/sys/_pthreadtypes.h:33:54: note: previous declaration as 'typedef struct __pthread_spinlock_t* pthread_spinlock_t'
 typedef struct __pthread_spinlock_t {char __dummy;} *pthread_spinlock_t;
                                                      ^~~~~~~~~~~~~~~~~~
In file included from C:/MinGW/msys64/mingw64/include/c++/8.3.0/x86_64-w64-mingw32/bits/gthr-default.h:35,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/x86_64-w64-mingw32/bits/gthr.h:148,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/ext/atomicity.h:35,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/bits/basic_string.h:39,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/string:52,
                 from C:/MinGW/msys64/home/admin/goldfish-master/include/benchmark.hpp:3,
                 from C:/MinGW/msys64/home/admin/goldfish-master/src/benchmark.cpp:1:
C:/MinGW/msys64/mingw64/x86_64-w64-mingw32/include/pthread.h:269:18: error: conflicting declaration 'typedef intptr_t pthread_mutex_t'
 typedef intptr_t pthread_mutex_t;
                  ^~~~~~~~~~~~~~~
In file included from C:/MinGW/msys64/mingw64/include/sys/types.h:225,
                 from C:/MinGW/msys64/mingw64/x86_64-w64-mingw32/include/pthread.h:64,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/x86_64-w64-mingw32/bits/gthr-default.h:35,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/x86_64-w64-mingw32/bits/gthr.h:148,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/ext/atomicity.h:35,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/bits/basic_string.h:39,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/string:52,
                 from C:/MinGW/msys64/home/admin/goldfish-master/include/benchmark.hpp:3,
                 from C:/MinGW/msys64/home/admin/goldfish-master/src/benchmark.cpp:1:
C:/MinGW/msys64/mingw64/include/sys/_pthreadtypes.h:16:51: note: previous declaration as 'typedef struct __pthread_mutex_t* pthread_mutex_t'
 typedef struct __pthread_mutex_t {char __dummy;} *pthread_mutex_t;
                                                   ^~~~~~~~~~~~~~~
In file included from C:/MinGW/msys64/mingw64/include/c++/8.3.0/x86_64-w64-mingw32/bits/gthr-default.h:35,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/x86_64-w64-mingw32/bits/gthr.h:148,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/ext/atomicity.h:35,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/bits/basic_string.h:39,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/string:52,
                 from C:/MinGW/msys64/home/admin/goldfish-master/include/benchmark.hpp:3,
                 from C:/MinGW/msys64/home/admin/goldfish-master/src/benchmark.cpp:1:
C:/MinGW/msys64/mingw64/x86_64-w64-mingw32/include/pthread.h:270:18: error: conflicting declaration 'typedef intptr_t pthread_cond_t'
 typedef intptr_t pthread_cond_t;
                  ^~~~~~~~~~~~~~
In file included from C:/MinGW/msys64/mingw64/include/sys/types.h:225,
                 from C:/MinGW/msys64/mingw64/x86_64-w64-mingw32/include/pthread.h:64,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/x86_64-w64-mingw32/bits/gthr-default.h:35,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/x86_64-w64-mingw32/bits/gthr.h:148,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/ext/atomicity.h:35,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/bits/basic_string.h:39,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/string:52,
                 from C:/MinGW/msys64/home/admin/goldfish-master/include/benchmark.hpp:3,
                 from C:/MinGW/msys64/home/admin/goldfish-master/src/benchmark.cpp:1:
C:/MinGW/msys64/mingw64/include/sys/_pthreadtypes.h:22:50: note: previous declaration as 'typedef struct __pthread_cond_t* pthread_cond_t'
 typedef struct __pthread_cond_t {char __dummy;} *pthread_cond_t;
                                                  ^~~~~~~~~~~~~~
In file included from C:/MinGW/msys64/mingw64/include/c++/8.3.0/x86_64-w64-mingw32/bits/gthr-default.h:35,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/x86_64-w64-mingw32/bits/gthr.h:148,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/ext/atomicity.h:35,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/bits/basic_string.h:39,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/string:52,
                 from C:/MinGW/msys64/home/admin/goldfish-master/include/benchmark.hpp:3,
                 from C:/MinGW/msys64/home/admin/goldfish-master/src/benchmark.cpp:1:
C:/MinGW/msys64/mingw64/x86_64-w64-mingw32/include/pthread.h:271:18: error: conflicting declaration 'typedef intptr_t pthread_rwlock_t'
 typedef intptr_t pthread_rwlock_t;
                  ^~~~~~~~~~~~~~~~
In file included from C:/MinGW/msys64/mingw64/include/sys/types.h:225,
                 from C:/MinGW/msys64/mingw64/x86_64-w64-mingw32/include/pthread.h:64,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/x86_64-w64-mingw32/bits/gthr-default.h:35,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/x86_64-w64-mingw32/bits/gthr.h:148,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/ext/atomicity.h:35,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/bits/basic_string.h:39,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/string:52,
                 from C:/MinGW/msys64/home/admin/goldfish-master/include/benchmark.hpp:3,
                 from C:/MinGW/msys64/home/admin/goldfish-master/src/benchmark.cpp:1:
C:/MinGW/msys64/mingw64/include/sys/_pthreadtypes.h:34:52: note: previous declaration as 'typedef struct __pthread_rwlock_t* pthread_rwlock_t'
 typedef struct __pthread_rwlock_t {char __dummy;} *pthread_rwlock_t;
                                                    ^~~~~~~~~~~~~~~~
In file included from C:/MinGW/msys64/mingw64/include/c++/8.3.0/x86_64-w64-mingw32/bits/gthr-default.h:35,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/x86_64-w64-mingw32/bits/gthr.h:148,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/ext/atomicity.h:35,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/bits/basic_string.h:39,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/string:52,
                 from C:/MinGW/msys64/home/admin/goldfish-master/include/benchmark.hpp:3,
                 from C:/MinGW/msys64/home/admin/goldfish-master/src/benchmark.cpp:1:
C:/MinGW/msys64/mingw64/x86_64-w64-mingw32/include/pthread.h:272:15: error: conflicting declaration 'typedef void* pthread_barrier_t'
 typedef void *pthread_barrier_t;
               ^~~~~~~~~~~~~~~~~
In file included from C:/MinGW/msys64/mingw64/include/sys/types.h:225,
                 from C:/MinGW/msys64/mingw64/x86_64-w64-mingw32/include/pthread.h:64,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/x86_64-w64-mingw32/bits/gthr-default.h:35,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/x86_64-w64-mingw32/bits/gthr.h:148,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/ext/atomicity.h:35,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/bits/basic_string.h:39,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/string:52,
                 from C:/MinGW/msys64/home/admin/goldfish-master/include/benchmark.hpp:3,
                 from C:/MinGW/msys64/home/admin/goldfish-master/src/benchmark.cpp:1:
C:/MinGW/msys64/mingw64/include/sys/_pthreadtypes.h:24:53: note: previous declaration as 'typedef struct __pthread_barrier_t* pthread_barrier_t'
 typedef struct __pthread_barrier_t {char __dummy;} *pthread_barrier_t;
                                                     ^~~~~~~~~~~~~~~~~
In file included from C:/MinGW/msys64/mingw64/include/c++/8.3.0/ctime:42,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/chrono:41,
                 from C:/MinGW/msys64/home/admin/goldfish-master/include/search.hpp:10,
                 from C:/MinGW/msys64/home/admin/goldfish-master/src/benchmark.cpp:4:
C:/MinGW/msys64/mingw64/x86_64-w64-mingw32/include/time.h:60:16: error: conflicting declaration 'typedef long int clock_t'
   typedef long clock_t;
                ^~~~~~~
In file included from C:/MinGW/msys64/mingw64/x86_64-w64-mingw32/include/pthread.h:64,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/x86_64-w64-mingw32/bits/gthr-default.h:35,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/x86_64-w64-mingw32/bits/gthr.h:148,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/ext/atomicity.h:35,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/bits/basic_string.h:39,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/string:52,
                 from C:/MinGW/msys64/home/admin/goldfish-master/include/benchmark.hpp:3,
                 from C:/MinGW/msys64/home/admin/goldfish-master/src/benchmark.cpp:1:
C:/MinGW/msys64/mingw64/include/sys/types.h:109:19: note: previous declaration as 'typedef long unsigned int clock_t'
 typedef _CLOCK_T_ clock_t;
                   ^~~~~~~
In file included from C:/MinGW/msys64/mingw64/include/c++/8.3.0/x86_64-w64-mingw32/bits/gthr-default.h:35,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/x86_64-w64-mingw32/bits/gthr.h:148,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/ext/atomicity.h:35,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/bits/basic_string.h:39,
                 from C:/MinGW/msys64/mingw64/include/c++/8.3.0/string:52,
                 from C:/MinGW/msys64/home/admin/goldfish-master/include/benchmark.hpp:3,
                 from C:/MinGW/msys64/home/admin/goldfish-master/src/benchmark.cpp:1:
C:/MinGW/msys64/mingw64/include/c++/8.3.0/mutex:633:30: error: could not convert '0' from 'int' to 'std::once_flag::__native_type' {aka 'pthread_once_t'}
     __native_type  _M_once = __GTHREAD_ONCE_INIT;
                              ^~~~~~~~~~~~~~~~~~~
make[2]: *** [CMakeFiles/engine.dir/build.make:63: CMakeFiles/engine.dir/src/benchmark.cpp.obj] Error 1
make[1]: *** [CMakeFiles/Makefile2:703: CMakeFiles/engine.dir/all] Error 2
make: *** [Makefile:95: all] Error 2

admin@NA3 MINGW64 ~/goldfish-master/build
$

Cmake troubles under Cygwin and MSYS2

Cannot make Cmake acknowledge GCC, it keeps looking in /usr/bin/cc which is not present by default. Tried running it with "-DCMAKE_CXX_COMPILER=/bin/G++" or "-DCMAKE_CXX_COMPILER=GCC" with no success, although the latter worked for v1.11.1 under MSYS2+MinGW.

There are lots of threads on various forums about Cmake and these error messages but with my meager knowledge on the subject I have trouble understanding the explanations.

Complete log follows:

admin@NA3 ~
$ cd goldfish

admin@NA3 ~/goldfish
$ cd build

admin@NA3 ~/goldfish/build
$ export CXX=g++

admin@NA3 ~/goldfish/build
$ cmake .. -DCMAKE_BUILD_TYPE=Release
-- The C compiler identification is GNU 7.3.0
-- The CXX compiler identification is GNU 7.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- broken
CMake Error at /usr/share/cmake-3.13.1/Modules/CMakeTestCCompiler.cmake:52 (message):
  The C compiler

    "/usr/bin/cc"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: /home/admin/goldfish/build/CMakeFiles/CMakeTmp

    Run Build Command:"/cygdrive/c/MinGW/msys/1.0/bin/make.exe" "cmTC_1286f/fast"
    /usr/bin/make -f CMakeFiles/cmTC_1286f.dir/build.make CMakeFiles/cmTC_1286f.dir/build
    make[1]: Entering directory `/c/cygwin64/home/admin/goldfish/build/CMakeFiles/CMakeTmp'
    /bin/sh: /usr/bin/cmake.exe: No such file or directory
    make[1]: *** [CMakeFiles/cmTC_1286f.dir/testCCompiler.c.o] Error 127
    make[1]: Leaving directory `/c/cygwin64/home/admin/goldfish/build/CMakeFiles/CMakeTmp'
    make: *** [cmTC_1286f/fast] Error 2




  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:13 (project)


-- Configuring incomplete, errors occurred!
See also "/home/admin/goldfish/build/CMakeFiles/CMakeOutput.log".
See also "/home/admin/goldfish/build/CMakeFiles/CMakeError.log".

admin@NA3 ~/goldfish/build
$

Unknown software exception (0x40000015) crash

This is from the 40/40 test for v1.13.0 where Goldfish did very well and had no problems except in this game. On replay the problem occurred twice at the same spot, and the second time I managed to grab the log. On the third replay the game was finally completed without errors.

This was done on my dual Xeon E5-2670, a 16-core Sandy bridge box, Win 7 x64 Pro SP1, Cute Chess x64 2019-01-28 dev build. Funny, when I replayed this game twice on this dual X5670 (a 12-core Westmere-EX box), where all software is the same, the problem didn't occur.

A thread on StackOverflow that could be relevant: https://stackoverflow.com/questions/5115611/in-windows-does-the-exception-unknown-software-exception-0x40000015-occurred

PGN:

[Event "?"]
[Site "?"]
[Date "2019.04.19"]
[Round "?"]
[White "Goldfish 1.13.0 64-bit"]
[Black "Alarm 0.93.1"]
[Result "0-1"]
[ECO "B03"]
[GameDuration "00:13:15"]
[GameEndTime "2019-04-19T14:58:29.901 Eastern Daylight Time"]
[GameStartTime "2019-04-19T14:45:14.283 Eastern Daylight Time"]
[Opening "Alekhine's defense"]
[PlyCount "32"]
[Termination "abandoned"]
[TimeControl "40/1320"]
[Variation "Four pawns attack"]

1. e4 {book} Nf6 {book} 2. e5 {book} Nd5 {book} 3. d4 {book} d6 {book}
4. c4 {book} Nb6 {book} 5. f4 {book} dxe5 {book} 6. fxe5 {book} c5 {book}
7. dxc5 {+0.12/11 37s} Qxd1+ {+0.39/12 39s} 8. Kxd1 {+0.13/14 37s}
Bg4+ {+0.43/13 39s} 9. Nf3 {+0.23/14 37s} N6d7 {+0.65/12 39s}
10. h3 {+0.24/13 37s} Bxf3+ {+0.90/14 39s} 11. gxf3 {+0.36/13 37s}
Nxe5 {+0.90/14 39s} 12. f4 {-0.09/13 37s} Nec6 {+0.99/13 39s}
13. Nd2 {-0.36/13 37s} Na6 {+1.50/13 39s} 14. Nb3 {-0.39/13 37s}
O-O-O+ {+1.37/13 39s} 15. Ke2 {-0.50/13 37s} e5 {+1.37/13 39s}
16. fxe5 {-0.54/13 37s} Nxe5 {+1.78/12 39s, White disconnects} 0-1

debug log:
goldfish-1130-crash-log.txt

WER report:

Version=1
EventType=APPCRASH
EventTime=132001739089682706
ReportType=2
Consent=1
UploadTime=132001739090150707
ReportIdentifier=1dcfa672-62d5-11e9-8b6d-b0e74d36b866
IntegratorReportIdentifier=1dcfa671-62d5-11e9-8b6d-b0e74d36b866
Response.BucketId=1803698571
Response.BucketTable=335404235
Response.type=4
Sig[0].Name=Application Name
Sig[0].Value=Goldfish.v1.13.0.64bit.exe
Sig[1].Name=Application Version
Sig[1].Value=0.0.0.0
Sig[2].Name=Application Timestamp
Sig[2].Value=5cadeade
Sig[3].Name=Fault Module Name
Sig[3].Value=Goldfish.v1.13.0.64bit.exe
Sig[4].Name=Fault Module Version
Sig[4].Value=0.0.0.0
Sig[5].Name=Fault Module Timestamp
Sig[5].Value=5cadeade
Sig[6].Name=Exception Code
Sig[6].Value=40000015
Sig[7].Name=Exception Offset
Sig[7].Value=000000000004678f
DynamicSig[1].Name=OS Version
DynamicSig[1].Value=6.1.7601.2.1.0.256.48
DynamicSig[2].Name=Locale ID
DynamicSig[2].Value=1033
DynamicSig[22].Name=Additional Information 1
DynamicSig[22].Value=3faa
DynamicSig[23].Name=Additional Information 2
DynamicSig[23].Value=3faa3c265b91d2d7cbba3b1a01490fe5
DynamicSig[24].Name=Additional Information 3
DynamicSig[24].Value=99df
DynamicSig[25].Name=Additional Information 4
DynamicSig[25].Value=99df6c5724fefc12ed0cd49fd7b987f6
UI[2]=C:\Program Files\ChessBase\Engines.x64\CCRL\Goldfish.v1.13.0.64bit.exe
UI[3]=Goldfish.v1.13.0.64bit.exe has stopped working
UI[4]=Windows can check online for a solution to the problem.
UI[5]=Check online for a solution and close the program
UI[6]=Check online for a solution later and close the program
UI[7]=Close the program
LoadedModule[0]=C:\Program Files\ChessBase\Engines.x64\CCRL\Goldfish.v1.13.0.64bit.exe
LoadedModule[1]=C:\Windows\SYSTEM32\ntdll.dll
LoadedModule[2]=C:\Windows\system32\kernel32.dll
LoadedModule[3]=C:\Windows\system32\KERNELBASE.dll
LoadedModule[4]=C:\Windows\system32\msvcrt.dll
State[0].Key=Transport.DoneStage1
State[0].Value=1
State[1].Key=DataRequest
State[1].Value=Bucket=1803698571/nBucketTable=335404235/nResponse=1/n
FriendlyEventName=Stopped working
ConsentKey=APPCRASH
AppName=Goldfish.v1.13.0.64bit.exe
AppPath=C:\Program Files\ChessBase\Engines.x64\CCRL\Goldfish.v1.13.0.64bit.exe

P.S. Gábor, one of our blitz testers, reports that the latest v1.13.0 exec solved the problem of not moving after several moves out of the book under Arena in Win10.

Add tests of search logic

At the moment, the entire search logic is outside the test suite. This is no good and has possibly allowed the bugs seen in #25 to sneak in.

The current idea is to have some tests written in Python, using python-chess to communicate with Goldfish and add assertions to the parsed output for some selected positions.

Most importantly, it should be verified that search correctly identifies short mating sequences, and does not behave as in #25.

Improve Time Management

The trivial TM in place could be improved in many ways.

  • don't start a new depth iteration if it will take more time than we have left
  • possibly also don't start a new root move if time will expire
  • move count based allocation
  • volatility of score during last iterations

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.