Giter Site home page Giter Site logo

drofa's Issues

I can't compile it

I could compile version 3.3.0 without problems but now I am stuck with 3.3.22. Here is what I get using the Makefile (I have gcc 12.2.0):

In file included from src/bitbase.cc:2:
src/endgame.h:65:8: error: 'uint' does not name a type; did you mean 'int'?
65 | inline uint kpk_get_index(Color, int, int, int);
| ^~~~
| int
src/endgame.h:70:29: error: 'uint' has not been declared
70 | void kpk_set(kpk_position*, uint);
| ^~~~
src/bitbase.cc:14:8: error: 'uint' does not name a type; did you mean 'int'?
14 | inline uint Bitbase::kpk_get_index(Color color, int bKing, int wKing, int pawn){
| ^~~~
| int
src/bitbase.cc: In function 'bool Bitbase::kpk_is_winning(Color, int, int, int)':
src/bitbase.cc:20:5: error: 'uint' was not declared in this scope; did you mean 'int'?
20 | uint index = kpk_get_index (color, bKing, wKing, pawn);
| ^~~~
| int
src/bitbase.cc:21:25: error: 'index' was not declared in this scope
21 | return (KPK_Bitbase[index >> 3] & (1 << (index & 7)));
| ^~~~~
src/bitbase.cc: At global scope:
src/bitbase.cc:24:48: error: 'uint' has not been declared
24 | void Bitbase::kpk_set(kpk_position bPosition, uint index){
| ^~~~
src/bitbase.cc: In function 'void Bitbase::kpk_classify(kpk_position
, kpk_position*)':
src/bitbase.cc:83:29: error: 'kpk_get_index' was not declared in this scope
83 | result |= table[kpk_get_index(BLACK, bksq, _popLsb(b), psq)].result;
| ^~~~~~~~~~~~~
src/bitbase.cc:85:29: error: 'kpk_get_index' was not declared in this scope
85 | result |= table[kpk_get_index(WHITE, _popLsb(b), wksq, psq)].result;
| ^~~~~~~~~~~~~
src/bitbase.cc:96:29: error: 'kpk_get_index' was not declared in this scope
96 | result |= table[kpk_get_index(BLACK, bksq, wksq, psq + 8)].result;
| ^~~~~~~~~~~~~
src/bitbase.cc:101:29: error: 'kpk_get_index' was not declared in this scope
101 | result |= table[kpk_get_index(BLACK, bksq, wksq, psq + 8 + 8)].result;
| ^~~~~~~~~~~~~
src/bitbase.cc: In function 'void Bitbase::init_kpk()':
src/bitbase.cc:120:5: error: 'uint' was not declared in this scope; did you mean 'int'?
120 | uint index;
| ^~~~
| int
src/bitbase.cc:124:10: error: 'index' was not declared in this scope
124 | for (index = 0; index < KPK_SIZE; ++index) kpk_set(kpkTable + index, index);
| ^~~~~
src/bitbase.cc:128:14: error: 'index' was not declared in this scope
128 | for (index = 0; index < KPK_SIZE; ++index)
| ^~~~~
src/bitbase.cc:137:10: error: 'index' was not declared in this scope
137 | for (index = 0; index < KPK_SIZE; ++index)
| ^~~~~
mingw32-make: *** [Makefile:43: obj/bitbase.o] Error 1

false positve

Windows defender detects a trojan so severe that it physically stops me from allowing the download to happen, even from the windows defender dashboard. Obviously it's a false positive, is it possible to stop such a thing from happening?

Ponder and FRC?

Hi! Do you have plans to implement ponder and/or FRC support?

nps calculation bug

Hello Alexander,

I compiled current Drofa today and noticed a nps calculation bug (see depth >= 14).

Drofa 1.3.1 by Rhys Rustad-Elliott and Litov Alexander (built Oct 16 2020 17:08:30)
uci
id name Drofa 1.3.1
id authors Rhys Rustad-Elliott and Alexander Litov

option name BookPath type string default book.bin
option name Hash type spin default 256 min 25 max 1024
option name OwnBook type check default false
uciok
go infinite
HASH_size 336
info depth 1 seldepth 1 nodes 45 score cp 53 nps 45000 time 1 pv d2d4
info depth 2 seldepth 2 nodes 158 score cp 0 nps 52666 time 3 pv d2d4 d7d5
info depth 3 seldepth 3 nodes 538 score cp 29 nps 76857 time 7 pv d2d4 d7d5 g1f3
info depth 4 seldepth 6 nodes 1609 score cp 7 nps 146272 time 11 pv e2e4 d7d5 f1b5 c8d7
info depth 5 seldepth 7 nodes 3827 score cp 28 nps 239187 time 16 pv d2d4 d7d5 g1f3 g8f6 c1f4
info depth 6 seldepth 8 nodes 11029 score cp 22 nps 393892 time 28 pv e2e4 d7d5 e4d5 d8d5 b1c3 d5d4
info depth 7 seldepth 10 nodes 17598 score cp 18 nps 451230 time 39 pv e2e4 d7d5 e4d5 d8d5 d2d4 d5e4 c1e3
info depth 8 seldepth 11 nodes 38636 score cp 28 nps 594400 time 65 pv e2e4 e7e6 b1c3 d7d5 d2d4 d5e4 c3e4 f8b4
info depth 9 seldepth 13 nodes 78823 score cp 15 nps 691429 time 114 pv e2e4 e7e5 d2d4 d7d5 d4e5 d5e4 d1d8 e8d8 c1g5
info depth 10 seldepth 14 nodes 162999 score cp 29 nps 761677 time 214 pv e2e4 e7e5 g1f3 g8f6 b1c3 f8d6 d2d4 e5d4 d1d4 e8g8
info depth 11 seldepth 15 nodes 350489 score cp 21 nps 820817 time 427 pv e2e4 e7e5 b1c3 b8c6 g1f3 f8b4 d2d4 e5d4 f3d4 b4c3 b2c3
info depth 12 seldepth 18 nodes 536011 score cp 27 nps 845443 time 634 pv e2e4 e7e5 b1c3 f8b4 c3d5 b8c6 d5b4 c6b4 c2c3 b4c6 d2d4 d7d6
info depth 13 seldepth 21 nodes 1367166 score cp 22 nps 878641 time 1556 pv e2e4 e7e6 d2d4 d7d5 e4e5 b8c6 b1c3 f8b4 d1d3 g8e7 a2a3 b4c3 d3c3
info depth 14 seldepth 21 nodes 2524980 score cp 16 nps -625216 time 2831 pv e2e4 e7e6 d2d4 d7d5 e4e5 c7c5 b1c3 b8c6 f1b5 c8d7 c1e3 d8b6 d4c5 f8c5
info depth 15 seldepth 23 nodes 4111041 score cp 24 nps -39854 time 4615 pv e2e4 e7e6 d2d4 d7d5 b1d2 f8b4 e4e5 b8c6 a2a3 b4e7 d1g4 e8f8 g1f3 g8h6 g4g3
info depth 16 seldepth 25 nodes 10156662 score cp 18 nps 136712 time 11460 pv e2e4 e7e6 d2d4 d7d5 b1d2 f8b4 e4e5
info depth 17 seldepth 25 nodes 14394054 score cp 18 nps 92859 time 16252 pv e2e4 e7e6 d2d4 d7d5 b1d2 f8b4 e4e5 b8c6 a2a3 b4e7 d1g4 e8f8 f1b5 c8d7 b5d3 e7g5

Perft give false results

Hi
I tried to do a perft test, but I found that the results are false
This is what I found for example at depth 4

a2a3: 8457
b2b3: 9347
c2c3: 9347
d2d3: 11961
e2e3: 13280
f2f3: 8457
g2g3: 9347
h2h3: 8457
a2a4: 9329
b2b4: 9332
c2c4: 9818
d2d4: 12437
e2e4: 13308
f2f4: 8929
g2g4: 9328
h2h4: 9329
b1a3: 8885
b1c3: 9757
g1f3: 9754
g1h3: 8883
Moves 197,742

The total move should be 197,281. Unless you count moves with another way ?

I like your code, its very well documented. Im learning a lot with it.
Thanks
Carbec

Drofa under Fritz

Not a big issue but still. Drofa is OK under Fritz but its installation is not seamless. When I open the options window (e.g. for changing the default number of threads which Fritz 17 sets to 4 initially) then try to save the engine, I can't, nothing happens. I have to create a .uci file for Fritz and edit the options manually. After that Fritz can use Drofa without further issues.
BTW, I have similar a issue with SlowChess Blitz.

Apologies if this was not clear.

BTW, when will this release be finalized (that is, not a pre-release)?

Possible problem (warning about missing PAWN switch)?

Hello Alexander,

Today I have compiled Drofa again and noticed one warning, which sounds suspicious to me.

Guenther Simon@CAPPUCCINO MINGW64 ~/Drofa
$ make
mkdir obj
g++ -Wall -std=c++11 -O3 -march=native -flto -pthread -fno-exceptions -c -o obj/attacks.o src/attacks.cc
g++ -Wall -std=c++11 -O3 -march=native -flto -pthread -fno-exceptions -c -o obj/board.o src/board.cc
src/board.cc: In member function 'U64 Board::getMobilityForSquare(PieceType, Color, int, U64) const':
src/board.cc:74:10: warning: enumeration value 'PAWN' not handled in switch [-Wswitch]
   74 |   switch (pieceType) {
      |          ^

Looking at the code it seems you have a special case for PAWN in

U64 Board::getAttacksForSquare(PieceType pieceType, Color color, int square) const {
  // Special case for pawns
  if (pieceType == PAWN) {
    switch (color) {
      case WHITE: return _getWhitePawnAttacksForSquare(square);
      case BLACK: return _getBlackPawnAttacksForSquare(square);
    }

but not for 'getMobilityForSquare', is this intentional?
I thought I let you better know. You can close this if you think it is no problem.

BTW this is the output for Drofa 2.08 dev from my slow hardware currently (startpos)

Drofa 2.0.8 by Rhys Rustad-Elliott and Litov Alexander (built Nov 30 2020 18:23:42)
uci
id name Drofa 2.0.8
id authors Rhys Rustad-Elliott and Alexander Litov

option name BookPath type string default book.bin
option name OwnBook type check default false
uciok
ucinewgame
isready
readyok
position startpos
go infinite
info depth 1 seldepth 1 nodes 51 score cp 97 nps 51000 time 1 pv e2e4
info depth 2 seldepth 2 nodes 202 score cp 0 nps 67000 time 3 pv e2e4 e7e5
info depth 3 seldepth 4 nodes 825 score cp 46 nps 137000 time 6 pv e2e3 d7d5 d2d4
info depth 4 seldepth 6 nodes 2421 score cp 25 nps 242000 time 10 pv e2e4 d7d5 f1b5 c8d7
info depth 5 seldepth 7 nodes 3863 score cp 53 nps 297000 time 13 pv e2e4 d7d5 e4d5 d8d5 d2d4
info depth 6 seldepth 8 nodes 7065 score cp 12 nps 392000 time 18 pv e2e4 d7d5 e4d5 d8d5 b1c3 d5d4
info depth 7 seldepth 10 nodes 15215 score cp 30 nps 524000 time 29 pv d2d4 d7d5 c1f4 e7e6 e2e3 f8b4 b1c3
info depth 8 seldepth 10 nodes 25336 score cp 15 nps 617000 time 41 pv d2d4 d7d5 c1f4 c8f5 e2e3 b8c6 g2g4 f5e4
info depth 9 seldepth 12 nodes 44668 score cp 23 nps 709000 time 63 pv d2d4 d7d5 c1f4 c8f5 e2e3 e7e6 f1d3 f8b4 b1c3
info depth 10 seldepth 13 nodes 87206 score cp 17 nps 800000 time 109 pv d2d4 d7d5 c1f4 c8f5 e2e3 e7e6 f1b5 b8c6 b1c3 f8d6
info depth 11 seldepth 15 nodes 155255 score cp 23 nps 848000 time 183 pv d2d4 d7d5 c1f4 c8f5 e2e3 e7e6 f1b5 c7c6 b5d3 f5d3 d1d3
info depth 12 seldepth 16 nodes 570968 score cp 32 nps 926000 time 616 pv e2e4 e7e6 d2d4 d7d5 e4e5 c7c5 b1c3 b8c6 c1e3 c8d7 g1f3 c5d4
info depth 13 seldepth 16 nodes 808439 score cp 36 nps 928000 time 871 pv e2e4 e7e6 d2d4 d7d5 e4e5 c7c5 b1c3 b8c6 c1e3 c8d7 d4c5 c6e5 g1f3
info depth 14 seldepth 18 nodes 1187955 score cp 43 nps 931000 time 1275 pv e2e4 e7e6 d2d4 d7d5 b1c3 d5e4 c3e4 b8c6 g1f3 g8f6 c1g5 f8e7 e4f6 e7f6
info depth 15 seldepth 18 nodes 1783713 score cp 31 nps 939000 time 1898 pv e2e4 e7e6 d2d4 d7d5 b1c3 d5e4 c3e4 b8c6 g1f3 g8f6 e4f6 d8f6 f1b5 c8d7 c1g5
info depth 16 seldepth 21 nodes 5492756 score cp 28 nps 930000 time 5905 pv e2e4 e7e5 d2d4 e5d4 d1d4 b8c6 d4c4 d7d6 b1c3 a7a6 g1f3 c8e6 c3d5 g8f6 f3d4 c6d4

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.