This should be the correct logic for defense against branches

I am not positive yet, but so far this algorithm seems to be solid at predicting and preventing multiple win scenarios.