private static void Main() { AppDomain.CurrentDomain.UnhandledException += OnUnhandledException; HashTableAllocator.Allocate(); MagicBitboards.InitWithInternalKeys(); StaticExchangeEvaluation.Init(); new InteractiveConsole().Run(); }
private static void Main(string[] args) { AppDomain.CurrentDomain.UnhandledException += OnUnhandledException; HashTableAllocator.Allocate(); MagicBitboards.InitWithInternalKeys(); StaticExchangeEvaluation.Init(); PieceSquareTablesData.BuildPieceSquareTables(); var silentMode = args.Contains("silent"); new InteractiveConsole().Run(silentMode); }
public void Run(params string[] parameters) { var key = parameters[1]; var value = parameters[3]; if (_optionExecutors.ContainsKey(key)) { _optionExecutors[key](value); // Value of material has changed, SEE table needs to be recalculated if (key.EndsWith("Value")) { StaticExchangeEvaluation.Init(); } } else { _uciClient.SendError("badoption"); } }
public StaticExchangeEvaluationTests() { StaticExchangeEvaluation.Init(); PieceSquareTablesData.BuildPieceSquareTables(); }
[InlineData(Piece.Knight, Piece.Knight, (1 << SeePiece.Knight1) | (1 << SeePiece.Knight2), (1 << SeePiece.Pawn), 100)] // 8/8/2n5/5n2/3N4/2P5/8/8 w - - 0 1 public void StaticExchangeEvaluation_NormalValues(int attackingPiece, int capturedPiece, int attacker, int defender, int expectedScore) { var score = StaticExchangeEvaluation.Evaluate(attackingPiece, capturedPiece, attacker, defender); Assert.Equal(expectedScore, score); }
public StaticExchangeEvaluationTests() { StaticExchangeEvaluation.Init(); }