Evaluate every legal column from the current position and print one line per column: the column index and the perfect-play score that results from playing it.
Evaluate every legal column from the current position and print one line per column: the column index and the perfect-play score that results from playing it. Equivalent to what an analysis UI would do to surface candidate moves to a human.
#include <iostream>
std::cout << "col " << col << " -> " << scores[col] << '\n';
}
}
return 0;
}
Connect-4 search engine that operates on BitBully::Board.
Perfect-play Connect-4 solver.
auto scoreMoves(const Board &b, const int maxDepth=-1)
Evaluate every column move from b.
Connect-4 position represented as a pair of 64-bit bitboards.
bool isLegalMove(int column) const
Check whether dropping a stone in column is legal.
bool play(int column)
Drop a stone of the player to move into column.
static constexpr int N_COLUMNS
Number of columns in a Connect-4 grid.
int main(const int argc, const char *const argv[])
Entry point of the benchmark binary.