BenBot 1.7.5
A chess engine
Loading...
Searching...
No Matches
Weights.hpp File Reference
#include <array>
#include <cassert>
#include <cstddef>
#include <cstdint>
#include <libbenbot/eval/TaperedScore.hpp>
#include <libchess/board/BitboardIndex.hpp>
#include <libchess/pieces/PieceTypes.hpp>
#include <span>
#include <string>
#include <string_view>
#include <utility>
Include dependency graph for Weights.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  ben_bot::eval::TermInfo
struct  ben_bot::eval::Weights

Namespaces

namespace  ben_bot
namespace  ben_bot::eval
namespace  ben_bot::eval::detail

Enumerations

enum class  ben_bot::eval::Method : std::uint8_t { ben_bot::eval::Method::Linear }
enum class  ben_bot::eval::Term : std::uint8_t {
  ben_bot::eval::Term::Material , ben_bot::eval::Term::Pst , ben_bot::eval::Term::PassedPawn , ben_bot::eval::Term::PasserProtectedByPasser ,
  ben_bot::eval::Term::PasserProtectedByPawn , ben_bot::eval::Term::IsolatedPawn , ben_bot::eval::Term::DoubledPawn , ben_bot::eval::Term::BackwardPawn ,
  ben_bot::eval::Term::PawnChain , ben_bot::eval::Term::RookBehindPasser , ben_bot::eval::Term::KingEscortsPasser , ben_bot::eval::Term::EnemyKingBlocksPasser ,
  ben_bot::eval::Term::RookHalfOpenFile , ben_bot::eval::Term::RookOpenFile , ben_bot::eval::Term::ConnectedRooksOpenFile , ben_bot::eval::Term::KingHalfOpenFile ,
  ben_bot::eval::Term::KingOpenLine , ben_bot::eval::Term::KingStranded , ben_bot::eval::Term::KnightTropism , ben_bot::eval::Term::QueenTropism ,
  ben_bot::eval::Term::KnightMobility , ben_bot::eval::Term::BishopMobility , ben_bot::eval::Term::RookMobility , ben_bot::eval::Term::QueenMobility ,
  ben_bot::eval::Term::KingAreaControl , ben_bot::eval::Term::CenterControl , ben_bot::eval::Term::Space , ben_bot::eval::Term::PawnThreat ,
  ben_bot::eval::Term::MinorOnRook , ben_bot::eval::Term::MinorOnQueen , ben_bot::eval::Term::RookOnQueen , ben_bot::eval::Term::Hanging ,
  ben_bot::eval::Term::PushThreat , ben_bot::eval::Term::LastPiece , ben_bot::eval::Term::MopUpEdge , ben_bot::eval::Term::MopUpKingDistance
}

Functions

consteval auto ben_bot::eval::detail::compute_term_offsets () -> std::array< size_t, NUM_TERMS+1uz >
constexpr auto ben_bot::eval::count_of (const Term term) noexcept -> size_t
constexpr auto ben_bot::eval::offset_of (const Term term) noexcept -> size_t

Variables

constexpr auto ben_bot::eval::NUM_TERMS = TERMS.size()
constexpr auto ben_bot::eval::NUM_WEIGHTS = detail::TERM_OFFSETS.back()
constexpr auto ben_bot::eval::detail::TERM_OFFSETS = compute_term_offsets()
constexpr std::array ben_bot::eval::TERMS

Detailed Description

This file defines the eval weights and the registry of eval terms.

Definition in file Weights.hpp.