heuristicas começando a implementar ...
[xYpjg3TdSw.git] / MinimaxEnemy.h
blob8829eec97214f752c1cfbb0c787c9e46ae1ea022
1 #ifndef __MINIMAX_ENEMY_H__
2 #define __MINIMAX_ENEMY_H__
4 #include "Enemy.h"
5 #include "Board.h"
7 #include <ctime>
8 #include <cstdlib>
9 //#include <iostream>
10 //using namespace std;
12 #include <cfloat>
13 #define HeuTypeMax DBL_MAX
15 class MinimaxEnemy: public Enemy
17 public:
18 typedef double HeuType;
19 MinimaxEnemy(bool player, int minimaxDepth): Enemy(player, minimaxDepth), _game_boards(board_compare) {}
20 void move(Board *board, int& fromX, int& fromY, int& toX, int& toY);
21 HeuType alphabeta(Board board, int depth, HeuType alpha, HeuType beta, int player);
22 virtual
23 HeuType heuristica(Board board, bool player);
24 HeuType centro(Board board, bool player);
25 HeuType concentration(Board board, bool player);
26 HeuType centralisation(Board board, bool player);
27 HeuType masscenter(Board board, bool player);
28 HeuType quads(Board board, bool player);
29 virtual void undo(Board *board) {
30 _game_boards.erase(board->to_comp());
32 for(Board::Set::iterator i = _game_boards.begin(); i != _game_boards.end(); ++i) {
33 cout << i->first << ' ' << i->second << endl;
35 cout << endl;//*/
37 protected:
38 int _choice;
39 Board::Set _game_boards;
42 #endif