public static bool GameOver(GameBoardState s) { if (s.getCheckersOnTarget(White) == 15 || (s.getCheckersOnTarget(Black) == 15)) { return(true); } return(false); }
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) }; }
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); }