Let me throw some code at it and see what happens.

I have an Idea on how to scan. Out of the 2700 possible win combos, the only ones that can win at any given time is the ones that contain a computer token (lets say X), and no O's. Any Combo's that has only O's and no X's pose a threat and need to be capped. The ones with the more O's pose the biggest threat. 4-O's require an immediate response. Any combo with 4 X's are an immediate win and should be checked for first. If the max O count ( of any O only combo) is greater the max X count ( of any X only combo) you defend. If the Max X count is greater than O count you attack.

Using the same code as the check routine you can check for a masked matrix value >0 for both player and computer and isolate the combos that matter, and ignore the rest.