[go: up one dir, main page]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test state terminal property when starting MCTS rollout policy #238

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,20 @@ void SK_MCTS_DEFAULT_ROLLOUT_POLICY_CLASS::operator()(
typename Tsolver::StateNode &n, std::size_t d) const {
try {
typename Tsolver::Domain::State current_state;
bool termination;

solver.execution_policy().protect(
[&solver, &n, &current_state]() {
[&solver, &n, &current_state, &termination]() {
if (solver.debug_logs()) {
Logger::debug("Launching default rollout policy from state " +
n.state.print() +
Tsolver::ExecutionPolicy::print_thread());
}
current_state = n.state;
termination = n.terminal;
},
n.mutex);

bool termination = false;
std::size_t current_depth = d;
double reward = 0.0;
double gamma_n = 1.0;
Expand Down