i want to create a 2 mode Go game, currently i want to have a game mode with AI using minimax or pruning Alpha-beta with javascript

The code starts as follows

This code to define the table if possible can you give me a reference to the html code. Thank you

const BLACK = 'black'
const WHITE = 'white'
const PREVIOUS = 'previous'
const L = 'l'
const O = 'o'


let previousStone

let boardState = [
    L, L, L, L, L, L, L, L, L, O, O, O, O, O, O, O, O, O,
    L, L, L, L, L, L, L, L, L, O, O, O, O, O, O, O, O, O,
    L, L, L, L, L, L, L, L, L, O, O, O, O, O, O, O, O, O,
    L, L, L, L, L, L, L, L, L, O, O, O, O, O, O, O, O, O,
    L, L, L, L, L, L, L, L, L, O, O, O, O, O, O, O, O, O,
    L, L, L, L, L, L, L, L, L, O, O, O, O, O, O, O, O, O,
    L, L, L, L, L, L, L, L, L, O, O, O, O, O, O, O, O, O,
    L, L, L, L, L, L, L, L, L, O, O, O, O, O, O, O, O, O,
    L, L, L, L, L, L, L, L, L, O, O, O, O, O, O, O, O, O,
]

I tried the code and Ai doesn’t work when running with html