Adjust weights

This commit is contained in:
Trevor Slocum 2023-12-09 01:44:35 -08:00
parent bbec0a941e
commit 959d43321c
2 changed files with 7 additions and 4 deletions

View file

@ -9,8 +9,8 @@ import (
const queueBufferSize = 4096000
var (
WeightBlot = 1.1
WeightHit = -0.9
WeightBlot = 1.05
WeightHit = -1.0
WeightOppScore = -1.5
)
@ -87,6 +87,9 @@ func (a *Analysis) _analyze() {
}
a.Board = a.Board.Move(move[0], move[1], a.player).UseRoll(move[0], move[1], a.player)
}
if !a.Past {
a.Past = a.Board.Past()
}
a.Board.evaluate(a.player, hs, a)
if a.player == 1 && !a.Past {

View file

@ -345,7 +345,7 @@ func (b Board) Blots(player int) int {
if checkers != 1 {
continue
}
pips += int(checkers) * PseudoPips(o, space)
pips += checkers * PseudoPips(o, space)
}
return pips
}
@ -466,7 +466,7 @@ func spaceValue(player int, space int) int {
func PseudoPips(player int, space int) int {
v := 6 + spaceValue(player, space) + int(math.Exp(float64(spaceValue(player, space))*0.2))*2
if (player == 1 && (space > 6 || space == SpaceBarPlayer)) || (player == 2 && (space < 19 || space == SpaceBarOpponent)) {
v += 36
v += 24
}
return v
}