Run it
Copy the script and paste it into your executor.
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local PlayMove = ReplicatedStorage:WaitForChild("ChessRemotes"):WaitForChild("Action")
local Engine = require(ReplicatedStorage.Chess.Engine)
local Bot = require(ReplicatedStorage.Chess.Bot)
local Current = filtergc("function", { Name = "current" })
assert(Current[1](), "no active game")
local State = Current[1]().state
local WKing, BKing = 5, 61
for I = 1, 64 do
if State.board[I] == 6 then
WKing = I
elseif State.board[I] == -6 then
BKing = I
end
end
local Game = {
board = table.clone(State.board),
turn = State.turn,
castle = table.clone(State.castle),
ep = State.ep,
half = State.half,
full = State.full,
kings = {
[] = WKing,
[-] = BKing,
},
}
_, BestMove = Bot.(Game, , )
BestMove
PlayMove:(, {
from = BestMove.from,
to = BestMove.to,
promo = BestMove.promo ,
})
Plays the best bot move at "titanic" level