Git Product home page Git Product logo

tidal's Introduction

Tidal

C Chess engine

Build

For chess, b≈35, m ≈ 100 (average ≈ 40) for "reasonable" games

  • exact solution completely infeasible!
  • would like to eliminate (large) parts of game tree
    $$35^{40}=5.79110^{61}$$ $$35^{100}=2.55210^{154}$$ $b \approx 35$ number of moves $m \approx 100$ $average \approx 40$

Installation

requires gcc and make

git clone [email protected]:Bungogood/C-Chess.git
cd C-Chess
mkdir .obj
make && ./chess

Standards

  • FEN (Forsyth–Edwards Notation)
  • SAN (Standard / Short Algebraic notation)
  • LAN (Long Algebraic notation)
  • PGN (Portable Game Notation)
  • UCI (Universal Chess Interface)

Techniques

Currently implemented:

  • bitboards
  • negamax
  • alpha beta pruning
  • quiescence search

To be added:

  • transposition table

API format

{
    "fen": "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1",
    "history": [ // include pgn?

    ],
    "possible": [

    ]
}

Stockfish

position fen {fen}
go perft {depth}

Ideas

remap

encode capture type re write gererate move store attacked squares change sort

             binary move bits             information      hexidecimal masks
    
    0000 0000 0000 0000 0000 0011 1111    source square       0x3f
    0000 0000 0000 0000 1111 1100 0000    target square       0xfc0
    0000 0000 0000 1111 0000 0000 0000    piece               0xf000
    0000 0000 1111 0000 0000 0000 0000    promoted piece      0xf0000
    0000 1111 0000 0000 0000 0000 0000    captured piece      0xf00000
    0001 0000 0000 0000 0000 0000 0000    capture flag        0x1000000
    0010 0000 0000 0000 0000 0000 0000    double push flag    0x2000000
    0100 0000 0000 0000 0000 0000 0000    enpassant flag      0x4000000
    1000 0000 0000 0000 0000 0000 0000    castling flag       0x8000000

References

General

Wikipedia:

Chess programming wiki:

http://wbec-ridderkerk.nl/html/UCIProtocol.html

tidal's People

Contributors

bungogood avatar

Stargazers

 avatar

Watchers

 avatar  avatar

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.