I think minimax is not the best choice of algorithm for points and boxes. For the full story of this game, you really need to read the book The Points and Boxes Game: Elwyn R. Berlekamp , a complex children's game , but I here You will find a brief description.
Berlekamp makes a series of powerful observations. The first is a double-intersection strategy, which I assume you know about (described on page
Well, if there are two long chains, there will be one double cross, the game will end after six more moves (16 + 1 = 11 + 6), and the player will lose to move. But if there is only one long chain, there will be no double cross, and the game will end after five more moves (16 + 0 = 11 + 5), and the player will win to move. So how can a player move so that there is only one long chain? The only winning move sacrifices two boxes:

Minimax would have found this move, but with much more work.
The third and most powerful observation is that the dots and boxes are an impartial game : the available moves are the same no matter what the turn is to play, but in typical positions that arise during the game (i.e. those that contain long chains of boxes ), this is also a normal game : the last player to move wins. The combination of these properties means that positions can be analyzed statically using the Sprague-Grundy theory .
Here is an example of how strong this approach is using Figure 25 from Berlekamp's book.

There are 33 possible steps in this position, and a well-played game lasts about 20 more moves, so I would be surprised if minimax could complete its analysis in a reasonable amount of time. But the position has a long chain (a chain of six squares in the upper half), so it can be analyzed statically. The position is divided into three parts, the values โโof which are nimbers :

These nimbers can be calculated by dynamic programming in O (2 n ) time for a position with the remaining n moves, and you probably want to cache the results for many ordinary small positions anyway.
Nimmers are added using exclusive or: * 1 + * 4 + * 2 = * 7. Thus, the only winning move (a step that reduces the amount of nim-sum to * 0) is to change * 4 to * 3 (so the sum of the positions is * 1 + * 3 + * 2 = * 0). Any of the three dotted red moves wins:

Edited to add: I know that this resume is not really an algorithm as such and leaves many questions unanswered. For some answers, you can read Berlekamp's book. But there is a bit of a gap when it comes to discovery: chain counting and Sprague-Grundy theory are really practical only in the middle and endgame. To discover, you need to try something new: if it were me, I would have a desire to try searching the Monte Carlo tree to the point where the chains can be counted. This technique worked wonders for Go and could also be productive here.