Coder Social home page Coder Social logo

juliette's Introduction

Cosmonaut in spirit; pushing through to new frontiers.

Computing for common good.

juliette's People

Contributors

alantao912 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

ongamse

juliette's Issues

macOS build

Hi Alan, since the readme suggests building on "Any UNIX derived OS", just wanted to point out a compilation error on macos (ventura 13.1):

src/util.h:140:16: error: definition of type 'stack_t' conflicts with typedef of the same name
typedef struct stack_t {
               ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types/_sigaltstack.h:48:33: note: 'stack_t' declared here
typedef _STRUCT_SIGALTSTACK     stack_t; /* [???] signal stack */

it seems some internal structure in the macos developer stack is also named stack_t. Would you consider wrapping in a namespace or renaming to support macos compilation?

Game progression

Implement determination of game progression based on material remaining.

Implement custom data structure for move lines

When considering different lines, worse lines are frequently swapped out for better lines. Create a data structure that is optimized to do this without dynamic memory allocation (slow) and excessive copying (also slow).

Convert minimax to negamax

Currently, there are two nearly identical functions to implement alpha-beta minimax. One for the minimizing side, one of the maximizing size. Use the relation: alphabeta(a,b) = -alphabeta(-b, -a) to convert to "negamax" therefore requiring less, more compact code.

Three-Fold Repetition Verification

Different Positions could have duplicate hash codes. Therefore, whenever the repetition count hits three during draw verification, we must verify the move history to see if the position is actually drawn by three-fold repetition.

no proper UCI implementation

i just discovered your Juliette chess engine .. i managed to compile it and it seems a valid binary is created, but then it fails in CuteChess.

at first i let it play a 7m+3s game :

<4ku v4.0(149): readyok
>Juliette(148): ucinewgame
>Juliette(148): position startpos
>4ku v4.0(149): ucinewgame
>4ku v4.0(149): position startpos
>Juliette(148): isready
<Juliette(148): readyok
>Juliette(148): go wtime 423000 btime 423000 winc 3000 binc 3000
<Juliette(148): bestmove d2d4
>4ku v4.0(149): position startpos moves d2d4
>4ku v4.0(149): isready
<4ku v4.0(149): readyok
>4ku v4.0(149): go wtime 409231 btime 423000 winc 3000 binc 3000
<4ku v4.0(149): info depth 1 score cp 18 time 0 nodes 20 pv g8f6
<4ku v4.0(149): info depth 2 score cp 8 time 0 nodes 91 pv g8f6 b1c3
[...]
<4ku v4.0(149): info depth 23 score cp -30 time 12047 nodes 12539888 nps 1040913 pv d7d5
<4ku v4.0(149): info depth 24 score cp -41 time 19509 nodes 20353239 nps 1043274 pv d7d5
<4ku v4.0(149): bestmove d7d5
>Juliette(148): position startpos moves d2d4 d7d5
>Juliette(148): isready
<Juliette(148): juliette:: board initialization failed!
<Juliette(148): readyok
>Juliette(148): go wtime 409231 btime 406491 winc 3000 binc 3000
<Juliette(148): juliette:: a start position must be specified.

Juliette knows the UCI protocol but it can't interpret position startpos moves d2d4 d7d5 and quits by a start position must be specified ..

then i let it play a game with many hours thinking time, just to see what happens :

<4ku v4.0(144): readyok
>Juliette(143): ucinewgame
>Juliette(143): position startpos
>4ku v4.0(144): ucinewgame
>4ku v4.0(144): position startpos
>Juliette(143): isready
<Juliette(143): readyok
>Juliette(143): go wtime 423000 btime 423000 winc 3000 binc 3000
<Juliette(143): bestmove g1f3
>4ku v4.0(144): position startpos moves g1f3
>4ku v4.0(144): isready
<4ku v4.0(144): readyok
>4ku v4.0(144): go wtime 409222 btime 423000 winc 3000 binc 3000
<4ku v4.0(144): info depth 1 score cp -29 upperbound time 0 nodes 20
<4ku v4.0(144): info depth 1 score cp -29 time 1 nodes 40 nps 40000 pv b8c6
[...]
<4ku v4.0(144): info depth 22 score cp -27 time 8395 nodes 8957271 nps 1066976 pv d7d5 d2d4 g8f6 e2e3 e7e6 c2c4 c7c5 c4d5 e6d5 f1b5
<4ku v4.0(144): info depth 23 score cp -38 time 14169 nodes 15184113 nps 1071643 pv d7d5 d2d4 g8f6 c2c4 d5c4
<4ku v4.0(144): bestmove d7d5
>Juliette(143): position startpos moves g1f3 d7d5
>Juliette(143): isready
<Juliette(143): juliette:: board initialization failed!
<Juliette(143): readyok
>Juliette(143): go wtime 409222 btime 411832 winc 3000 binc 3000
<Juliette(143): juliette:: a start position must be specified.

Juliette doesn't output a bestmove !?

it's a pitty Juliette can't play in CuteChess .. it seems a minor bug, maybe you didn't mention those errors in e.g. CuteChess ..

btw.

  • in the source code i see you implemented some UCI options by setoption, but they're not visible in the CuteChess option pane !? I guess this is also easy to repair ..
  • i had to change the code just a little to get a valid bestmove output : you did a ':' after bestmove but CuteChess (and other chess software) will fail such command bestmove: [move].
  • you could add the 'uci' label on your GitHub page.

[ i'm on Xubuntu 22.04 ]

Create "MoveList" object to replace std::vector<uint32_t>

We must know how many checks/captures there are in a move list. It may be convenient to create a "movelist" object backed by an array that also tracks additional information such as the number of checks, and the number of captures.

Implement custom data structure for movelist

Implement a custom data structure for the move list with counters storing data for the number of checks, and captures. This data structure should be optimized for swapping elements and popping back.

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.