src/demo/TicTacToe.java
private void playGames() throws MatrixException, NeuralNetworkException, DynamicParamException, AgentException {
        initWindow();
        jFrame.revalidate();

        int numberOfGames = 500000000;

        for (int game = 0; game < numberOfGames; game++) {
            playGame();
            if (game % 250 == 0 && game > 0) {
                System.out.print("Game #" + game);
                for (int playerIndex = 0; playerIndex < currentPlayerList.size(); playerIndex++) {
                    Player player = currentPlayerList.get(playerIndex);
                    System.out.print(" Player #" + playerIndex + " (won: " + player.getWonCountCyclic() + ", lost: " + player.getLostCountCyclic() + ", draw: " + player.getDrawCountCyclic() + ")");
                }
                System.out.println();
                for (Player player : playerList) player.resetCyclicalCounts();
            }
        }
        for (int playerIndex = 0; playerIndex < currentPlayerList.size(); playerIndex++) {
            Player player = currentPlayerList.get(playerIndex);
            System.out.println("Player#" + playerIndex + " won games: " + player.getWonCount());
            System.out.println("Player#" + playerIndex + " lost games: " + player.getLostCount());
            System.out.println("Player#" + playerIndex + "1 draw games: " + player.getDrawCount());
            player.getAgent().stop();
        }
    }
/**
     * Plays given number of games.
     *
     * @throws MatrixException throws exception if matrix operation fails.
     * @throws NeuralNetworkException throws exception if neural network operation fails.
     * @throws DynamicParamException throws exception if parameter (params) setting fails.
     */
Plays given number of games.
@throws MatrixException throws exception if matrix operation fails.
@throws NeuralNetworkException throws exception if neural network operation fails.
@throws DynamicParamException throws exception if parameter (params) setting fails.
Plays given number of games . @throws MatrixException throws exception if matrix operation fails . @throws NeuralNetworkException throws exception if neural network operation fails . @throws DynamicParamException throws exception if parameter ( params ) setting fails .
private void playGames() throws MatrixException, NeuralNetworkException, DynamicParamException, AgentException {
        initWindow();
        jFrame.revalidate();
        int numberOfGames = 500000000;
        for (int game = 0; game < numberOfGames; game++) {
            playGame();
            if (game % 250 == 0 && game > 0) {
                System.out.print("Game #" + game);
                for (int playerIndex = 0; playerIndex < currentPlayerList.size(); playerIndex++) {
                    Player player = currentPlayerList.get(playerIndex);
                    System.out.print(" Player #" + playerIndex + " (won: " + player.getWonCountCyclic() + ", lost: " + player.getLostCountCyclic() + ", draw: " + player.getDrawCountCyclic() + ")");
                }
                System.out.println();
                for (Player player : playerList) player.resetCyclicalCounts();
            }
        }
        for (int playerIndex = 0; playerIndex < currentPlayerList.size(); playerIndex++) {
            Player player = currentPlayerList.get(playerIndex);
            System.out.println("Player#" + playerIndex + " won games: " + player.getWonCount());
            System.out.println("Player#" + playerIndex + " lost games: " + player.getLostCount());
            System.out.println("Player#" + playerIndex + "1 draw games: " + player.getDrawCount());
            player.getAgent().stop();
        }
    }
private void playGames ( ) throws MatrixException , NeuralNetworkException , DynamicParamException , AgentException { initWindow ( ) ; jFrame . revalidate ( ) ; int numberOfGames = 500000000 ; for ( int game = 0 ; game < numberOfGames ; game ++ ) { playGame ( ) ; if ( game % 250 == 0 && game > 0 ) { System . out . print ( "Game #" + game ) ; for ( int playerIndex = 0 ; playerIndex < currentPlayerList . size ( ) ; playerIndex ++ ) { Player player = currentPlayerList . get ( playerIndex ) ; System . out . print ( " Player #" + playerIndex + " (won: " + player . getWonCountCyclic ( ) + ", lost: " + player . getLostCountCyclic ( ) + ", draw: " + player . getDrawCountCyclic ( ) + ")" ) ; } System . out . println ( ) ; for ( Player player : playerList ) player . resetCyclicalCounts ( ) ; } } for ( int playerIndex = 0 ; playerIndex < currentPlayerList . size ( ) ; playerIndex ++ ) { Player player = currentPlayerList . get ( playerIndex ) ; System . out . println ( "Player#" + playerIndex + " won games: " + player . getWonCount ( ) ) ; System . out . println ( "Player#" + playerIndex + " lost games: " + player . getLostCount ( ) ) ; System . out . println ( "Player#" + playerIndex + "1 draw games: " + player . getDrawCount ( ) ) ; player . getAgent ( ) . stop ( ) ; } }
Plays given number of games.
Plays given number of games .