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

what is the start_ind_random and the end_mask_random? #8

Open
Song-gusu opened this issue Apr 8, 2022 · 0 comments
Open

what is the start_ind_random and the end_mask_random? #8

Song-gusu opened this issue Apr 8, 2022 · 0 comments

Comments

@Song-gusu
Copy link

if recycle_ind < parameters['ACTION_NUMBER'] - 1:
start_mask_random = ( (count_rem + net.A[recycle_ind] >= 0) & (start_ind_random == -1) )
start_ind_random[start_mask_random] = recycle_ind

                **end_mask_random** = ( count_rem + net.A[recycle_ind] < parameters['Interval_N'] )
                **end_ind_random**[end_mask_random] = recycle_ind                
                
            maskselect_end = (sort[recycle_ind]==parameters['ACTION_NUMBER']-1)
            action_sort = sort[recycle_ind]
            
            A_sort = np.squeeze(net.A_mat[action_sort])
            
            _ind_max = (( (count_rem + A_sort < parameters['Interval_N']) & (count_rem + A_sort >= 0) | maskselect_end) & (mask_max_find==0) ) & (mask_last==0)
            action_max[_ind_max] = action_max[_ind_max] + sort[recycle_ind] [_ind_max] #?
            mask_max_find = mask_max_find + ( (count_rem + A_sort < parameters['Interval_N']) & (count_rem + A_sort >= 0) | maskselect_end ).astype(np.int8)

action_random = (start_ind_random + (end_ind_random + 2 - start_ind_random ) * np.random.rand(h, w)).astype(np.int8)

Why don't we generate action_random at random, but start_ ind_ Random and end_ ind_ random?

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

1 participant