Added sequence moves

This commit is contained in:
Malte Tammena 2017-10-23 15:16:15 +02:00
parent 8f984e653f
commit 60d6668408

View file

@ -137,10 +137,13 @@ public class MalteAI implements Player{
weight *= W_WIN;
}
}
// Prevent choosing a bad spot
Sequence xA = sequencesAbove[i];
if (sequencesAbove[i].matches("EEE")) {
if (xA.matches("EEE")) {
// Prevent choosing a bad spot
weight *= W_DONT;
} else if (xA.matches("MMM")) {
// Open the opportunity
weight *= W_WIN;
}
}
return weight;