peter1591 / hearthstone-ai

A Hearthstone AI based on Monte Carlo tree search and neural nets written in modern C++.
302 stars 49 forks source link

generate_train_data depends on `neural_net`, where does `neural_net` come from? #100

Open linuxaged opened 6 years ago

linuxaged commented 6 years ago

Any munual about how to train in details? How to get the JSON generated training data?

FrederikHusche commented 6 years ago

I know it's very late, but you can create the net by calling NeuralNetwork::CreateWithRandomWeights("neural_net");. I put it in NeuralNetwork.cpp in NeuralNetwork::Load, line 415, so it looks like this: void NeuralNetwork::Load(std::string const& path, bool is_random) { // reload neural net delete impl_; impl_ = new impl::NeuralNetworkImpl(); NeuralNetwork::CreateWithRandomWeights("neural_net"); impl_->Load(path, is_random); }.

Just remove the line after it ran once and the net got created.