Coder Social home page Coder Social logo

tempate / achillees Goto Github PK

View Code? Open in Web Editor NEW
4.0 4.0 1.0 703 KB

A readable chess engine written in C.

Home Page: https://lichess.org/@/Achillees

License: GNU General Public License v3.0

Makefile 0.57% C 97.27% C++ 2.15%
chess-engine chess engine

achillees's Introduction

Achillees

This project is an attempt at making a readable and accessible chess engine. It's written in plain C and it currently uses the GPLv3+ license. The command help will show you the list of human-friendly commands. You can also set it to UCI mode with the command uci.

All comments and feedback are appreciated. Feel free to join us at ##chessprogramming on Freenode IRC and share your thoughts.

You are also free to challenge it at Lichess.

Features

The project is under active development and new features will come shortly.

Move generation

  • Plain magic bitboards
  • Legal move generation

Evaluation

  • Material count
  • Piece-Square tables

Search

  • AlphaBeta Pruning

  • Move ordering

  • Transposition Table

  • Time management

  • Quiescence search

  • Check extensions

  • Late move reduction

  • Aspiration windows

  • Null window search

  • Internal Iterative Deepening

  • Pruning

    • Razoring
    • Delta pruning
    • Null move pruning
    • Futility pruning
    • Reverse futility pruning
    • Late move pruning

Running the code

You can get the code running by following three simple steps:

  1. Download the code
git clone https://github.com/Tempate/Achillees
  1. Type the command:
make release
  1. An executable should now appear inside your bin folder, you can run it by doing:
./Achillees

Credits

Special thanks to the chessprogramming wiki, as most of the knowledge needed came from reading through it; to ROCE, without which it would have taken ages to pass perft; and to Daily Chess for their fantastic guide.

I also feel the need to thank everyone on ##chessprogramming on Freenode IRC for their support, encouragement, and exhaustive help.

achillees's People

Contributors

tempate avatar

Stargazers

Dan Buske avatar  avatar En-En avatar Sergio Garcia avatar

Watchers

David Joerg avatar James Cloos avatar Roelof Berkepeis avatar Protej avatar

Forkers

en-en-code

achillees's Issues

new version ?

I read at "Features" :
The project is under active development and new features will come shortly.

Are you still planning to work on Achillees ?

Made android armv7-neon version

This version in android I added math_neon.h runfast commands to the source. It is very fast and kicks the Sasha engine butt.

Illegal move

Here is the game:

[Round "2"]
[White "Achillees"]
[Black "zahak_next"]
[Result "0-1"]
[ECO "B50"]
[GameDuration "00:03:37"]
[GameEndTime "2021-04-21T13:18:41.891 EDT"]
[GameStartTime "2021-04-21T13:15:04.512 EDT"]
[Opening "Sicilian"]
[PlyCount "116"]
[Termination "illegal move"]
[TimeControl "60+1"]

1. e4 {book} c5 {book} 2. Nf3 {book} d6 {book} 3. Nc3 {+0.40/13 3.2s}
Nf6 {-0.70/12 3.0s} 4. d4 {+0.40/13 3.1s} cxd4 {-0.54/12 2.9s}
5. Qxd4 {+0.37/12 3.1s} Bg4 {-0.74/11 2.9s} 6. h3 {+0.43/12 3.0s}
Bxf3 {-0.30/13 2.8s} 7. gxf3 {+0.32/13 2.9s} e5 {-0.40/12 2.7s}
8. Qa4+ {+0.55/13 2.8s} Nbd7 {-0.55/12 2.7s} 9. Qb5 {+0.48/12 2.8s}
Qc7 {-0.18/12 2.6s} 10. Nd5 {+0.54/14 2.7s} Nxd5 {+0.05/13 2.6s}
11. exd5 {+0.56/14 2.6s} a6 {+0.79/12 2.5s} 12. Qb4 {+0.51/13 2.6s}
Be7 {+0.78/12 2.5s} 13. Rg1 {+0.50/12 2.5s} a5 {+0.55/11 2.4s}
14. Qa4 {+0.71/13 2.5s} g6 {+0.35/12 2.4s} 15. Bh6 {+0.88/13 2.4s}
O-O-O {+0.26/13 2.3s} 16. Bb5 {+1.01/11 2.4s} Nc5 {+0.30/12 2.3s}
17. Qc4 {+1.08/13 2.3s} Kb8 {+0.26/13 2.2s} 18. c3 {+1.10/12 2.3s}
Qc8 {+0.74/12 2.2s} 19. Rg3 {+1.31/13 2.2s} Qf5 {+0.74/11 2.2s}
20. b4 {+1.29/14 2.2s} Nd7 {+0.62/12 2.1s} 21. bxa5 {+1.86/13 2.1s}
Nc5 {+0.06/11 2.1s} 22. Qg4 {+1.69/12 2.1s} Qc2 {+0.72/13 2.0s}
23. Qb4 {+1.60/13 2.0s} Ka8 {+0.60/12 2.0s} 24. a3 {+1.97/12 2.0s}
Bh4 {+1.28/11 2.0s} 25. Rc1 {+2.49/15 2.0s} Qb3 {-0.56/13 1.9s}
26. Rg4 {+2.48/14 1.9s} Be7 {-0.55/12 1.9s} 27. Bc4 {+2.33/14 1.9s}
Qa4 {-0.21/14 1.9s} 28. Bb5 {+2.46/13 1.9s} Qb3 {-0.47/14 1.9s}
29. Bc4 {+2.31/13 1.8s} Qa4 {-0.10/13 1.8s} 30. Qxa4 {+2.31/13 1.8s}
Nxa4 {-0.66/13 1.8s} 31. Bf1 {+2.27/13 1.8s} Nc5 {-0.28/13 1.8s}
32. Rb1 {+1.89/12 1.7s} Rc8 {0.00/12 1.7s} 33. c4 {+2.03/12 1.7s}
Bd8 {+0.27/10 1.7s} 34. Rb5 {+1.98/14 1.7s} f5 {+0.24/11 1.7s}
35. Rg1 {+1.79/13 1.7s} f4 {-0.08/12 1.7s} 36. Kd2 {+1.88/13 1.6s}
Kb8 {-0.17/12 1.6s} 37. Kc3 {+1.82/12 1.6s} Na6 {+0.18/12 1.6s}
38. Kb3 {+1.98/13 1.6s} Nc7 {0.00/14 1.6s} 39. Rb6 {+1.39/15 1.6s}
Ne8 {0.00/14 1.6s} 40. Rb5 {+1.24/15 1.5s} Nc7 {0.00/15 1.6s}
41. Rb6 {+1.19/15 1.5s} Ne8 {0.00/16 1.5s} 42. Rb4 {+1.07/14 1.5s}
Bxa5 {+0.81/15 1.5s} 43. Rb5 {+1.05/14 1.5s} Be1 {+1.04/15 1.5s}
44. Rg2 {+0.86/15 1.5s} Nc7 {+0.94/14 1.5s} 45. Rb6 {+0.85/15 1.5s}
Rhd8 {+0.81/13 1.5s} 46. Ka2 {+0.86/14 1.4s} Bc3 {+0.79/13 1.5s}
47. Rb1 {+0.78/13 1.4s} Bd4 {+0.99/12 1.4s} 48. Bd3 {+0.79/13 1.4s}
Na8 {+1.00/12 1.4s} 49. Rb5 {+0.76/13 1.4s} Nb6 {+1.24/13 1.4s}
50. Kb3 {+0.78/13 1.4s} Rc7 {+1.39/14 1.4s} 51. Be2 {+0.37/14 1.4s}
Rdc8 {+1.35/13 1.4s} 52. Rb4 {0.00/15 1.3s} Bc5 {+1.33/12 1.4s}
53. Rb5 {0.00/15 1.3s} Bd4 {+1.39/14 1.4s} 54. Rb4 {0.00/15 1.3s}
Ka8 {+1.27/14 1.4s} 55. Bf1 {+0.47/13 1.3s} Bc5 {+1.36/13 1.3s}
56. Rb5 {0.00/15 1.3s} Bd4 {+1.34/13 1.3s} 57. Rb4 {0.00/15 1.3s}
Bc5 {+1.33/13 1.3s} 58. Rb5 {0.00/15 1.3s}
Ka7 {+1.29/13 1.3s, White makes an illegal move: b6c4} 0-1

Unfortunately I don't have logs, but it looks like the issue is with declaring draws too early?

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.