BenBot 1.7.5
A chess engine
Loading...
Searching...
No Matches
ben_bot::eval Namespace Reference

Namespaces

namespace  detail
namespace  phase_weights
namespace  piece_values

Classes

struct  CoeffTracer
struct  Move
struct  NullTracer
struct  Position
struct  Score
struct  TaperedScore
struct  TermInfo
struct  Weights

Typedefs

using PieceType = chess::pieces::Type
using Value = std::int16_t

Enumerations

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

Functions

constexpr auto count_of (const Term term) noexcept -> size_t
auto evaluate (const Position &position, PawnTable *pawnTable=nullptr) -> Score
auto evaluate_traced (const Position &position) -> CoeffTracer
constexpr auto offset_of (const Term term) noexcept -> size_t
constexpr auto score_material (const Position &position) noexcept -> Value
auto see (const Position &position, Move move) -> int

Variables

constexpr Weights DEFAULT_WEIGHTS
constexpr Value DRAW { UINT16_C(0) }
constexpr Value MATE { MAX / UINT16_C(2) }
constexpr Value MAX { std::numeric_limits<Value>::max() - UINT16_C(5) }
constexpr std::int32_t MAX_PHASE = (phase_weights::QUEEN + (phase_weights::ROOK * 2) + (phase_weights::BISHOP * 2) + (phase_weights::KNIGHT * 2)) * 2
constexpr auto NUM_TERMS = TERMS.size()
constexpr auto NUM_WEIGHTS = detail::TERM_OFFSETS.back()
constexpr std::array TERMS

Detailed Description

This namespace contains functions for evaluating positions.

Typedef Documentation

◆ PieceType

Definition at line 31 of file Material.hpp.

Enumeration Type Documentation

◆ Color

enum class chess::pieces::Color : std::uint_fast8_t
strong

This enum identifies the side to move.

Definition at line 29 of file Colors.hpp.