Package com.jacobpatterson.csci446.program1.core

Examples of com.jacobpatterson.csci446.program1.core.CellTest


        case 1 :
          agents[BLACK] = new RandomAgent(konaneGame);
          agents[WHITE] = new RandomAgent(konaneGame);
          break;
        case 2 :
          agents[WHITE] = new AlphabetaAgent(konaneGame, 4);
          agents[BLACK] = new AlphabetaAgent(konaneGame, 4);
          break;
        case 3 :
          agents[WHITE] = new AlphabetaAgent(konaneGame, 4);
          agents[BLACK] = new MinimaxAgent(konaneGame, 4);
          break;
        case 4 :
          agents[BLACK] = new MinimaxAgent(konaneGame, 2);
          agents[WHITE] = new AlphabetaAgent(konaneGame, 6);
          break;
        case 5 :
          agents[BLACK] = new AlphabetaAgent(konaneGame, 6);
          agents[WHITE] = new MinimaxAgent(konaneGame, 2);
          break;
        case 6 :
          agents[BLACK] = new RandomAgent(konaneGame);
          agents[WHITE] = new AlphabetaAgent(konaneGame, 6);
          break;
      }
      this.play(agents, numGames, writer);
    }
    writer.close();
View Full Code Here


  /**
   * Plays the current recording.
   */
  public void replayRecording()
  {
    KonaneGamePlayer players = new KonaneGamePlayer(konaneGame,
        this.getMovesToPlay());
    players.replayGame();
  }
View Full Code Here

    this.agents = new Agent[2];

    konaneGameRecorder = new KonaneGameRecorder();
    konaneGame = new KonaneGame(dimension, konaneGameRecorder);
    konaneCanvas = new KonaneCanvas(konaneGame);
    konaneUI = new KonaneUI(konaneGame, konaneCanvas);
    konaneCanvas.addMouseListener(konaneUI);
    KonaneMenu konaneMenu = new KonaneMenu(konaneGame, konaneGameRecorder);
    for(int i = 0; i < konaneMenu.getMenuCount(); i++)
    {
      JMenu menu = konaneMenu.getMenu(i);
View Full Code Here

    this.setResizable(false);
   
    blackSearchDepth = 4;
    whiteSearchDepth = 2;
    agents[KonanePiece.WHITE.ordinal()]
        = new MinimaxAgent(konaneGame, whiteSearchDepth);
    agentMoveTimerDelay = 500;
    this.agentMoveTimer = new Timer(agentMoveTimerDelay, this);
    agentMoveTimer.setRepeats(false);
  }
View Full Code Here

        // TODO: Duplicate-ish switch code:
        switch(konaneGame.getBlackPlayerType())
        {
          case MINIMAX :
            agents[KonanePiece.BLACK.ordinal()]
                = new MinimaxAgent(konaneGame, blackSearchDepth);
            break;
          case ALPHA_BETA :
            agents[KonanePiece.BLACK.ordinal()]
                = new AlphabetaAgent(konaneGame, blackSearchDepth);
            break;
          case RANDOM :
            agents[KonanePiece.BLACK.ordinal()]
                = new RandomAgent(konaneGame);
            break;
        }
        switch(konaneGame.getWhitePlayerType())
        {
          case MINIMAX :
            agents[KonanePiece.WHITE.ordinal()]
                = new MinimaxAgent(konaneGame, whiteSearchDepth);
            break;
          case ALPHA_BETA :
            agents[KonanePiece.WHITE.ordinal()]
                = new AlphabetaAgent(konaneGame, whiteSearchDepth);
            break;
View Full Code Here

    {
      Agent[] agents = new Agent[2];
      switch(i)
      {
        case 0 :
          agents[BLACK] = new MinimaxAgent(konaneGame,2);
          agents[WHITE] = new MinimaxAgent(konaneGame, 2);
          break;
        case 1 :
          agents[BLACK] = new RandomAgent(konaneGame);
          agents[WHITE] = new RandomAgent(konaneGame);
          break;
        case 2 :
          agents[WHITE] = new AlphabetaAgent(konaneGame, 4);
          agents[BLACK] = new AlphabetaAgent(konaneGame, 4);
          break;
        case 3 :
          agents[WHITE] = new AlphabetaAgent(konaneGame, 4);
          agents[BLACK] = new MinimaxAgent(konaneGame, 4);
          break;
        case 4 :
          agents[BLACK] = new MinimaxAgent(konaneGame, 2);
          agents[WHITE] = new AlphabetaAgent(konaneGame, 6);
          break;
        case 5 :
          agents[BLACK] = new AlphabetaAgent(konaneGame, 6);
          agents[WHITE] = new MinimaxAgent(konaneGame, 2);
          break;
        case 6 :
          agents[BLACK] = new RandomAgent(konaneGame);
          agents[WHITE] = new AlphabetaAgent(konaneGame, 6);
          break;
View Full Code Here

            agents[KonanePiece.BLACK.ordinal()]
                = new AlphabetaAgent(konaneGame, blackSearchDepth);
            break;
          case RANDOM :
            agents[KonanePiece.BLACK.ordinal()]
                = new RandomAgent(konaneGame);
            break;
        }
        switch(konaneGame.getWhitePlayerType())
        {
          case MINIMAX :
            agents[KonanePiece.WHITE.ordinal()]
                = new MinimaxAgent(konaneGame, whiteSearchDepth);
            break;
          case ALPHA_BETA :
            agents[KonanePiece.WHITE.ordinal()]
                = new AlphabetaAgent(konaneGame, whiteSearchDepth);
            break;
          case RANDOM :
            agents[KonanePiece.WHITE.ordinal()]
                = new RandomAgent(konaneGame);
            break;
        }
        this.makeFirstMove();
        break;
      case MOVE_MADE :
View Full Code Here

        case 0 :
          agents[BLACK] = new MinimaxAgent(konaneGame,2);
          agents[WHITE] = new MinimaxAgent(konaneGame, 2);
          break;
        case 1 :
          agents[BLACK] = new RandomAgent(konaneGame);
          agents[WHITE] = new RandomAgent(konaneGame);
          break;
        case 2 :
          agents[WHITE] = new AlphabetaAgent(konaneGame, 4);
          agents[BLACK] = new AlphabetaAgent(konaneGame, 4);
          break;
        case 3 :
          agents[WHITE] = new AlphabetaAgent(konaneGame, 4);
          agents[BLACK] = new MinimaxAgent(konaneGame, 4);
          break;
        case 4 :
          agents[BLACK] = new MinimaxAgent(konaneGame, 2);
          agents[WHITE] = new AlphabetaAgent(konaneGame, 6);
          break;
        case 5 :
          agents[BLACK] = new AlphabetaAgent(konaneGame, 6);
          agents[WHITE] = new MinimaxAgent(konaneGame, 2);
          break;
        case 6 :
          agents[BLACK] = new RandomAgent(konaneGame);
          agents[WHITE] = new AlphabetaAgent(konaneGame, 6);
          break;
      }
      this.play(agents, numGames, writer);
    }
View Full Code Here

TOP

Related Classes of com.jacobpatterson.csci446.program1.core.CellTest

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.