Commit 33f9d1ce by ziho

c

parent 7521c0c1
......@@ -3,7 +3,7 @@ import time
#测试用pk函数
def pk(model1,model2,num_games=1):
time.sleep(random.uniform(8,12))
time.sleep(random.uniform(2,4))
winrate=1-0.5**(abs(int(model1)-int(model2))/1) #假设新模型以一定概率战胜旧模型
res=random.choices([1,0.5,0],weights=[winrate,0,1-winrate],k=1)
if int(model1)>int(model2):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment