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: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EvaluationService

type EvaluationService struct {
	Weights
}

func NewEvaluationService

func NewEvaluationService() *EvaluationService

func (*EvaluationService) Evaluate

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

type Score

type Score struct {
	Mg int
	Eg int
}

func (Score) String

func (s Score) String() string

type Weights

type Weights struct {
	PawnMaterial          Score
	KnightMaterial        Score
	BishopMaterial        Score
	RookMaterial          Score
	QueenMaterial         Score
	BishopPairMaterial    Score
	PawnMobility          Score
	PawnIsolated          Score
	PawnDoubled           Score
	PawnConnected         [64]Score `json:"-"`
	PawnPassed            Score
	PawnPassedCanMove     Score
	PawnPassedSafeMove    Score
	PawnPassedKingDist    Score
	PawnPassedSquare      Score
	ThreatPawn            Score
	ThreatForPawn         Score
	ThreatPiece           Score
	ThreatPieceForQueen   Score
	RookOpen              Score
	RookSemiopen          Score
	KingShelter           Score
	KingQueenTropism      Score
	KingSafetyAttackers   int
	KingSafetyWeakSquares int
	KingSafetyQueenCheck  int
	KingSafetyRookCheck   int
	KingSafetyBishopCheck int
	KingSafetyKnightCheck int
	BishopRammedPawns     Score
	MinorProtected        Score
	KnightOutpost         Score
	Tempo                 Score
	KnightMobility        [9]Score
	BishopMobility        [14]Score
	RookMobility          [15]Score
	QueenMobility         [28]Score
	PST                   [2][8][64]Score `json:"-"`
}

func (*Weights) Apply

func (w *Weights) Apply(weights []int) []int

Jump to

Keyboard shortcuts

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