Beispiel #1
0
        public override void AddEvaluations()
        {
            base.AddEvaluations();

            //	Outpost Evaluations
            if ((Knight != null && Knight.Enabled) ||
                (Bishop != null && Bishop.Enabled))
            {
                OutpostEval = new OutpostEvaluation();
                if (Knight != null && Knight.Enabled)
                {
                    OutpostEval.AddOutpostBonus(Knight);
                }
                if (Bishop != null && Bishop.Enabled)
                {
                    OutpostEval.AddOutpostBonus(Bishop, 10, 2, 5, 5);
                }
                AddEvaluation(OutpostEval);
            }

            //	Rook-type Evaluations (rook-mover on open file
            //	and rook-mover on 7th ranks with enemy king on 8th)
            if ((Rook != null && Rook.Enabled) ||
                (Queen != null && Queen.Enabled))
            {
                RookTypeEval = new RookTypeEvaluation();
                if (Rook != null && Rook.Enabled)
                {
                    RookTypeEval.AddOpenFileBonus(Rook);
                }
            }
        }
Beispiel #2
0
        public override void AddEvaluations()
        {
            base.AddEvaluations();
            RookTypeEvaluation eval = new RookTypeEvaluation();

            eval.AddOpenFileBonus(Rook);
            eval.AddRookOn7thBonus(Rook, King);
            AddEvaluation(eval);

            OutpostEvaluation outpost = new OutpostEvaluation();

            outpost.AddOutpostBonus(Knight);
            outpost.AddOutpostBonus(Bishop, 10, 2, 5, 5);
            AddEvaluation(outpost);
        }
Beispiel #3
0
        public override void AddEvaluations()
        {
            base.AddEvaluations();

            //	Outpost Evaluations
            if ((Knight != null && Knight.Enabled) ||
                (Bishop != null && Bishop.Enabled))
            {
                OutpostEval = new OutpostEvaluation();
                if (Knight != null && Knight.Enabled)
                {
                    OutpostEval.AddOutpostBonus(Knight);
                }
                if (Bishop != null && Bishop.Enabled)
                {
                    OutpostEval.AddOutpostBonus(Bishop, 10, 2, 5, 5);
                }
                AddEvaluation(OutpostEval);
            }

            //	Rook-type Evaluations (rook-mover on open file
            //	and rook-mover on 7th ranks with enemy king on 8th)

            //	Do we have a royal king?
            CheckmateRule rule      = (CheckmateRule)FindRule(typeof(CheckmateRule));
            bool          royalKing = rule != null && King != null && King.Enabled && rule.RoyalPieceType == King;

            if ((Rook != null && Rook.Enabled) ||
                (Queen != null && Queen.Enabled && royalKing))
            {
                RookTypeEval = new RookTypeEvaluation();
                if (Rook != null && Rook.Enabled)
                {
                    RookTypeEval.AddOpenFileBonus(Rook);
                    if (royalKing)
                    {
                        RookTypeEval.AddRookOn7thBonus(Rook, King);
                    }
                }
                if (Queen != null && Queen.Enabled && royalKing)
                {
                    RookTypeEval.AddRookOn7thBonus(Queen, King, 2, 8);
                }
                AddEvaluation(RookTypeEval);
            }
        }