From a80fc9482dd396347cea21cbfebc6bc07fe95876 Mon Sep 17 00:00:00 2001 From: Karma Riuk Date: Fri, 7 Feb 2025 10:46:01 +0100 Subject: [PATCH] base for testing optimization --- cpp/Makefile | 1 + cpp/src/controller/ai_vs_ai.cpp | 2 ++ cpp/src/main.cpp | 8 ++++---- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/cpp/Makefile b/cpp/Makefile index a2ea4a9..bed1da6 100644 --- a/cpp/Makefile +++ b/cpp/Makefile @@ -1,4 +1,5 @@ CXXFLAGS += -O3 -Wall +CXXFLAGS += -pg # Add .d to Make's recognized suffixes. SUFFIXES += .d diff --git a/cpp/src/controller/ai_vs_ai.cpp b/cpp/src/controller/ai_vs_ai.cpp index c5c9472..1beab9f 100644 --- a/cpp/src/controller/ai_vs_ai.cpp +++ b/cpp/src/controller/ai_vs_ai.cpp @@ -24,6 +24,8 @@ void AIvsAIController::start() { void AIvsAIController::make_move(Move move) { board = board.make_move(move); + std::cout << "Made move: " << move << std::endl; + exit(0); view.update_board(board, -1, {}); Colour current_colour = board.white_to_play ? White : Black; diff --git a/cpp/src/main.cpp b/cpp/src/main.cpp index b64271d..468eef0 100644 --- a/cpp/src/main.cpp +++ b/cpp/src/main.cpp @@ -12,11 +12,11 @@ int main(int argc, char* argv[]) { // std::string pos = // "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1"; - std::string pos = - "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"; + // "r3k2r/p1ppqpb1/bn2pnp1/3PN3/1p2P3/2N2Q1p/PPPBBPPP/R3K2R w KQkq - 4 3 + // "; + std::string pos = + "r3k2r/p1ppqpb1/Bn2pnp1/3PN3/1p2P3/2N2Q1p/PPPB1PPP/R3K2R b KQkq - 0 3"; Board b = Board::setup_fen_position(pos);