Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FEN string to bitboards #1

Open
nymann opened this issue Jul 19, 2020 · 0 comments
Open

FEN string to bitboards #1

nymann opened this issue Jul 19, 2020 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@nymann
Copy link
Contributor

nymann commented Jul 19, 2020

Rationale

In the API we want to easily lookup a position in our database, the user provides us with a FEN string and in order to speed up query performance we filter by bitboards

Implementation

Given a FEN string compute the following bit boards:

{

    "fen": "string",
    "bitboard_all": 0,
    "bitboard_white": 0,
    "bitboard_black": 0,
    "bitboard_white_pawn": 0,
    "bitboard_black_pawn": 0,
    "bitboard_white_rook": 0,
    "bitboard_black_rook": 0,
    "bitboard_white_knight": 0,
    "bitboard_black_knight": 0,
    "bitboard_white_bishop": 0,
    "bitboard_black_bishop": 0,
    "bitboard_white_queen": 0,
    "bitboard_black_queen": 0,
    "bitboard_white_king": 0,
    "bitboard_black_king": 0

}

This needs to be relative fast, since we are computing it for each API request to GET /positions/{fen} POST /positions/

Cython maybe an idea here?

@nymann nymann added the enhancement New feature or request label Jul 19, 2020
@nymann nymann assigned Regarrzo and unassigned Regarrzo Jul 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants