Coming Soon
Game play area will be implemented here
Uses a Minimax AI with Alpha-Beta pruning, heuristic pattern evaluation (open fours / threes), and candidate move restriction around existing stones for efficient search.
function getCandidates(board) {
const RANGE = 2;
const candidates = new Set();
let hasStone = false;
for (let r = 0; r < 15; r++) {
for (let c = 0; c < 15; c++) {
if (board[r][c] === 0) continue;
hasStone = true;
for (let dr = -RANGE; dr <= RANGE; dr++) {
for (let dc = -RANGE; dc <= RANGE; dc++) {
const nr = r + dr, nc = c + dc;
if (nr >= 0 && nr < 15 && nc >= 0 && nc < 15 && board[nr][nc] === 0) {
candidates.add(`${nr},${nc}`);
}
}
}
}
}
if (!hasStone) return [[7, 7]];
return Array.from(candidates).map(key => key.split(',').map(Number));
}