Scorpio 2.8.6 MCTS neural network evaluation

Discussion of anything and everything relating to chess playing software and machines.

Moderators: hgm, Rebel, chrisw

User avatar
Werner
Posts: 2871
Joined: Wed Mar 08, 2006 10:09 pm
Location: Germany
Full name: Werner Schüle

Re: Scorpio 2.8.6 MCTS neural network evaluation

Post by Werner »

I don´t see here if nn is used or not. perhaps I use not the correct configuration. Here my .ini file:

#############################################
# log on/off - turn logging on and off
# resign - resign value in centipawns
#############################################
log off
resign 900
##################################################################
# Hashtable sizes in mb.
# ht - main hash table shared by ALL threads
# eht - evalualtion hash table allocated PER thread
# pht - pawn hash table allocated PER thread
# Usually 1m or 2mb is enough for pawn hash table, but the others
# can be set as high as possible
##################################################################
ht 256
eht 8
pht 1
##################################################################
# montecarlo - Use montecarlo tree search (MCTS) if set to 1
# treeht - Maximum size of tree to store in memory given in MB.
# Note that this memory is not allocated at start up; it only
# specifies the maximum limit the tree could grow to.
# Note: Don't think you are making scorpio weak by not setting
# this memory to high value, infact treeht=0 is the strongest
# MCTS setting.
# frac_freeze_tree [0 - 100] - freeze tree after this percentage of time is spent
# frac_alphabeta [0 - 100] - use alpha-beta search this percent of the time
# frac_abrollouts [0 - 100] - use alpha-beta rollouts search this percent of the time
# frac_width [0 - 1e3] - determines amount of progressive widening
# mcts_strategy_depth [0 - 64] - Lookahead depth for MCTS rollouts
# alphabeta_depth [0 - 64] - Fixed search depth for standard alphabeta searches at the leaves
# evaluate_depth [0 - 64] - Fixed search depth for evaluation of new children during expansion
# backup_type [0 - 5] - minmax = 0, averaging = 1, mixed = 2, for mixing score with previous ID use 3,4,5 resp.
# reuse_tree - reuse MCTS tree between moves
##################################################################
montecarlo 1
treeht 12800
frac_freeze_tree 100
frac_alphabeta 100
frac_abrollouts 20
frac_width 100
mcts_strategy_depth 30
alphabeta_depth 16
evaluate_depth 0
backup_type 0
reuse_tree 1
#############################################################################
# Parallel search setup
# mt - number of processors
# smp_depth - split depth for smp
# cluster_depth - split depth for cluster search
# message_poll_nodes - number nodes to search before checking for message
#############################################################################
mt 1
smp_depth 8
cluster_depth 12
message_poll_nodes 20
smp_type YBW
cluster_type YBW
##########################################################################
# EGBB
# egbb_path - path to endgame egbbs
# egbb_cache_size - cache size for egbbs
# egbb_ply_limit_percent - percent of plies from the root to egbb probing
# egbb_depth_limit - depth from the leaves to egbb probing
# egbb_load_type - egbb load type with the following values
# 0 = none are loaded
# 1 = all 3/4 men are loaded
# 2 = Not implemented yet
# 3 = all 5 men are loaded
##########################################################################
egbb_path c:\negbb64\
egbb_cache_size 32
egbb_load_type 3
egbb_depth_limit 6
#######################################
# Path to neural network
#######################################
use_nn 1
nn_path c:\Users\xx\Arena\Engines\ScorpioNet\nets\net-6x64.pb


use_nn is Default set to 0 ??
Werner
User avatar
CMCanavessi
Posts: 1142
Joined: Thu Dec 28, 2017 4:06 pm
Location: Argentina

Re: Scorpio 2.8.6 MCTS neural network evaluation

Post by CMCanavessi »

If I set use_nn 1 in the .ini file, scorpio automatically stops responding when it starts "thinking". If I set it to 0 it works just fine, but I don't know if it uses the network file or not.
Follow my tournament and some Leela gauntlets live at http://twitch.tv/ccls
Milos
Posts: 4190
Joined: Wed Nov 25, 2009 1:47 am

Re: Scorpio 2.8.6 MCTS neural network evaluation

Post by Milos »

Robert Pope wrote: Tue Jul 24, 2018 7:52 pm
Milos wrote: Tue Jul 24, 2018 7:12 pm I don't think you understand how MCTS works. In Scorpio it is using just value network as direct rollout replacement (i.e. as eval). Policy network is not used to guide the search. MCTS is completely agnostic to the way evaluation only is performed (A/B rollout, handcrafted NN eval, LC0/A0 NN eval, etc.). Format, number of layers, input planes of NN and all the internals are irrelevant for search.
Except....the value network is an output of the neural network, and is simply a series of transformations of the inputs and the weights. So of course the format of the neural network matters! If you don't have the same format, then the value network that gets output is junk. How MCTS uses that to guide the search is what is irrelevant, since it's garbage information.
That is ofc true, but implementing the same format as in LC0 is rather trivial. Daniel used TF and he could have just copied TF interface from LC0 from Alex for LC0 NN. But you are right, I checked to source code and he didn't, so Scorpio doesn't support LC0 NN.
Milos
Posts: 4190
Joined: Wed Nov 25, 2009 1:47 am

Re: Scorpio 2.8.6 MCTS neural network evaluation

Post by Milos »

CMCanavessi wrote: Wed Jul 25, 2018 2:00 am If I set use_nn 1 in the .ini file, scorpio automatically stops responding when it starts "thinking". If I set it to 0 it works just fine, but I don't know if it uses the network file or not.
If you wanna use NN you set use_nn to 1, but you should also have full TF installed/compiled for your target OS and in path for Scorpio to find it.
User avatar
Werner
Posts: 2871
Joined: Wed Mar 08, 2006 10:09 pm
Location: Germany
Full name: Werner Schüle

Re: Scorpio 2.8.6 MCTS neural network evaluation

Post by Werner »

you should also have full TF installed/compiled for your target OS and in path for Scorpio to find it
… seems to be quite complicated for me (for Windows 10 x64)
Werner
Milos
Posts: 4190
Joined: Wed Nov 25, 2009 1:47 am

Re: Scorpio 2.8.6 MCTS neural network evaluation

Post by Milos »

Werner wrote: Wed Jul 25, 2018 5:06 pm
you should also have full TF installed/compiled for your target OS and in path for Scorpio to find it
… seems to be quite complicated for me (for Windows 10 x64)
Yes building TF for C/C++ is quite a pain on Windows. Seems Google doesn't quite like or care providing support for MS OS's beside python.
If you still care to do it yourself, here is probably the best tutorial:
https://medium.com/@shiweili/building-t ... 9c90e23e6e
Albert Silver
Posts: 3019
Joined: Wed Mar 08, 2006 9:57 pm
Location: Rio de Janeiro, Brazil

Re: Scorpio 2.8.6 MCTS neural network evaluation

Post by Albert Silver »

Milos wrote: Thu Jul 26, 2018 1:51 am
Werner wrote: Wed Jul 25, 2018 5:06 pm
you should also have full TF installed/compiled for your target OS and in path for Scorpio to find it
… seems to be quite complicated for me (for Windows 10 x64)
Yes building TF for C/C++ is quite a pain on Windows. Seems Google doesn't quite like or care providing support for MS OS's beside python.
If you still care to do it yourself, here is probably the best tutorial:
https://medium.com/@shiweili/building-t ... 9c90e23e6e
Do you mean that building an NN with TF is a pain in Windows? Or that providing support for a TF-built NN is hard?
"Tactics are the bricks and sticks that make up a game, but positional play is the architectural blueprint."