Skip to content

FEN string to bitboards #1

@nymann

Description

@nymann

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?

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions