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

Method prepare

core/ctree/cnode.cpp:204–211  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

202 CRoots::~CRoots(){}
203
204 void CRoots::prepare(float root_exploration_fraction, const std::vector<std::vector<float>> &noises, const std::vector<float> &value_prefixs, const std::vector<std::vector<float>> &policies){
205 for(int i = 0; i < this->root_num; ++i){
206 this->roots[i].expand(0, 0, i, value_prefixs[i], policies[i]);
207 this->roots[i].add_exploration_noise(root_exploration_fraction, noises[i]);
208
209 this->roots[i].visit_count += 1;
210 }
211 }
212
213 void CRoots::prepare_no_noise(const std::vector<float> &value_prefixs, const std::vector<std::vector<float>> &policies){
214 for(int i = 0; i < this->root_num; ++i){

Callers 3

runMethod · 0.80
_prepare_reward_valueMethod · 0.80
_prepare_policy_reMethod · 0.80

Calls 2

expandMethod · 0.80
add_exploration_noiseMethod · 0.80

Tested by

no test coverage detected