Skip to content
This repository has been archived by the owner on Aug 20, 2022. It is now read-only.

Commit

Permalink
Added one condition to make silly agent less silly
Browse files Browse the repository at this point in the history
  • Loading branch information
yahiaetman committed Mar 17, 2020
1 parent 465d76a commit 9664c54
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/examples/console-silly-agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,8 @@ if (isMainThread) {
} else {
const scores = game.Scores;
game.undo();
return scores[color] - scores[flipColor(color)];
const difference = scores[color] - scores[flipColor(color)];
return move.type == 'pass' && difference < 0 ? -1e10 : difference;
}
}

Expand Down

0 comments on commit 9664c54

Please sign in to comment.