diff --git a/src/rngtool.py b/src/rngtool.py index b68b68c..4cfffa0 100644 --- a/src/rngtool.py +++ b/src/rngtool.py @@ -165,6 +165,19 @@ def recov(blinks:List[int],rawintervals:List[int])->Xorshift: return result def reidentifyByBlinks(rng:Xorshift, observed_blinks:List[int], npc = 0, search_max=10**6, search_min=0)->Xorshift: + """reidentify Xorshift state by type of observed blinks. + + Args: + rng (Xorshift): identified rng + observed_blinks (List[int]): + npc (int, optional): num of npcs. Defaults to 0. + search_max (int, optional): . Defaults to 10**6. + search_min (int, optional): . Defaults to 0. + + Returns: + Xorshift: reidentified rng + """ + if search_maxXorshift: + """reidentify Xorshift state by intervals of observed blinks. + This method is faster than "reidentifyByBlinks" in most cases since it can be reidentified by less blinking. + + Args: + rng (Xorshift): [description] + rawintervals (List[int]): list of intervals of blinks. 6 or more is recommended. + npc (int, optional): [description]. Defaults to 0. + search_max ([type], optional): [description]. Defaults to 10**6. + search_min (int, optional): [description]. Defaults to 0. + + Returns: + Xorshift: [description] + """ + intervals = rawintervals[1:] + if search_maxXorshift: """Recover the xorshift from the interval of Munchlax blinks.