Skip to content

Commit

Permalink
Make sampling less frequent, fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
xpmatteo committed Oct 27, 2023
1 parent 80c22ef commit b25e8cb
Show file tree
Hide file tree
Showing 2 changed files with 1,805 additions and 66 deletions.
2 changes: 1 addition & 1 deletion src/ai/mcts_player.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ export class DecisionNode extends TreeNode {
bestScore = currentScore;
}
}
if (best.command instanceof MacroCommand && bestScore < expansionFactor * Math.sqrt(logOfThisVisits / 1)) {
if (best.command instanceof MacroCommand && bestScore < expansionFactor * Math.sqrt(logOfThisVisits / 10)) {
const macroCommand = perturbSample(this.game.validCommands(), best.command);
const clone = executeCommand(this.game, macroCommand);
const childNode = new DecisionNode(clone, this, 0, 0, [], macroCommand);
Expand Down
Loading

0 comments on commit b25e8cb

Please sign in to comment.