Giter Site home page Giter Site logo

colding10 / kingfish Goto Github PK

View Code? Open in Web Editor NEW
4.0 3.0 0.0 89.32 MB

C++ UCI chess engine (2000 ELO)

License: GNU General Public License v3.0

C++ 97.11% CMake 2.89%
chess chess-engine cpp engine chess-ai chess-game chess-uci cmake cmakelists cpp20

kingfish's Introduction

Top Langs Colin's GitHub stats

Repo 1 Repo 2

kingfish's People

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

kingfish's Issues

Incorporate threading into the engine

Is your feature request related to a problem? Please describe.
When I play the bot, it sometimes thinks for annoyingly long. It is understandable but I want it to be faster.

Describe the solution you'd like
I want the engine to calculate faster. Incorporating threading would make it faster.

Describe alternatives you've considered
It could use threads to calculate faster.

Additional context
Add any other context or screenshots about the feature request here.

Engine surprisingly slow

Describe the bug
The engine is pretty slow during the game. Seems to overspend allocated time.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
I expect it to be faster on simple moves like captures. Also, it should stop searching if time is over.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Engine makes illegal knight move

Describe the bug
It moves a knight down 2 right 2.

To Reproduce
Steps to reproduce the behavior:

  1. Run engine
  2. Send command position startpos moves e2e4 b8c6 b1c3 g8f6 d2d4 d7d5 e4e5 f6e4 c3e4 d5e4 c1g5 d8d4 g1f3 d4d1 a1d1 e4f3 g2f3 c6e5 f1b5 c8d7 b5d7 e5d7 c2c4 d7e5 e1g1 e5f3 g1h1 f3g5 c4c5 g5f3 b2b4
  3. Send command go wtime -452926 btime 120619 movestogo 25
  4. See error

Expected behavior
It should make another better move that is not illegal. Also, king captures are illegal.

Screenshots
Screen Shot 2023-04-03 at 8 22 52 PM

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Engine makes illegal moves

Describe the bug
Plays (pawn) e7e5 when there is a piece at e5.

To Reproduce
Steps to reproduce the behavior:

  1. Play a game
  2. Send command position startpos moves e2e4 b8c6 g1f3 g8f6 b1c3 c6e5 f3e5
  3. Send command go wtime 224651 btime 223074 movestogo 37
  4. See error

Expected behavior
It should not make that illegal move

Screenshots
Screen Shot 2023-04-03 at 4 25 44 PM

Desktop (please complete the following information):

  • OS: macOS
  • Version 12.16.4

Additional context
N/A

Engine makes illegal rook move

Describe the bug
At position e2e4 b8c6 g1f3 g8f6 b1c3 d7d5 e4d5 f6d5 d2d4 d5c3 b2c3 e7e5 d4e5 d8d1 e1d1 c8g4 f1b5, the move a9d8 suggested by the engine is illegal. a9 is out of bounds.

To Reproduce
Steps to reproduce the behavior:

  1. Run the engine
  2. Send command position startpos moves e2e4 b8c6 g1f3 g8f6 b1c3 d7d5 e4d5 f6d5 d2d4 d5c3 b2c3 e7e5 d4e5 d8d1 e1d1 c8g4 f1b5
  3. Send command go wtime 168235 btime 63208 movestogo 32
  4. See error

Expected behavior
The rook moving is understandable. However, it should be a8d8.

Screenshots
Screen Shot 2023-04-03 at 5 30 42 PM

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

board fen generation doesn't work

example board output:

CHESSBOARD INFO
Turn: white
Move: 6294
FEN: pppppppp/pppppppp/pppppppp/pppppppp/pppppppp/pppppppp/pppppppp/pppppppp/
Hash: -1190157721
BLACK is winning!
White: -3.40282e+38
Black: 3.40282e+38
0  0  0  0  13 0  0  0  
0  0  8  8  0  0  0  8  
0  0  0  0  0  0  0  0  
0  0  0  0  0  0  0  0  
0  0  0  18 0  0  0  0  
0  0  16 0  0  0  0  0  
0  0  16 0  0  16 0  16 
11 0  0  0  0  0  21 10

Floating point exception when doing UCI go command

$ ./kingfish_1.2.0_compiled_HP 
uci
id name Kingfish 1.2.0
id author Colin D
uciok
ucinewgame
go infinite
info string remaining time: 0 time allocated: 0
info depth 1 score cp 0 nodes 2 nps 2000 hashfull 0 time 1 pv d2d4 
info depth 1 score cp 46 nodes 3 nps 3000 hashfull 0 time 1 pv d2d4 
info depth 1 score cp 22 nodes 637 nps 4649 hashfull 0 time 137 pv d2d4 
info depth 1 score cp 15 nodes 1393 nps 5484 hashfull 1 time 254 pv f2f4 
info depth 2 score cp 0 nodes 1395 nps 5492 hashfull 1 time 254 pv d2d4 
info depth 2 score cp 118 nodes 1436 nps 5565 hashfull 1 time 258 pv d2d4 
info depth 2 score cp 19 nodes 1572 nps 5695 hashfull 1 time 276 pv d2d4 
info depth 2 score cp 9 nodes 2344 nps 5904 hashfull 2 time 397 pv d2d4 
info depth 3 score cp 1 nodes 2397 nps 5947 hashfull 2 time 403 pv d2d4 
info depth 3 score cp 118 nodes 2440 nps 5995 hashfull 2 time 407 pv d2d4 
info depth 3 score cp 46 nodes 2471 nps 6041 hashfull 2 time 409 pv d2d4 
[...]

$ ./kingfish_1.2.0_compiled_HP 
uci
id name Kingfish 1.2.0
id author Colin D
uciok
ucinewgame
go wtime 603000 btime 603000 winc 3000 binc 3000
info string remaining time: 753000 time allocated: 11295
Floating point exception (core dumped)

it seems my second go command is not recognized .. this gives an error in CuteChess, which uses the wtime & btime format.

[ i'm on Xubuntu 22.04 ]

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.