minor stuff
This commit is contained in:
parent
f3e28d2646
commit
db87c2ec8b
@ -14,6 +14,7 @@ void AIvsAIController::start() {
|
|||||||
ai::AI* current_player;
|
ai::AI* current_player;
|
||||||
while (!board.is_terminal()) {
|
while (!board.is_terminal()) {
|
||||||
current_player = board.white_to_play ? &p1 : &p2;
|
current_player = board.white_to_play ? &p1 : &p2;
|
||||||
|
std::cout << typeid(*current_player).name() << " to play" << std::endl;
|
||||||
Move move = current_player->search(board);
|
Move move = current_player->search(board);
|
||||||
make_move(move);
|
make_move(move);
|
||||||
}
|
}
|
||||||
|
@ -9,6 +9,7 @@ ManualController::ManualController(Board b, View& v): Controller(b, v) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ManualController::start() {
|
void ManualController::start() {
|
||||||
|
reset_selection();
|
||||||
view.show();
|
view.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -13,18 +13,21 @@ int main(int argc, char* argv[]) {
|
|||||||
// std::string pos =
|
// std::string pos =
|
||||||
// "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1";
|
// "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1";
|
||||||
std::string pos =
|
std::string pos =
|
||||||
"r3k2r/p1ppqpb1/bn2pnp1/3PN3/1p2P3/2N2Q1p/PPPBBPPP/R3K2R w KQkq - 4 3";
|
"r3k2r/p1ppqpb1/bn2pnp1/3PN3/1p2P3/2N2Q1p/PPPBBPPP/R3K2R w KQkq - 4 3 ";
|
||||||
|
// std::string pos =
|
||||||
|
// "r1b1k2r/p1ppqpb1/1n2pnp1/3PN3/1p2P3/2N2Q1p/PPPBBPPP/"
|
||||||
|
// "R3K2R b KQkq - 3 2";
|
||||||
|
|
||||||
Board b = Board::setup_fen_position(pos);
|
Board b = Board::setup_fen_position(pos);
|
||||||
|
|
||||||
// ai::v0_random p1(true, std::chrono::milliseconds(500));
|
ai::v0_random p1(true, std::chrono::milliseconds(1000));
|
||||||
ai::v1_simple p1(false, std::chrono::milliseconds(100000));
|
// ai::v1_simple p1(false, std::chrono::milliseconds(100000));
|
||||||
// ai::v1_simple p2(false, std::chrono::milliseconds(100000));
|
ai::v1_simple p2(false, std::chrono::milliseconds(150000));
|
||||||
// ai::v0_random p2(false, std::chrono::milliseconds(10000));
|
// ai::v0_random p2(false, std::chrono::milliseconds(10000));
|
||||||
|
|
||||||
GUI gui;
|
GUI gui;
|
||||||
// AIvsAIController manual(b, gui, p1, p2);
|
AIvsAIController manual(b, gui, p1, p2);
|
||||||
HumanVsAIController manual(b, gui, p1);
|
// HumanVsAIController manual(b, gui, p2);
|
||||||
|
|
||||||
Controller& controller = manual;
|
Controller& controller = manual;
|
||||||
|
|
||||||
|
@ -102,7 +102,7 @@ static std::map<std::string, std::map<int, int>> pos2expected{
|
|||||||
|
|
||||||
// -- Position 7
|
// -- Position 7
|
||||||
{
|
{
|
||||||
"r3k2r/p1ppqpb1/bn2pnp1/3PN3/1p2P3/2N2Q1p/PPPBBPPP/R3K2R w KQkq - 0 1",
|
"r3k2r/p1ppqpb1/bn2pnp1/3PN3/1p2P3/2N2Q1p/PPPBBPPP/R3K2R w KQkq - 4 3",
|
||||||
{
|
{
|
||||||
{4, 4085603}, //
|
{4, 4085603}, //
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user