aikupoker / deeper-stacker

DeeperStacker: DeepHoldem Evil Brother
39 stars 3 forks source link

deepstack_server.lua can't access flop model #16

Closed airdine closed 4 years ago

airdine commented 4 years ago

Hello,

I am having new issue trying to run deepstack server :

/home/xxxx/torch/install/bin/lua: cannot open <../Data/Models/NoLimit/preflop-aux/final_gpu.info> in mode r at /home/xxxx/torch/pkg/torch/lib/TH/THDiskFile.c:673 stack traceback: [C]: in ? [C]: in function 'DiskFile' /home/xxxx/torch/install/share/lua/5.2/torch/File.lua:405: in function 'load' ./Nn/value_nn.lua:46: in function '__init' /home/xxxx/torch/install/share/lua/5.2/torch/init.lua:91: in function </home/xxxx/torch/install/share/lua/5.2/torch/init.lua:87> [C]: in function 'ValueNn' ./Lookahead/lookahead_builder.lua:40: in function '_construct_transition_boxes' ./Lookahead/lookahead_builder.lua:484: in function 'build_from_tree' ./Lookahead/lookahead.lua:30: in function 'build_lookahead' ./Lookahead/resolving.lua:54: in function 'resolve_first_node' ./Player/continual_resolving.lua:45: in function 'resolve_first_node' ./Player/continual_resolving.lua:21: in function '__init' /home/xxxx/torch/install/share/lua/5.2/torch/init.lua:91: in function </home/xxxx/torch/install/share/lua/5.2/torch/init.lua:87> [C]: in function 'ContinualResolving' Player/deepstack_server.lua:14: in main chunk [C]: in function 'dofile' ...lien/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk [C]: in ?

user has permission on flop model files : $ ls -l ~/deeper-stack/Data/Models/NoLimit/preflop-aux/ total 62972 -rwxrwxrwx 1 xxxx xxxx 86 avril 1 16:57 final_cpu.info -rwxrwxrwx 1 xxxx xxxx 65805788 avril 1 16:57 final_cpu.model

and : ` ~/deeper-stack/Data/Models/NoLimit/preflop-aux$ th

__ | Torch7 / / ____/ / | Scientific computing for Lua. / / / \/ / / \ | Type ? for help // _// _//// | https://github.com/torch | http://torch.ch

th> torch.load('final_cpu.info') { gpu : false valid_loss : 0.0017363535795198 epoch : 67 } `

Do you think I have to train preflop model too, to makes it works ?

Thanks in advance

aikupoker commented 4 years ago

Hi airdine,

The error said that can't find GPU model of Preflop network (../Data/Models/NoLimit/preflop-aux/final_gpu.info).

Right now, it is provided a CPU model of Preflop network. You can convert it to GPU model using following Lua script.

https://github.com/aikupoker/deeper-stacker/blob/master/Source/Nn/cpu_gpu_model_converter.lua#L41

You just need to change line 41:

From: convert_cpu_to_gpu('../Data/Models/NoLimit/flop/final') To: convert_cpu_to_gpu('../Data/Models/NoLimit/preflop-aux/final')

Cheers,

airdine commented 4 years ago

Hi,

Thanks for the answer and sorry for the poor question. I didn't noticed that the preflop model was cpu...

I just 'correct' (typo error) your answer in case someone come have a look at it

From: convert_cpu_to_gpu('../Data/Models/NoLimit/flop/final') To: convert_cpu_to_gpu('../Data/Models/NoLimit/preflop-aux/final')

Thanks a lot.

aikupoker commented 4 years ago

Fixed too in my comment. Thanks airdine!