å¹´ã®å·®ã©ã¸ãªã®WOC
https://radio.rcc.jp/toshinosa/
ã¶ã»ã®ã¼ã¹å°¾é¢é«æã¨OCHA NORMAåºæ¬ç çã®å¹´ã®å·®ã©ã¸ãªãã§ã²ã¼ã ããã£ã¦ãã¾ããããå ¨ãåã¦ããã«ãªãã£ãã®ã«åã¡ã¾ãããåã¤ç¢ºçã¯ã©ãããããªã®ãç®åºãã¾ãã
ã«ã¼ã«ã¨ãã¦ã¯æ確ã§ã¯ãªãã£ãã§ããããã¬ã¼ã¤ã¼1ã¯1ã¤ãã³ã°ã«1ï½20ã®ã©ããã®ç¹æ°ãå確çã§å ¥ãããã¬ã¼ã¤ã¼2ã¯ã¢ã¦ãã1/2ãåæã1/3ããã¼ã ã©ã³ã1/6ã§èµ·ããã¨ãã¾ããã¤ãã³ã°ãçµãã£ã¦10ç¹ä»¥ä¸å·®ãã¤ãã¦ãããã³ã¼ã«ãã§ãã
ã¾ããã©ã³ãã ã«1ååãã¬ã¤ãã¦ã¿ã¾ãããã
from __future__ import annotations from itertools import * from collections import Counter import random import sys from enum import Enum from typing import List, Tuple State = Tuple[int, int, int] class Action(Enum): OUT = 1 HIT = 2 HOMERUN = 3 @staticmethod def select_randomly(): r = random.randrange(1, 7) if r <= 3: return Action.OUT elif r <= 5: return Action.HIT else: return Action.HOMERUN def transit(s: State, a: Action) -> State: (score, out, base) = s if a == Action.OUT: return (score, out + 1, base) elif a == Action.HIT: if base == 3: return (score + 1, out, base) else: return (score, out, base + 1) else: return (score + base + 1, out, 0) def play1_randamly() -> int: return random.randrange(1, 21) def play2_randomly() -> int: s = (0, 0, 0) while True: s = transit(s, Action.select_randomly()) if s[1] == 3: return s[0] def play_randomly() -> str: score1 = 0 score2 = 0 for _ in range(9): score1 += play1_randamly() score2 += play2_randomly() if score1 >= score2 + 10: return 'Lose' elif score2 >= score1 + 10: return 'Win' if score1 > score2: return 'Lose' elif score1 < score2: return 'Win' else: return 'Draw' N = int(sys.argv[1]) c = Counter(play_randomly() for _ in range(N)) print(c)
Counter({'Lose': 99860253, 'Win': 139604, 'Draw': 143})
åã¤ç¢ºçã¯0.14%ç¨åº¦ã®ããã§ãã
次ã«ãçé¢ç®ã«ç¢ºçè¨ç®ããã¾ããæåã«ãã¬ã¼ã¤ã¼2ã1ã¤ãã³ã°ã«ä½ç¹å
¥ããã®ç¢ºçãæ±ãã¾ãããã ãã181ç¹ä»¥ä¸å
¥ã£ããå¿
ãåã¤ã®ã§ã181ç¹ä»¥ä¸ã¯ã¾ã¨ãã¦181ç¹ã¨ãã¾ãã
from __future__ import annotations from functools import reduce from itertools import * from collections import Counter import random import sys from enum import Enum from typing import List, Tuple State = Tuple[int, int, int] class Action(Enum): OUT = 1 HIT = 2 HOMERUN = 3 @staticmethod def probability(a: Action): if a == Action.OUT: return 3 / 6 elif a == Action.HIT: return 2 / 6 else: return 1 / 6 def transit(s: State, a: Action) -> State: (score, out, base) = s if a == Action.OUT: return (score, out + 1, base) elif a == Action.HIT: if base == 3: return (score + 1, out, base) else: return (score, out, base + 1) else: return (score + base + 1, out, 0) def probs_inning(N: int) -> list[float]: probs: list[float] = [0.0] * (N + 2) c: Dict[State, float] = Counter() c[(0, 0, 0)] = 1.0 while c: new_c: Dict[State, float] = Counter() for s0, p0 in c.items(): for action in Action: s1 = transit(s0, action) score, out, base = s1 p1 = p0 * Action.probability(action) if out == 3: probs[score] += p1 elif score > N: pass else: new_c[s1] += p1 c = new_c print(1.0 - sum(probs[:11])) # 11ç¹ä»¥ä¸åã確ç probs[N+1] = probs[N] # ååãã¤æ¸ã£ã¦ããã®ã§ãã¶ãããããã return probs def decide_probs(): probs1 = [0.0] + [1/20] * 20 probs2 = probs_inning(180) # 181ç¹ä¸ãªãå¿ ãå㤠probs = [0.0] * 3 # [Lose, Win, Draw] scores = { (0, 0): 1.0 } for i in range(9): new_scores: Dict[tuple[int, int], float] = Counter() for (score1, score2), p0 in scores.items(): for s1, s2 in product(range(1, 21), range(182)): prob1 = probs1[s1] prob2 = probs2[s2] new_score1 = score1 + s1 new_score2 = score2 + s2 p = p0 * prob1 * prob2 if new_score1 >= new_score2 + 10: probs[0] += p # Lose elif new_score2 >= new_score1 + 10: probs[1] += p # Win else: new_scores[(new_score1, new_score2)] += p scores = new_scores for (score1, score2), p in scores.items(): if score1 > score2: probs[0] += p # Lose elif score1 < score2: probs[1] += p # Win else: probs[2] += p # Draw print("Lose: %.6f, Win: %.6f, Draw: %.2e" % tuple(probs)) decide_probs()
ã¾ãããã¬ã¼ã¤ã¼2ã1ã¤ãã³ã°ã«11ç¹ä»¥ä¸åã確çã¯ã0.6%ç¨åº¦ã§ãã
ããã¦ã
Lose: 0.998606, Win: 0.001392, Draw: 1.39e-06
ã©ã³ãã ã«ãã¬ã¤ããã¨ãã¨ã»ã¨ãã©å¤ãããªãã§ããã
ãããã楽æ²å¤§è³2019éè¨(3)
æ票è
ãã©ã®ã¦ãããã®æ²ã«å
¥ãããããèªåã®æ¨ãã®ã¦ããããã¨ã«éè¨ããã
å
¼ä»»ã¯å½åé
ã§ã
ã°ã©ãã¯ãç´¯ç©ã®å²åã
ã©ã®ã¦ãããããèªã¦ãããã«æãå ¥ãã¦ããã®ã¯å¤ãããªããããã®æ¬¡ã«å ¥ãã¦ããã¦ãããããè¦ã¦ã¿ãã¨ãBEYOOOOONDSã²ã¿ä»¥å¤ã¯BEYOOOOONDSã§ãããã¨ããããã
é ä½ã表ã«ããã¨åãããããã
以ä¸ã«ãå ¨ã¦ã®ãã¼ã¿ã示ãã
,ã¢ã¼ãã³ã°å¨ã,ã¢ã³ã¸ã¥ã«ã ,Juice=Juice,ã«ã³ããªã¼ã»ã¬ã¼ã«ãº,ãã¶ããã¡ã¯ããªã¼,ã¤ã°ããã¡ã¯ããªã¼,BEYOOOOONDS,others ã¢ã¼ãã³ã°å¨ã,6635.5,1807.75,2677.25,546.5,1317.0,706.25,3858.5,811.25 ã¢ã³ã¸ã¥ã«ã ,220.75,2258.0,543.5,173.5,332.0,122.0,820.25,280.0 Juice=Juice,262.5,409.0,1990.0,118.0,335.5,153.5,757.5,264.0 ã«ã³ããªã¼ã»ã¬ã¼ã«ãº,138.25,231.5,177.25,508.0,96.75,29.75,278.0,95.5 ãã¶ããã¡ã¯ããªã¼,55.5,110.5,182.5,53.0,1262.0,39.5,307.5,59.5 ã¤ã°ããã¡ã¯ããªã¼,92.5,149.5,254.0,32.0,171.0,443.5,365.5,92.0 BEYOOOOONDS,260.5,319.5,345.75,92.75,298.75,119.25,2861.75,146.75 others,1068.0,1382.5,1384.75,715.5,695.75,247.5,1696.0,2185.0
ãããã楽æ²å¤§è³2019éè¨(2)
åã«è¨äºã«ãããã®ã ããã°ã©ãã«ãã¦ã¿ãã
æ¨ãé¨éã«å ¥ããæ票è ãæ票å ã®æ¨ãã®ã¦ãããã®æ¨ãã ã¨ã¿ãªãã¦ãä¸ä½æ¥½æ²ã¯ã©ã®ã¦ãããã®æ¨ããæ票ããã®ã調ã¹ããå ¼ä»»ã¡ã³ãã¼ã¯0.5ãã¤ã¨ãããã°ã©ãã¯ãã¤ã³ãã®ç´¯ç©å²åã
1ä½ã¯Juice=Juiceã²ã¿ããã¢ã¼ãã³ã°å¨ãã²ã¿ã®æ¹ããã¤ã³ããå
¥ãã¦ããã
ã¢ã¼ãã³ã°å¨ãã²ã¿ã¯å
¨ä½ã®41.5%ã¨ãã巨大å¢åãªã®ã§ããããããã¨ãèµ·ããã
ãããã楽æ²å¤§è³ã®æ票è æ°ã®æ¸å°ã¯æ¬å½ã«ã«ã³ããªã¼ã»ã¬ã¼ã«ãºã²ã¿ã®ãããªã®ãï¼
ãããã楽æ²å¤§è³ã®æ票人æ°ãå»å¹´ã¯ä¸æ¨å¹´ã«æ¯ã¹ã¦ç´400人æ¸ã£ãã¨ãããæ¨ãã¡ã³é¨éã§ã¯ã3905人ãã3511人ã«ãªã£ãã
ããã«ã¤ãã¦ãã«ã³ããªã¼ã»ã¬ã¼ã«ãºã®ã²ã¿ãæ票ããªããªã£ããããã¨ããè¨èª¬ãã©ããã§è¦ãããããæ¤è¨¼ãã¦ã¿ãã
ã¾ããä¸æ¨å¹´ã®å¾ç¥¨æ°ã¯ã
森æ¸ç¥æ²å¸ | 85票 |
è¹æ¨çµ | 62票 |
æ¢å·å¥ã ç¾ | 57票 |
å±±æ¨æ¢¨æ² | 54票 |
å°é¢è | 31票 |
å£æ°¸æ¡å | 29票 |
ã¨ãå ¨ä½ã§318票ã§ã400票ã«æºããªãã
ã§ã¯ãã«ã³ããªã¼ã»ã¬ã¼ã«ãºã²ã¿ã¯ãä»ã®ã¦ãããã®ã²ã¿ããæ¸å°ãã¦ããã®ã ãããã
ä¸æ¨å¹´ã¨å»å¹´ã§åãIDã®æ票è
ã追ããããã°åãããã¨æã£ãããå®ã¯åãæ票è
ã§ãIDã¯å¤ããããããããã§ãããã¯ãã¼ã ã§è¿½ãããããã¨ã«ããã
ã§ã¯ãããã¯ãã¼ã ã¯ã©ããããéè¤ããã ãããã
ä¸æ¨å¹´ã¯ãããã¯ãã¼ã ã¯3610ãããã¦ãã¼ã¯ãªï¼ä¸åº¦ããç¾ããªãï¼ããã¯ãã¼ã ã¯3405ãå»å¹´ã¯ãããã¯ãã¼ã ã¯3287ãããã¦ãã¼ã¯ãªããã¯ãã¼ã ã¯3129ã
ããã¦ãä¸æ¨å¹´ã®ã¦ãã¼ã¯ãªããã¯ãã¼ã ã®æ票è 3405人ãå»å¹´ã©ããããã調ã¹ãã
å ¨ä½ã§ã¯ã1729人ãæ票ã1676人ãä¸æï¼ããã¯ãã¼ã ãå¤ãã¦ãããããããªãã®ã§ï¼ã
ã§ã¯ãã«ã³ããªã¼ã»ã¬ã¼ã«ãºã²ã¿ã®æ票è ã¯ã©ãããã®ã調ã¹ãã
åå | æ票 | ä¸æ |
æ¢å·å¥ã ç¾ | 30 | 21 |
å°é¢è | 8 | 18 |
å£æ°¸æ¡å | 13 | 12 |
森æ¸ç¥æ²å¸ | 36 | 34 |
å±±æ¨æ¢¨æ² | 31 | 22 |
è¹æ¨çµ | 23 | 31 |
åè¨ | 141 | 138 |
å ¨ä½ã®æ票ã»ä¸æã®å²åã¨å¤ãããªããã«ã³ããªã¼ã»ã¬ã¼ã«ãºã²ã¿ãæ票ããªãã£ãã¨ãã証æ ã¯è¦ã¤ãããªãã£ãã
ã¤ãã§ã«ãåã²ã¿ãæ¨ãå¤ãããã調ã¹ãã
æ¢å·å¥ã
ç¾ -> æ¢å·å¥ã
ç¾ 9 å°æèè± 3 å±±æ¨æ¢¨æ² 3 西ç°æ±é 2 ãã®ä» 13
å°é¢è -> å°é¢è 6 ãã®ä» 2
å£æ°¸æ¡å -> å£æ°¸æ¡å 8 ãã®ä» 5
è¹æ¨çµ -> è¹æ¨çµ 16 æ±å£ç´è¶ 2 ãã®ä» 5
森æ¸ç¥æ²å¸ -> 森æ¸ç¥æ²å¸ 29 éæã¿ãªç¾ 2 ãã®ä» 5
å±±æ¨æ¢¨æ² -> å±±æ¨æ¢¨æ² 26 ãã®ä» 5
ã¡ãªã¿ã«ãä¸æ¨å¹´ä¸ä½ã¯ã
ä½è¤åªæ¨¹ -> ä½è¤åªæ¨¹ 134 ãã®ä» 26
å°ç°ããã -> å°ç°ããã 57 ãã®ä» 9
å®®æ¬ä½³æ -> å®®æ¬ä½³æ 65 ãã®ä» 14
å è³æ¥ -> å è³æ¥ 74 ãã®ä» 13
åç°å½©è± -> åç°å½©è± 19 ä¸è¥¿é¦è 4 ä¸åæèè¡£ 4 ãã®ä» 27
ããã¯ãã¼ã ã§è¿½ãã®ããããªã«æªããªããã¨ãåããã
ãããã楽æ²å¤§è³2019éè¨(1)
ä¸ä½ã®æ²ã«ãã©ã®ã¦ãããã®ã²ã¿ãæ票ãããããã¤ã³ãã§éè¨ãã¦ã¿ãã
å
¼ä»»ã®3人ã¯ãçåã
song | ã¢ã¼ãã³ã°å¨ã'19 | ã¢ã³ã¸ã¥ã«ã | Juice=Juice | ã«ã³ããªã¼ã»ã¬ã¼ã«ãº | ãã¶ããã¡ã¯ããªã¼ | ã¤ã°ããã¡ã¯ããªã¼ | BEYOOOOONDS | others |
ãã²ã¨ãã§çããããããã£ã¦ ããã£ã¦ãããè¤ãã¦ããã®? | 1266.0 | 343.5 | 1066.5 | 84.0 | 126.0 | 136.0 | 158.0 | 401.5 |
ãã²ã¨ãã§çããããããã£ã¦ ããã£ã¦ãããè¤ãã¦ããã®? (New Vocal Ver.) | 66.75 | 26.75 | 39.5 | 5.0 | 11.5 | 18.0 | 17.0 | 15.0 |
ãããã³ãDã»Nã»A! | 805.75 | 260.0 | 231.0 | 87.25 | 82.0 | 108.5 | 391.0 | 268.0 |
ç¼é¡ã®ç·ã®å | 673.0 | 211.5 | 158.0 | 45.5 | 60.0 | 58.0 | 481.0 | 187.0 |
éæ¥Night | 1296.5 | 89.5 | 89.0 | 60.0 | 16.0 | 35.0 | 73.0 | 147.0 |
赤ãã¤ã¤ãã³ | 378.75 | 641.25 | 133.0 | 64.0 | 45.0 | 46.0 | 62.5 | 208.0 |
é½å¶å¤§æ±æ¸ç·ã®å æ¬æ¨é§ ã§æ±ããã㦠| 480.0 | 147.25 | 120.0 | 75.75 | 75.5 | 94.0 | 312.0 | 200.0 |
人çBlues | 1033.0 | 56.5 | 85.0 | 34.0 | 18.0 | 24.5 | 51.5 | 127.5 |
I surrender æããã©æ | 873.0 | 37.75 | 32.0 | 12.25 | 10.0 | 14.0 | 34.5 | 87.5 |
æãã¦ã¿ãã㦠| 840.25 | 28.0 | 34.5 | 28.75 | 8.0 | 12.0 | 20.5 | 97.0 |
å¾®çé ¸ | 240.5 | 80.5 | 342.5 | 35.0 | 17.0 | 59.5 | 29.0 | 117.0 |
æ¶ããããªããã¢ã | 178.75 | 66.25 | 83.0 | 31.0 | 279.5 | 31.5 | 54.5 | 124.5 |
人çãããªãã¡ãã³ã¿ã»ã¬ã¤ | 153.25 | 419.0 | 49.5 | 39.75 | 10.0 | 21.5 | 33.5 | 107.0 |
å ¨ç¶èµ·ãä¸ãããªãSUNDAY | 225.5 | 291.5 | 64.5 | 40.5 | 11.5 | 19.0 | 55.5 | 78.5 |
ãµãããææè¨ | 259.0 | 68.75 | 71.5 | 14.75 | 15.0 | 203.5 | 52.0 | 79.0 |
One Summer Night ï½çå¤ã®æ±ºå¿ï½ | 161.75 | 82.75 | 58.5 | 190.0 | 22.5 | 16.0 | 31.5 | 82.0 |
ãã«ã¦ã©ã© | 179.25 | 69.0 | 56.0 | 16.25 | 164.0 | 47.5 | 41.5 | 64.0 |
ä¸åç®ã®ãã¼ãç¥è©± | 195.0 | 51.75 | 73.0 | 13.75 | 19.5 | 194.0 | 31.5 | 39.0 |
å å¹´ãã³ã¸ã¼ã¸ã£ã³ã | 117.25 | 27.75 | 68.0 | 21.5 | 16.5 | 14.5 | 212.0 | 66.0 |
å¼±æ°å¥³åéé¨å± | 126.25 | 54.5 | 34.5 | 152.25 | 16.5 | 15.0 | 27.5 | 103.5 |