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

Question about the index of pad_child_visits_lst in selfplay_worker.py #34

Open
puyuan1996 opened this issue Oct 27, 2022 · 2 comments
Open

Comments

@puyuan1996
Copy link

Thanks for you open-sourced code very much.

I am very confused about this code segment in put_last_trajectory method in selfplay_worker.py:

In Line 69 , why is,
pad_child_visits_lst = game_histories[i].child_visits[beg_index:end_index] rather than
pad_child_visits_lst = game_histories[i].child_visits[:self.config.num_unroll_steps],

in my understanding, the game_histories[i].child_visits[0] is the child_visits of stacked obs game_histories[i].obs_history[beg_index],

is this a bug?

Looking forward to your reply!

@YeWR
Copy link
Owner

YeWR commented Oct 31, 2022

Thank you for your correction.

I think it should be a bug. Except for the observation history, all the other statistics (eg, visits, values, rewards) should be indexed from 0 instead of self.config.stacked_observations. This bug seems to cause misplaced data at the boundary.

Really thank you for your detailed reading. We will fix this these days and check out the performance :)

@puyuan1996
Copy link
Author

Really thank you for your reply.

Looking forward to the analysis experiment of the performance impact of this bug!!

Best Wishes.

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