UNPKG

ai-for-shogi-like-games

Version:

javascript library of A.I. algorithms for Shogi-like games

24 lines (19 loc) 1.03 kB
'use strict'; var _boardLib = require('./board-lib.js'); var _evalModel = require('./eval-model.js'); var _pieceSet = require('./piece-set.js'); var model000 = function () { var pieceValues = new Map(); pieceValues.set(_pieceSet.Chick, 1); pieceValues.set(_pieceSet.Hen, 5); pieceValues.set(_pieceSet.Elephant, 4); pieceValues.set(_pieceSet.Giraffe, 8); var offBoardMul = 0.75; // wish to penalize off-board pieces but not too much as they can be dropped practically anywhere on the board var bonusForEachPossibleMove = 1; var malusForEachPossibleMoveOfTheOpponent = -1; var royalDistanceFromPromotionZoneBonus = [100, 50, 10]; var multipliersForDistFromPromotionZone = [0.9, 0.5, 0.1]; return new _evalModel.EvaluationModel(pieceValues, royalDistanceFromPromotionZoneBonus, multipliersForDistFromPromotionZone, offBoardMul, bonusForEachPossibleMove, malusForEachPossibleMoveOfTheOpponent, 40, -50); }(); exports.model000 = model000; //# sourceMappingURL=eval-model-library.js.map