mirror of
https://github.com/jjaldridge2009/Project_Xs.git
synced 2024-10-03 22:07:09 +02:00
This commit is contained in:
commit
1e714a7f54
@ -45,12 +45,11 @@ def getS_munchlax(intervals):
|
||||
t = getTrans()
|
||||
t_ = getTrans()
|
||||
|
||||
s = np.zeros((128,128),"uint8")
|
||||
s = np.zeros((144,128),"uint8")
|
||||
safe_intervals = []
|
||||
for i in range(32):
|
||||
for i in range(36):
|
||||
#intervals[-1]を挿入した際のインデックスが奇数だと危険な値の可能性がある
|
||||
is_carriable = bisect(section,intervals[-1])%2==1
|
||||
|
||||
while is_carriable:
|
||||
#スキップする
|
||||
t = t@t_%2
|
||||
@ -86,6 +85,7 @@ def gauss_jordan(mat,observed:list):
|
||||
res[j],res[pivot] = res[pivot],res[j]
|
||||
if isfound:
|
||||
pivot += 1
|
||||
|
||||
for i in range(c):
|
||||
check = 1<<(c-i-1)
|
||||
assert bitmat[i]&check>0
|
||||
|
@ -347,7 +347,7 @@ class Application(tk.Frame):
|
||||
for _ in range(self.config_json["timeline_npc"]+1):
|
||||
heapq.heappush(queue, (waituntil+1.017,0))
|
||||
for _ in range(self.config_json["pokemon_npc"]):
|
||||
blink_int = self.rng.rangefloat(100.0, 370.0)/30 - 0.048
|
||||
blink_int = self.rng.rangefloat(3,12) + 0.285
|
||||
heapq.heappush(queue, (waituntil+blink_int,1))
|
||||
|
||||
self.count_down = 10
|
||||
@ -372,7 +372,7 @@ class Application(tk.Frame):
|
||||
print(f"advances:{self.advances}, blink:{hex(r&0xF)}")
|
||||
heapq.heappush(queue, (w+1.017, 0))
|
||||
else:
|
||||
blink_int = self.rng.rangefloat(100.0, 370.0)/30 - 0.048
|
||||
blink_int = self.rng.rangefloat(3,12) + 0.285
|
||||
|
||||
heapq.heappush(queue, (w+blink_int, 1))
|
||||
print(f"advances:{self.advances}, interval:{blink_int}")
|
||||
@ -445,7 +445,7 @@ class Application(tk.Frame):
|
||||
for _ in range(self.config_json["timeline_npc"]):
|
||||
heapq.heappush(queue, (waituntil+1.017,0))
|
||||
for _ in range(self.config_json["pokemon_npc"]):
|
||||
blink_int = self.rng.rangefloat(100.0, 370.0)/30 - 0.048
|
||||
blink_int = self.rng.rangefloat(3,12) + 0.285
|
||||
heapq.heappush(queue, (waituntil+blink_int,1))
|
||||
|
||||
self.count_down = 10
|
||||
@ -470,7 +470,7 @@ class Application(tk.Frame):
|
||||
print(f"advances:{self.advances}, blink:{hex(r&0xF)}")
|
||||
heapq.heappush(queue, (w+1.017, 0))
|
||||
else:
|
||||
blink_int = self.rng.rangefloat(100.0, 370.0)/30 - 0.048
|
||||
blink_int = self.rng.rangefloat(3,12) + 0.285
|
||||
|
||||
heapq.heappush(queue, (w+blink_int, 1))
|
||||
print(f"advances:{self.advances}, interval:{blink_int}")
|
||||
|
@ -47,7 +47,7 @@ def tracking_blink(img, roi_x, roi_y, roi_w, roi_h, th = 0.9, size = 40, Monitor
|
||||
state = IDLE
|
||||
blinks = []
|
||||
intervals = []
|
||||
prev_time = 0
|
||||
prev_time = time.perf_counter()
|
||||
w, h = eye.shape[::-1]
|
||||
|
||||
prev_roi = None
|
||||
@ -353,7 +353,7 @@ def recovByMunchlax(rawintervals:List[float])->Xorshift:
|
||||
states = prng.getState()
|
||||
|
||||
#validation check
|
||||
expected_intervals = [randrange(r,100,370)/30 for r in prng.getNextRandSequence(advances)]
|
||||
expected_intervals = [randrange(r,100,370) for r in prng.getNextRandSequence(advances)]
|
||||
|
||||
paired = list(zip(intervals,expected_intervals))
|
||||
#print(paired)
|
||||
|
@ -117,11 +117,12 @@ def stationary_timeline():
|
||||
#whiteout
|
||||
time.sleep(2)
|
||||
waituntil = time.perf_counter()
|
||||
print("entered the stationary symbol room")
|
||||
print("enter the stationary symbol room")
|
||||
queue = []
|
||||
heapq.heappush(queue, (waituntil+1.017,0))
|
||||
|
||||
blink_int = reidentified_rng.rangefloat(100.0, 370.0)/30 - 0.048
|
||||
#blink_int = reidentified_rng.range(3.0, 12.0) + 0.3
|
||||
blink_int = reidentified_rng.rangefloat(3,12) + 0.3
|
||||
|
||||
heapq.heappush(queue, (waituntil+blink_int,1))
|
||||
while queue:
|
||||
@ -136,7 +137,8 @@ def stationary_timeline():
|
||||
print(f"advances:{advances}, blink:{hex(r&0xF)}")
|
||||
heapq.heappush(queue, (w+1.017, 0))
|
||||
else:
|
||||
blink_int = reidentified_rng.rangefloat(100.0, 370.0)/30 - 0.048
|
||||
#blink_int = reidentified_rng.range(3.0, 12.0) + 0.285
|
||||
blink_int = reidentified_rng.rangefloat(3,12) + 0.285
|
||||
|
||||
heapq.heappush(queue, (w+blink_int, 1))
|
||||
print(f"advances:{advances}, interval:{blink_int}")
|
||||
|
@ -32,7 +32,7 @@ def expr():
|
||||
if munch_eye is None:
|
||||
print("path is wrong")
|
||||
return
|
||||
gombe_intervals = rngtool.tracking_poke_blink(munch_eye, *config["view"], size=60, MonitorWindow=config["MonitorWindow"], WindowPrefix=config["WindowPrefix"])
|
||||
gombe_intervals = rngtool.tracking_poke_blink(munch_eye, *config["view"], size=64, MonitorWindow=config["MonitorWindow"], WindowPrefix=config["WindowPrefix"])
|
||||
|
||||
interval_prng = rngtool.recovByMunchlax(gombe_intervals)
|
||||
state = interval_prng.getState()
|
||||
@ -40,7 +40,7 @@ def expr():
|
||||
#timecounter reset
|
||||
advances = 0
|
||||
id_prng = Xorshift(*interval_prng.getState())
|
||||
id_prng.getNextRandSequence(1)
|
||||
id_prng.next()
|
||||
|
||||
waituntil = time.perf_counter()
|
||||
ts = time.time()
|
||||
@ -48,8 +48,8 @@ def expr():
|
||||
#ID予測開始
|
||||
while True:
|
||||
advances += 1
|
||||
r = interval_prng.next()
|
||||
interval = randrange(r, 100, 370)/30 - 0.048
|
||||
interval = interval_prng.rangefloat(3.0,12.0) + 0.285
|
||||
#interval = interval_prng.range(3.0,12.0) + 0.285
|
||||
waituntil += interval
|
||||
|
||||
id_r = id_prng.next()
|
||||
|
Loading…
Reference in New Issue
Block a user