license compliance
This commit is contained in:
parent
aa048dd6a6
commit
0fc6af54b9
|
@ -1,6 +1,18 @@
|
|||
use std::error::Error;
|
||||
use std::fmt::{Display, Formatter};
|
||||
use std::num::ParseIntError;
|
||||
// Bamboo, a NNUE chess engine written in Rust.
|
||||
// Copyright (C) 2023 c0repwn3r
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
use crate::boardfield::{Boardfield, BoardfieldOps};
|
||||
use crate::error::FENParseError;
|
||||
use crate::piece::{PieceColor, PieceOnBoard, PieceType};
|
||||
|
|
|
@ -1,11 +1,17 @@
|
|||
// Bitpacked board:
|
||||
// One piece can be represented with 4 bits. Therefore, we can fit two pieces in one byte:
|
||||
// 0b0110_1110 -
|
||||
// | \
|
||||
// Black king \- White king
|
||||
// As there are 64 spaces on the board, we can pack the board into a 256-bit integer, and we use that as the index for transposition tables and such.
|
||||
// Boards are stored as a 32-byte bitfield, to make accessing them as efficient as possible.
|
||||
// We could theoretically pack it into two u128s, but some basic testing seems like LLVM can optimize array indexing faster than the bucketload of shift ops needed to pack it into u128s.
|
||||
// Bamboo, a NNUE chess engine written in Rust.
|
||||
// Copyright (C) 2023 c0repwn3r
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
use crate::boardloc;
|
||||
use crate::piece::{PieceColor, PieceType};
|
||||
|
|
|
@ -1,3 +1,18 @@
|
|||
// Bamboo, a NNUE chess engine written in Rust.
|
||||
// Copyright (C) 2023 c0repwn3r
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
use std::error::Error;
|
||||
use std::fmt::{Display, Formatter};
|
||||
use std::num::ParseIntError;
|
||||
|
|
|
@ -1,3 +1,18 @@
|
|||
// Bamboo, a NNUE chess engine written in Rust.
|
||||
// Copyright (C) 2023 c0repwn3r
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
pub mod boardfield;
|
||||
pub mod piece;
|
||||
pub mod board;
|
||||
|
|
|
@ -1,3 +1,18 @@
|
|||
// Bamboo, a NNUE chess engine written in Rust.
|
||||
// Copyright (C) 2023 c0repwn3r
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
use std::{io};
|
||||
use std::sync::{Arc};
|
||||
use crate::uci::{uci_handle_command, UCIState};
|
||||
|
|
|
@ -1,3 +1,18 @@
|
|||
// Bamboo, a NNUE chess engine written in Rust.
|
||||
// Copyright (C) 2023 c0repwn3r
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
#[derive(Default, Debug)]
|
||||
pub struct BNNModel {
|
||||
|
||||
|
|
|
@ -1,3 +1,18 @@
|
|||
// Bamboo, a NNUE chess engine written in Rust.
|
||||
// Copyright (C) 2023 c0repwn3r
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
use crate::piece::PieceType::{Bishop, King, Knight, Pawn, Queen, Rook};
|
||||
|
||||
#[derive(Debug, Ord, PartialOrd, Eq, PartialEq, Clone)]
|
||||
|
|
|
@ -1,3 +1,18 @@
|
|||
// Bamboo, a NNUE chess engine written in Rust.
|
||||
// Copyright (C) 2023 c0repwn3r
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
use std::error::Error;
|
||||
use crate::{ENGINE_AUTHOR, ENGINE_NAME, ENGINE_VERSION};
|
||||
use std::fmt::Write;
|
||||
|
|
|
@ -1,21 +1,18 @@
|
|||
/*
|
||||
// Bamboo, a NNUE chess engine written in Rust.
|
||||
// Copyright (C) 2023 c0repwn3r
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
a b c d e f g h
|
||||
|
||||
8 56 57 58 59 60 61 62 63 8 -+
|
||||
7 48 49 50 51 52 53 54 55 7 |- bf2
|
||||
6 40 41 42 43 44 45 46 47 6 |
|
||||
5 32 33 34 35 36 37 38 39 5 -+
|
||||
4 24 25 26 27 28 29 30 31 4 -+
|
||||
3 16 17 18 19 20 21 22 23 3 |
|
||||
2 8 9 10 11 12 13 14 15 2 |- bf1
|
||||
1 0 1 2 3 4 5 6 7 1 -+
|
||||
|
||||
a b c d e f g h
|
||||
*/
|
||||
|
||||
use std::error::Error;
|
||||
use std::fmt::{Display, Formatter};
|
||||
use crate::error::AlgebraicNotationError;
|
||||
|
||||
pub fn algebraic_to_boardloc(algebraic: &str) -> Result<isize, AlgebraicNotationError> {
|
||||
|
|
|
@ -1,3 +1,18 @@
|
|||
// Bamboo, a NNUE chess engine written in Rust.
|
||||
// Copyright (C) 2023 c0repwn3r
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
use std::path::PathBuf;
|
||||
use clap::{Parser, Subcommand};
|
||||
|
||||
|
|
Loading…
Reference in New Issue