MCPcopy Create free account
hub / github.com/YeWR/EfficientZero / cbatch_back_propagate

Function cbatch_back_propagate

core/ctree/cnode.cpp:317–325  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

315 }
316
317 void cbatch_back_propagate(int hidden_state_index_x, float discount, const std::vector<float> &value_prefixs, const std::vector<float> &values, const std::vector<std::vector<float>> &policies, tools::CMinMaxStatsList *min_max_stats_lst, CSearchResults &results, std::vector<int> is_reset_lst){
318 for(int i = 0; i < results.num; ++i){
319 results.nodes[i]->expand(0, hidden_state_index_x, i, value_prefixs[i], policies[i]);
320 // reset
321 results.nodes[i]->is_reset = is_reset_lst[i];
322
323 cback_propagate(results.search_paths[i], min_max_stats_lst->stats_lst[i], 0, values[i], discount);
324 }
325 }
326
327 int cselect_child(CNode* root, tools::CMinMaxStats &min_max_stats, int pb_c_base, float pb_c_init, float discount, float mean_q){
328 float max_score = FLOAT_MIN;

Callers

nothing calls this directly

Calls 2

cback_propagateFunction · 0.85
expandMethod · 0.80

Tested by

no test coverage detected