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

并行MCTS代码不理解 #39

Open
huskyth opened this issue Feb 23, 2024 · 3 comments
Open

并行MCTS代码不理解 #39

huskyth opened this issue Feb 23, 2024 · 3 comments

Comments

@huskyth
Copy link

huskyth commented Feb 23, 2024

大佬simulate的时候难道不会导致多个线程同时从while 中break,对同一个root执行inference吗

@hijkzzz
Copy link
Owner

hijkzzz commented Feb 25, 2024

有锁的

@huskyth
Copy link
Author

huskyth commented Feb 28, 2024

有锁的

就是刚开始多个线程都进入simulate,但是还没到leaf的锁的时候,都从break跳出了,那同一个根节点是不是会计算多次啊,还是并行mcts只能尽量高地接近串行的mcts的性能

@hijkzzz
Copy link
Owner

hijkzzz commented Mar 3, 2024

有锁的

就是刚开始多个线程都进入simulate,但是还没到leaf的锁的时候,都从break跳出了,那同一个根节点是不是会计算多次啊,还是并行mcts只能尽量高地接近串行的mcts的性能

对的 所以我们有一个叫 virtual loss 的东西

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants