Comments (16)
may I see your code?
from othellomcts-dataoriented.
could you send me e-mail address?I can send to you.Thank you.
from othellomcts-dataoriented.
from othellomcts-dataoriented.
already send.Thank you.
from othellomcts-dataoriented.
see if this helps:
qDebug()<< "MCTS_Nodes"<< node_count<<"剩余落子点数:"<<best_child->maxChildrenNum;
delete node; //here
from othellomcts-dataoriented.
It does not work.the same problem.
from othellomcts-dataoriented.
then maybe give it a destructor
Node::~Node()
{
for(auto child :children)
delete child;
}
from othellomcts-dataoriented.
from othellomcts-dataoriented.
then we work around it
void Node::delNode()
{
for (auto child : children)
child->delNode();
delete this;
}
qDebug() << "MCTS_Nodes" << node_count << "剩余落子点数:" << best_child->maxChildrenNum;
node->delNode();
from othellomcts-dataoriented.
It already does not work.
from othellomcts-dataoriented.
well if you can't delete it don't allocate the node yourself.
from othellomcts-dataoriented.
I tried to delete the nodes, but it didn't work, and Monte Carlo searches would not work if no nodes were allocated.
from othellomcts-dataoriented.
I try again ,find it will be crashed whatever times I set simulation.
from othellomcts-dataoriented.
No. what I meant is don't allocate them yourself
Store the children in, say, a vector. Avoid using thing like "node newnode = new node".
something like
node newchild
//do your expand here
children.push_back(newchild)
from othellomcts-dataoriented.
this way the default constructor will deallocate the children for you.
from othellomcts-dataoriented.
I have a try
from othellomcts-dataoriented.
Related Issues (1)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from othellomcts-dataoriented.