クラス DepthFirstAIPlayer

java.lang.Object
xyz.hotchpotch.reversi.players.DepthFirstAIPlayer
すべての実装されたインタフェース:
Player

public class DepthFirstAIPlayer extends Object
深さ優先探索により必勝手を探す Player の実装です。
  • フィールドの概要

    フィールド
    修飾子とタイプ
    フィールド
    説明
    protected final Player
    思考処理を委譲するプロキシプレーヤー
  • コンストラクタの概要

    コンストラクタ
    コンストラクタ
    説明
     
  • メソッドの概要

    修飾子とタイプ
    メソッド
    説明
    decide(Board board, Color color, long remainingMillis)
    この手番における自身の手(石を置く場所)を返します。
    protected Point
    decide2(Board board, Color color, List<Point> availables, Instant timelimit)
    この手番における自身の手(石を置く場所)を返します。
    protected Instant
    timelimit(Board board, long remainingMillis)
    今回の手に費やせる時間を計算し、思考処理を打ち切るべき制限時刻を返します。

    クラスから継承されたメソッド java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • フィールド詳細

    • proxy

      protected final Player proxy
      思考処理を委譲するプロキシプレーヤー
  • コンストラクタの詳細

    • DepthFirstAIPlayer

      public DepthFirstAIPlayer()
  • メソッドの詳細

    • timelimit

      protected Instant timelimit(Board board, long remainingMillis)
      今回の手に費やせる時間を計算し、思考処理を打ち切るべき制限時刻を返します。
      パラメータ:
      board - 現在のリバーシ盤
      remainingMillis - 残り持ち時間(ミリ秒)
      戻り値:
      思考処理を打ち切るべき制限時刻
    • decide2

      protected Point decide2(Board board, Color color, List<Point> availables, Instant timelimit)
      この手番における自身の手(石を置く場所)を返します。

      この実装は、深さ優先探索により必勝手を探します。
      パラメータ:
      board - 現在のリバーシ盤
      color - このプレーヤーの色
      availables - このプレーヤーの石を置ける場所
      timelimit - 今回の手番の思考を打ち切る制限時刻
      戻り値:
      石を置く場所
    • decide

      public Point decide(Board board, Color color, long remainingMillis)
      インタフェースからコピーされた説明: Player
      この手番における自身の手(石を置く場所)を返します。 パスの場合は null を返す必要があります。
      定義:
      decide インタフェース内 Player
      パラメータ:
      board - 現在のリバーシ盤
      color - このプレーヤーの色
      remainingMillis - 残り持ち時間(ミリ秒)
      戻り値:
      石を置く場所(パスの場合は null