mirror of
https://github.com/2OOP/pism.git
synced 2026-02-04 19:04:49 +00:00
update mcts
This commit is contained in:
@@ -92,10 +92,14 @@ public abstract class MCTSAI extends AbstractAI {
|
||||
|
||||
public MCTSAI(int milliseconds) {
|
||||
this.milliseconds = milliseconds;
|
||||
|
||||
this.lastIterations = 0;
|
||||
}
|
||||
|
||||
public MCTSAI(MCTSAI other) {
|
||||
this.milliseconds = other.milliseconds;
|
||||
|
||||
this.lastIterations = other.lastIterations;
|
||||
}
|
||||
|
||||
public int getLastIterations() {
|
||||
|
||||
@@ -41,7 +41,8 @@ public class MCTSAI3 extends MCTSAI {
|
||||
tasks.add(() -> {
|
||||
final Node localRoot = new Node(game.deepCopy());
|
||||
|
||||
while (Float.isNaN(localRoot.solved) && System.nanoTime() < endTime) {
|
||||
// while (Float.isNaN(localRoot.solved) && System.nanoTime() < endTime) {
|
||||
while (System.nanoTime() < endTime) {
|
||||
Node leaf = selection(localRoot);
|
||||
leaf = expansion(leaf);
|
||||
final float value = simulation(leaf);
|
||||
|
||||
Reference in New Issue
Block a user