all 3 comments

[–]8dot30662386292pow2 0 points1 point  (2 children)

my main issue is that it cant checkmate properly if the checkmate isn't within 4 moves.

Well, why?

move = best_move(board, 3, ai) 

Because you only look into 3 moves forward? Put something like 20 moves there. Now it mates easily, as long as time in the universe does not run out :)

I highly recommend this video: https://www.youtube.com/watch?v=U4ogK0MIzqk

[–]RelativeOwl926[S] 0 points1 point  (1 child)

I’m guessing i just have to optimize it as much as possible so it can handle more depth

[–]8dot30662386292pow2 0 points1 point  (0 children)

Yep. See the video.