-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcomputer5.h
More file actions
38 lines (32 loc) · 884 Bytes
/
computer5.h
File metadata and controls
38 lines (32 loc) · 884 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
//
// computer5.hpp
// PawnPusher9000
//
// Created by Lavi on 2015-12-02.
// Copyright © 2015 Lavi. All rights reserved.
//
#ifndef computer5_hpp
#define computer5_hpp
#include "computer.h"
#include <stack>
class ComputerAI_5: public ComputerAI{
const int MAX_EVAL;
ChessPosition cp;
int bestMove;
public:
ComputerAI_5(ChessGame & cg):ComputerAI(cg),MAX_EVAL(20000),cp(cg.getCurrentPosition()){
}
~ComputerAI_5(){}
void makeMove();
float evaluatePosition(int ply, float alpha=-11000, float beta=11000);
float evaluatePosition();
static float pieceValue(char c);
float positionalBonus(char piece, int sqr, bool endGame);
int kingCageSize(Colour);
};
struct choicePriority{
const ChessPosition &cp;
choicePriority(ChessPosition & _cp):cp(_cp){}
bool operator() (int move1,int move2);
};
#endif /* computer5_hpp */