Пример #1
0
        static public double Score(MaxMinBitField f)
        {
            double myGhostTypeScore    = f.countMyGood() * 0.8 + f.getEnemyEvil() * 0.2;
            double enemyGhostTypeScore = f.getEnemyGood() * 0.8 + f.getEnemyEvil() * 0.2;
            double myManhattanScore    = f.myGoodManhattanScore() * 0.6 + f.myEvilManhattanScore() * 0.4;
            double enemyManhattanScore = f.enemyManhattanScoreAllColor();

            double myScore    = myGhostTypeScore * 1000 - myManhattanScore;
            double enemyScore = enemyGhostTypeScore * 1000 - enemyManhattanScore;

            double s = myScore / (myScore + enemyScore);

            //            Debug.WriteLine(f + "Score:" + s);
            return(s);
        }