eval

package
v1.50.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 23, 2022 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	QueenSideBB = FileAMask | FileBMask | FileCMask | FileDMask
	KingSideBB  = FileEMask | FileFMask | FileGMask | FileHMask
)

Variables

This section is empty.

Functions

func Abs

func Abs(v int) int

func Backmost

func Backmost(colour int, bb uint64) int

func BoolToInt

func BoolToInt(v bool) int

func OnlyOne

func OnlyOne(bb uint64) bool

func RelativeRankOf

func RelativeRankOf(colour, sq int) int

func RelativeSquare

func RelativeSquare(colour, sq int) int

func Several

func Several(bb uint64) bool

Types

type EvaluationService

type EvaluationService struct {
	Tuning bool
	Weights
	// contains filtered or unexported fields
}

Weiss 2.0 eval. CCRL 40/15 3220 ELO. From here: https://github.com/TerjeKir/weiss

func NewEvaluationService

func NewEvaluationService() *EvaluationService

func (*EvaluationService) EnableTuning

func (e *EvaluationService) EnableTuning() *EvaluationService

func (*EvaluationService) Evaluate

func (e *EvaluationService) Evaluate(p *Position) int

type Score

type Score int32

func S

func S(middle, end int) Score

func (Score) End

func (s Score) End() int

func (*Score) MarshalJSON

func (s *Score) MarshalJSON() ([]byte, error)

func (Score) Middle

func (s Score) Middle() int

func (Score) String

func (s Score) String() string

type Weights

type Weights struct {
	PawnValue         Score
	KnightValue       Score
	BishopValue       Score
	RookValue         Score
	QueenValue        Score
	BishopPair        Score
	KnightMobility    [9]Score
	BishopMobility    [14]Score
	RookMobility      [15]Score
	QueenMobility     [28]Score
	PawnDoubled       Score
	PawnSupport       Score
	PawnOpen          Score
	PawnPhalanx       [RANK_NB]Score
	PawnIsolated      Score
	PassedPawn        [RANK_NB]Score
	PassedDefended    [RANK_NB]Score
	PassedBlocked     [RANK_NB]Score
	PassedDistUs      [FILE_NB]Score
	PassedDistThem    Score
	PassedRookBack    Score
	KingAtkPawn       Score
	NBBehindPawn      Score
	RookFile          [2]Score
	SafetyAttackPower [PIECE_NB]int
	SafetyCheckPower  [PIECE_NB]int
	KingLineDanger    [28]Score
	ThreatByPawn      Score
	ThreatByPawnPush  Score
	PSQT              [COLOUR_NB][PIECE_NB][64]Score `json:"-"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL