Lines Matching defs:param
162 fun add_noise param prepol =
164 val noisel1 = List.tabulate (length prepol, fn _ => (#noise_gen param) ())
168 val coeff = #noise_coeff param
184 val param = #mctsparam obj
189 if (#noconfl param andalso dmem board cache)
197 Win => (if #evalwin param
203 val pol3 = if #noise_all param then add_noise param pol2 else pol2
209 val tree2 = backup (#decay param) tree1 (id, #value node)
211 (tree2, if #noconfl param then dadd board id cache else cache)
214 fun add_rootnoise param tree =
217 val prepol = add_noise param (map fst pol)
228 fun puct_choice param tree vtot ((move,polv),cid) =
236 exploitation + (#explo_coeff param) * exploration
256 val param = #mctsparam obj
259 then Backup (id, if #evalwin param andalso is_win stati
262 else if #avoidlose param andalso is_lose status
266 if #avoidlose param
272 val l1 = map_assoc (puct_choice param tree (#vis node)) l0
311 fun is_timeout timer tree param =
312 (isSome (#nsim param) andalso
313 #vis (dfind [] tree) > Real.fromInt (valOf (#nsim param)) + 0.5)
315 (isSome (#timer param) andalso
316 Timer.checkRealTimer timer > Time.fromReal (valOf (#timer param)))
318 (#stopatwin_flag param andalso is_win (#status (dfind [] tree)))
326 val param = #mctsparam obj
328 if is_timeout timer tree param
332 Backup (id,sc) => loop (backup (#decay param) tree (id,sc), cache)