happypepper / DeepHoldem

208 stars 65 forks source link

Assertion "indexValue >=0" failed in next_round_value_pre.lua:114 #36

Open slowlythinking opened 5 years ago

slowlythinking commented 5 years ago

Hi,

When I tried to play against DeepHoldem, I got a assertion failed error. It seems i have a same problem as this issue. Here is the error:cuda runtime error (59) : device-side assert triggered at .../cutorch/lib/generic/THCTensorScatterGather.cu:268

stack trackback:

./Nn/next_round_value_pre.lua:114: in function '_card_range_to_bucket_range_on_board'
./Nn/next_round_value_pre.lua:247: in function 'get_value_aux'
./Lookahead/lookahead.lua:254: in function '_compute_terminal_equities_next_street_box'
./Lookahead/lookahead.lua:323: in function '_compute_terminal_equities'
./Lookahead/lookahead.lua:93: in function '_compute'
./Lookahead/lookahead.lua:66: in function 'resolve'
./Lookahead/resolving.lua:182: in function 'get_chance_action_cfv'
./Player/continual_resolving.lua:112: in function '_update_invariant'
./Player/continual_resolving.lua:81: in function '_resolve_node'
./Player/continual_resolving.lua:142: in function 'compute_action'
./Player/deepstack.lua:41: in main chunk

Here is the code at the error point (next_round_value_pre.lua:114):

function NextRoundValuePre:_card_range_to_bucket_range_on_board(board_idx, card_range, bucket_range)
  local other_bucket_range = bucket_range:view(-1,self.bucket_count + 1):zero()

  local indexes = self.board_indexes_scatter:view(1,self.board_count, game_settings.hand_count)[{{},board_idx,{}}]
    :expand(bucket_range:size(1), game_settings.hand_count)
  other_bucket_range:scatterAdd(
    2,
    indexes,
    card_range
      :view(-1,game_settings.hand_count)
      :expand(card_range:size(1), game_settings.hand_count))
end

I think the wrong reason is the “indexes”, because the assertion is that (THCTensorScatterGather.cu):

微信图片_20190908223829

I still can not fix it. It's been a long time since I stuck here.

Any ideas would be great. Thanks very much!

ludwikbukowski commented 4 years ago

I have exactly the same issue! Did you resolve it ?

ilkkatakayama commented 4 years ago

I am having the same error, anyone been able to fix this?

I compiled cutorch with the changes from DeepHoldem repo to TensorMath.lua luarocks make rocks/cutorch-scm-1.rockspec