Skip to content
This repository has been archived by the owner on Oct 8, 2024. It is now read-only.

Strange move generation bug when creating positions in checkmate #13

Open
dannyhammer opened this issue Aug 14, 2024 · 0 comments
Open
Labels
bug Something isn't working

Comments

@dannyhammer
Copy link
Owner

Given the following position: 1k6/1Q6/K7/8/8/8/8/8 w - - 0 1, brogle seems to think b7b8 is a legal move. which obviously isn't, since it captures k.

This manifests itself with the following stacktracek:

go
Moving Q b7->b8 # debug print
thread '<unnamed>' panicked at brogle_core/src/movegen.rs:817:9:
index out of bounds: the len is 64 but the index is 64
stack backtrace:
   0: rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::panicking::panic_bounds_check
   3: brogle_core::movegen::MoveGenerator::generate_legal
   4: brogle_core::position::Game::make_move
   5: brogle_core::position::Game::with_move_made
   6: brogle::search::searcher::Searcher::start
   7: <F as threadpool::FnBox>::call_box
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

because, apparently, after moving Q there, k gets placed at a9?

@dannyhammer dannyhammer added the bug Something isn't working label Aug 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant