Minimax.h 926 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. #ifndef CHESSY_MINIMAX_H
  2. #define CHESSY_MINIMAX_H
  3. #include <iostream>
  4. #include <utility>
  5. #include "MoveGeneration.h"
  6. #include "Evaluate.h"
  7. namespace chessy
  8. {
  9. using MoveValue = float;
  10. /*!
  11. * \brief conducts a performance test iterating through all positions
  12. * up to a specified depth.
  13. *
  14. * \param out the stream to write info to
  15. * \param chessGame the game to iterate through the positions
  16. * \param depth how deep to search (in halfmoves)
  17. *
  18. * \return the number of nodes visited
  19. */
  20. size_t perft(std::ostream& out, ChessGame& chessGame, int depth);
  21. std::pair<Move, MoveValue> miniMax(ChessGame& chessGame, int depth);
  22. MoveValue negamaxImplementation(ChessGame& cg, int depth,
  23. MoveValue alpha, MoveValue beta);
  24. MoveValue quiescence(ChessGame& cg, int maxDepth,
  25. MoveValue alpha, MoveValue beta);
  26. }
  27. #endif // CHESSY_MIrIMAX_H