Coder Social home page Coder Social logo

k2's People

Contributors

niklasf avatar ptrcnull avatar serg-meus avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

k2's Issues

nothing show during chess engine analysis (uci when test xboard return error) using python-chess on google colab

step
!git clone https://github.com/serg-meus/k2
!cd k2 && make
!cp k2/k2 /bin/

result
when using xboard protocol

[/usr/local/lib/python3.9/dist-packages/chess/engine.py](https://localhost:8080/#) in communicate(self, command_factory)
   1092             self.command._cancel(self)
   1093 
-> 1094         return await command.result
   1095 
   1096     def __repr__(self) -> str:

EngineError: xboard engine did not declare required feature: ping

when using uci protocol
image

Bug with mixed time control

Under Arena and Fritz GUI detected engine time waste if type of time control is set so that it changes during the game. For example, first TC is set to 5 min per 40 moves and second TC is set to 3 minutes for all the rest moves. In that case after 40 move engine will waste all 3 minutes for move 41.

Problem using python-chess

I'm using K2 0.83 with PicoChess using python-chess by @niklasf. I compiled K2 on Raspberry Pi 3 with -march=armv6 to ensure backwards compatibility with RPi2.

The problem is: when K2 leaves the opening book it stops responding. What could be the cause?

There was another engine, Cinnamon by @gekomad, which also had this error. It was related to an infinite loop when closing stdin and to the use of isready/readyok. Cinnamon has been fixed now (pull requests #3 and #4).

Traceback (most recent call last):
File "./picochess.py", line 841, in
main()
File "./picochess.py", line 788, in main
stop_search_and_clock()
File "./picochess.py", line 205, in stop_search_and_clock
stop_search()
File "./picochess.py", line 198, in stop_search
engine.stop()
File "/opt/picochess/engine.py", line 230, in stop
self.engine.stop()
File "/usr/local/lib/python3.4/dist-packages/chess/uci.py", line 1249, in stop
return self._queue_command(command, async_callback)
File "/usr/local/lib/python3.4/dist-packages/chess/uci.py", line 890, in _queue_command
return future.result()
File "/usr/lib/python3.4/concurrent/futures/_base.py", line 397, in result
self._condition.wait(timeout)
File "/usr/lib/python3.4/threading.py", line 290, in wait
waiter.acquire()

Go searchmoves

Hi Sergey,

we had something similar on #1 (comment)
Can y consider to support this (by uci docu needed) feature, please?

Jürgen

gcc options craches binaries

crashed with mingw64 gcc after "uci" command

so as for me safest build with:

g++ main.cpp engine.cpp eval.cpp hash.cpp movegen.cpp chess.cpp Timer.cpp -std=c++0x -march=native -static -fno-exceptions -pipe -funroll-loops -ffunction-sections -Wl,--gc-sections -Wl,--strip-all -Wall -Wcast-qual -pedantic -Wextra -Wshadow -O3 -DNDEBUG=1 -o k2

but it produced warnings below:

main.cpp: In member function 'void k2main::SetboardCommand(std::__cxx11::string)':
main.cpp:267:44: warning: cast from type 'const char*' to type 'char*' casts away qualifiers [-Wcast-qual]
if(!FenStringToEngine((char )in.c_str()))
^
main.cpp: In member function 'void k2main::PerftCommand(std::__cxx11::string)':
main.cpp:298:11: warning: declaration of 'timer' shadows a member of 'k2main' [-Wshadow]
Timer timer;
^~~~~
In file included from main.h:1:0,
from main.cpp:1:
engine.h:63:11: note: shadowed declaration is here
Timer timer;
^~~~~
main.cpp: In member function 'void k2main::PositionCommand(std::__cxx11::string)':
main.cpp:661:55: warning: cast from type 'const char
' to type 'char*' casts away qualifiers [-Wcast-qual]
if(!FenStringToEngine((char )fenstring.c_str()))
^
main.cpp: In member function 'void k2main::ProcessMoveSequence(std::__cxx11::string)':
main.cpp:695:47: warning: cast from type 'const char
' to type 'char*' casts away qualifiers [-Wcast-qual]
if(!MakeMoveFinaly((char *)arg1.c_str()))
^
engine.cpp: In member function 'bool k2engine::MoveIsPseudoLegal(k2chess::move_c&, bool)':
engine.cpp:1571:67: warning: ?: using integer constants in boolean context [-Wint-in-bool-context]
if(get_col(from_coord) != 4 || get_row(from_coord) != stm ? 0 : 7)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
eval.cpp: In member function 'k2chess::score_t k2eval::KingOpenFiles(k2chess::side_to_move_t)':
eval.cpp:1033:14: warning: declaration of 'k' shadows a previous local [-Wshadow]
auto k = pawn_max[get_col(*rit)][king_color] ? 1 : 2;
^
eval.cpp:1002:10: note: shadowed declaration is here
auto k = *king_coord[king_color];

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.