Added sequence moves
This commit is contained in:
parent
8f984e653f
commit
60d6668408
|
@ -137,10 +137,13 @@ public class MalteAI implements Player{
|
||||||
weight *= W_WIN;
|
weight *= W_WIN;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Prevent choosing a bad spot
|
|
||||||
Sequence xA = sequencesAbove[i];
|
Sequence xA = sequencesAbove[i];
|
||||||
if (sequencesAbove[i].matches("EEE")) {
|
if (xA.matches("EEE")) {
|
||||||
|
// Prevent choosing a bad spot
|
||||||
weight *= W_DONT;
|
weight *= W_DONT;
|
||||||
|
} else if (xA.matches("MMM")) {
|
||||||
|
// Open the opportunity
|
||||||
|
weight *= W_WIN;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return weight;
|
return weight;
|
||||||
|
|
Loading…
Reference in a new issue