Detailed Descriptionuct node selector which balances exploration and exploitation by considering node visits the UCT node selection rule selects the next leaf according to a mixed score of the node's actual lower bound and the number of times it has been visited so far compared to its parent node. The idea of UCT node selection for MIP appeared in: Ashish Sabharwal and Horst Samulowitz Guiding Combinatorial Optimization with UCT (2011) The authors adapted a game-tree exploration scheme called UCB to MIP trees. Starting from the root node as current node, the algorithm selects the current node's child which maximizes the UCT score where is the node's lower bound normalized by the root lower bound, and denotes the number of times a leaf in the subtree rooted at this node has been explored so far. The selected node in the sense of the SCIP node selection is the leaf reached by the above criterion. The authors suggest that this node selection rule is particularly useful at the beginning of the solving process, but to switch to a different node selection after a number of nodes has been explored to reduce computational overhead. Our implementation uses only information available from the original SCIP tree which does not support the forward path mechanism needed for the most efficient node selection. Instead, the algorithm selects the next leaf by looping over all leaves and comparing the best leaf found so far with the next one. Two leaves l_1, l_2 are compared by following their paths back upwards until their deepest common ancestor is reached, together with the two children of representing the two paths to l_1, l_2. The leaf represented by the child of with higher UCT score is a candidate for the next selected leaf. The node selector features several parameters: the nodelimit delimits the number of explored nodes before UCT selection is turned off the weight parameter changes the relevance of the visits quotient in the UCT score (see above score formula) useestimate determines whether the node's estimate or lower bound is taken as estimate
Definition in file nodesel_uct.c. Go to the source code of this file.
Macro Definition Documentation
Definition at line 64 of file nodesel_uct.c. Referenced by SCIP_DECL_NODESELSELECT(), and SCIPincludeNodeselUct().
Definition at line 65 of file nodesel_uct.c. Referenced by SCIPincludeNodeselUct().
Definition at line 66 of file nodesel_uct.c. Referenced by SCIPincludeNodeselUct().
Definition at line 67 of file nodesel_uct.c. Referenced by SCIPincludeNodeselUct().
default values for user parameters weight of node visits in UCT score Definition at line 70 of file nodesel_uct.c. Referenced by SCIPincludeNodeselUct().
limit of node selections after which UCT node selection is turned off Definition at line 71 of file nodesel_uct.c. Referenced by SCIPincludeNodeselUct().
should the estimate (TRUE) or the lower bound of a node be used for UCT score? Definition at line 72 of file nodesel_uct.c. Referenced by SCIPincludeNodeselUct().
initial size of node visits array (increased dynamically if required) Definition at line 73 of file nodesel_uct.c. Referenced by ensureMemorySize().
the maximum value for user parameter nodelimit Definition at line 74 of file nodesel_uct.c. Referenced by SCIPincludeNodeselUct(). Function Documentation
get the number times
Definition at line 97 of file nodesel_uct.c. References NULL, and SCIPnodeGetNumber(). Referenced by nodeGetUctScore().
increases the visits counter along the path from
Definition at line 119 of file nodesel_uct.c. References NULL, SCIPnodeGetDepth(), SCIPnodeGetNumber(), and SCIPnodeGetParent(). Referenced by SCIP_DECL_NODESELSELECT().
switches to a different node selection rule by assigning the lowest priority of all node selectors to uct
Definition at line 149 of file nodesel_uct.c. References MAX, MIN, NULL, SCIP_CALL, SCIP_OKAY, SCIP_VERBLEVEL_NORMAL, SCIPgetNNodesels(), SCIPgetNodesels(), SCIPnodeselGetStdPriority(), SCIPsetNodeselStdPriority(), and SCIPverbMessage(). Referenced by SCIP_DECL_NODESELSELECT().
returns UCT score of
Definition at line 182 of file nodesel_uct.c. References MAX, MIN, nodeGetVisits(), NULL, REALABS, SCIP_Real, SCIPgetLowerboundRoot(), SCIPisEQ(), SCIPisGE(), SCIPisInfinity(), SCIPnodeGetEstimate(), SCIPnodeGetLowerbound(), and SCIPnodeGetParent(). Referenced by compareNodes().
compares two leaf nodes by comparing the UCT scores of the two children of their deepest common ancestor
Definition at line 234 of file nodesel_uct.c. References nodeGetUctScore(), NULL, SCIP_Real, SCIPisEQ(), SCIPisGT(), SCIPisInfinity(), SCIPisLT(), SCIPnodeGetDepth(), and SCIPnodeGetParent(). Referenced by selectBestNode().
selects the best node among
Definition at line 287 of file nodesel_uct.c. References compareNodes(), and NULL. Referenced by SCIP_DECL_NODESELSELECT().
keeps visits array large enough to save visits for all nodes in the branch and bound tree
Definition at line 316 of file nodesel_uct.c. References BMSclearMemoryArray, INITIALSIZE, MIN, NULL, SCIP_CALL, SCIP_OKAY, SCIPallocClearMemoryArray, SCIPdebugMessage, SCIPgetNNodes(), and SCIPreallocMemoryArray. Referenced by SCIP_DECL_NODESELSELECT().
copy method for node selector plugins (called when SCIP copies plugins) Definition at line 356 of file nodesel_uct.c. References NULL, SCIP_CALL, SCIP_OKAY, and SCIPincludeNodeselUct().
solving process initialization method of node selector (called when branch and bound process is about to begin) Definition at line 366 of file nodesel_uct.c. References NULL, SCIP_OKAY, SCIPnodeselGetData(), and SCIPnodeselGetStdPriority().
solving process deinitialization method of node selector (called when branch and bound process data gets freed) Definition at line 384 of file nodesel_uct.c. References NULL, SCIP_CALL, SCIP_OKAY, SCIPfreeMemoryArray, SCIPnodeselGetData(), and SCIPsetNodeselStdPriority().
destructor of node selector to free user data (called when SCIP is exiting) Definition at line 410 of file nodesel_uct.c. References NULL, SCIP_OKAY, SCIPfreeBlockMemory, SCIPfreeMemoryArray, SCIPnodeselGetData(), and SCIPnodeselSetData().
node selection method of node selector Definition at line 431 of file nodesel_uct.c. References ensureMemorySize(), NODESEL_NAME, NULL, SCIP_CALL, SCIP_INVALIDCALL, SCIP_OKAY, SCIPdebugMessage, SCIPerrorMessage, SCIPgetNNodes(), SCIPgetNNodesLeft(), SCIPgetOpenNodesData(), SCIPnodeGetNumber(), SCIPnodeselGetData(), SCIPnodeselGetName(), selectBestNode(), turnoffNodeSelector(), and updateVisits().
node comparison method of UCT node selector Definition at line 493 of file nodesel_uct.c. References SCIP_Real, SCIPisGT(), SCIPisLT(), and SCIPnodeGetLowerbound().
creates the uct node selector and includes it in SCIP
Definition at line 514 of file nodesel_uct.c. References DEFAULT_NODELIMIT, DEFAULT_USEESTIMATE, DEFAULT_WEIGHT, MAXNODELIMIT, NODESEL_DESC, NODESEL_MEMSAVEPRIORITY, NODESEL_NAME, NODESEL_STDPRIORITY, NULL, SCIP_CALL, SCIP_OKAY, SCIPaddBoolParam(), SCIPaddIntParam(), SCIPaddRealParam(), SCIPallocBlockMemory, SCIPincludeNodeselBasic(), SCIPsetNodeselCopy(), SCIPsetNodeselExitsol(), SCIPsetNodeselFree(), SCIPsetNodeselInitsol(), and TRUE. Referenced by SCIP_DECL_NODESELCOPY(), and SCIPincludeDefaultPlugins(). |