Beispiel #1
0
 public static bool GameOver(GameBoardState s)
 {
     if (s.getCheckersOnTarget(White) == 15 || (s.getCheckersOnTarget(Black) == 15))
     {
         return(true);
     }
     return(false);
 }
Beispiel #2
0
 private static void UpdateF(GameBoardState st)
 {
     F = new int[8] {
         -st.getCheckersOnBar(White),
         st.getCheckersOnBar(Black),
         st.getCheckersOnTarget(White),
         -st.getCheckersOnTarget(Black),
         -st.capturableCheckers(White),
         st.capturableCheckers(Black),
         -st.pip(White),
         st.pip(Black)
     };
 }
Beispiel #3
0
        private static double DifferenceFunction(GameBoardState st, GameBoardState st1)
        {
            double v = ValueFunction(st);

            if (!GameOver(st))
            {
                return(ValueFunction(st1) - v);
            }
            double z = (st.getCheckersOnTarget(White) == 15) ? 1 : 0;

            return(z - v);
        }