ICFP Programming Contest 2015
ä»å¹´ãICFP Programming Contestã«åå ãã¦ãããä»åã¯ãJapanese Curry.ãã¨ãããã¼ã ã§ãã¡ã³ãã¼ã¯Aæ°ã¨Jæ°ã¨ç§ã®ä¸äººã ã£ãã
ä»åã®åé¡ã¯ãããªã¹é¢¨ã®ã²ã¼ã ããã¬ã¤ããAIãä½ãã¨ãããã®ã以ä¸ã®ãããªç¹å¾´ãããã
- ã²ã¼ã ç¤ãå è§å½¢ã®æ·ãè©°ãã§æ§æããã¦ããã
- ç¤ã®å¤§ãããè½ã¡ã¦ãããã¼ã¹ã®å½¢ãä¸ã¤ã«æ±ºã¾ã£ã¦ãããããã©ã¡ã¿ã«ãªã£ã¦ããããããã¯åé¡ãã¨ã«æå®ãããã
- 次ã«ã©ã®ãã¼ã¹ããã£ã¦ããããé¸ã¶ç似乱æ°ã決ã¾ã£ã¦ããã®ã§ãã²ã¼ã çµäºã¾ã§å èªã¿ã§ããã決ããããæ°ã®ãã¼ã¹ãæ¶åããããæ»ã¬ã¨çµäºã
- AIããã²ã¼ã ã¸ã®å ¥åãã³ãã³ãåã¨ãã¦ä¸ããã®ã ãããããæååã¨ãã¦è§£éããã¨ãã«ç¹å®ã®å¥(phrases of powerãã³ããã?)ãå«ã¾ãã¦ããã¨åæ°ã«å¿ãã¦ç¹ãå¾ããããããã¯ä¸»ã«(å ¨é¨?)ã©ã´ã¯ã©ããã®ä½åããã®å¼ç¨ã«ãªã£ã¦ããããåé¡æä¸ã«ã¯ä¸ã¤ããæè¨ããã¦ãããã主å¬è ã®ãã³ããé ¼ãã«æ¢ããã¨ã«ãªãã
ä¾å¹´ã«æ¯ã¹ãã¨åç´ãªåé¡ã ã£ãã®ã§ã¢ããã¼ã·ã§ã³ãç¶æã§ãããå¿é ã ã£ãããçµãã£ã¦ã¿ãã¨ãããã工夫ãè¦æ±ããã¦æ¥½ããã£ããã¯ãã¥ã«ãè¦ç´ ãè¯ããã¬ã¼ãã¼ã«ãªã£ã¦ããã
ãã£ããã¨ã¯ä»¥ä¸ã
+0:00 åé¡æãèªãããããªã¹ã ã
+1:00 å ¥åãã¼ãµãæ¸ããã¨ãã£ã¦ãJSONãªã®ã§aesonä¸çºãããã§æ¢åãã©ã¼ãããã使ãã®ã¯æ ¸å¿é¨å以å¤ã«è²»ããããå®è£ å´åã極ååæ¸ãããã¨ãã¦ããããã§ãå»å¹´ã¾ã§ã®åé¡ã®å¾åã¨ã®éããæãããå°±å¯ã
+11:00 èµ·ãããAæ°ãUnicodeæåã®å è§å½¢⬢⬡ã¨ANSIã«ã©ã¼ã·ã¼ã±ã³ã¹ãçµã¿åãããç¾ããç¤é¢è¡¨ç¤ºé¢æ°ãå®æããã¦ãããããã¯åãªãæååãªã®ã§ãã¬ã¼ã¹åºåãªã©ã«åãè¾¼ããã¨ãã§ããæå¾ã¾ã§ãããã°ã«è²¢ç®ãããç¶ãã¦Aæ°ã¯æ交座æ¨ãä½µç¨ããã¹ãã ã¨ä¸»å¼µããJæ°ã¨ã¨ãã«å®è£ ãéå§ãã(ããã¯çµãã£ã¦ã¿ãã¨ã¾ã£ãããã®éãã§ãåé¡æã«ãã座æ¨ç³»ã ãã使ã£ã¦ãããæéãççºãã¦ãã¾ã)ããã¾ããããã¨ããªãã®ã§ãæåºç¨ã³ã¼ãã®ã³ãã³ãã©ã¤ã³è§£æé¨åãæ¸ããã²ããããã¼ã¹ãä¸ã«è½ã¨ãç¶ãã馬鹿AIãæ¸ãã¦æåºãã¦ã¿ããã²ã¼ã ãçµäºããã®ã¨åæã«ã³ãã³ãåãçµäºãã¦ããªããã°ãªããªããããããã®æ¹æ³ã§ã¯1ç¹ãåããªããã¨ãåããã
+12:00 ãã®ãããã§Jæ°ãé¢è±ã以éäºäººãã¼ã ã«ãªããæ¹éã話ãåã£ãçµæãåãã¼ã¹ã«ã¤ãã¦ç½®ããå ´æãå ¨åæããç½®ãæ¹ã«ã¤ãã¦ã¯ãã¥ã¼ãªã¹ãã£ã¯ã¹ç³»ã®æ¢ç´¢ã§é¸ã¶ãã¨ã«ãªã£ããã¾ãå¯è½ãªç½®ãæ¹ãåæããé¢æ°ãæ¸ããæ·±ãåªå æ¢ç´¢ãããã ãã ã£ãããããããã®åº§æ¨ãè² ã«ãªãããªã©ãããããè¦ç´ ãå¤ãã¦æéãããããçµäºç¶æ ããåæå¤ã¸ã¨éæ¹åã«æ¢ç´¢ããã°ãç¤é¢ãã»ã¼ç©ºã®ç¶æ ã ã¨ä¸»è¦é¨åã®è¨ç®éãO(width * height)ããO(width + height)ã«è½ã¨ããããªãã¨ã«å®è£ å¾ã«æ°ä»ããããããã試ãæ©ä¼ã¯ãªãã£ãããã®éã«Aæ°ã¯ã²ã¼ã ã«ã¼ã«ãå®è£ ããæåã®é¦¬é¹¿AIãæ¹è¯ãã¦0ç¹ã§ãªãç¹ãåããAIãæ¸ãã¦ããããã®å¾ãããã¨ããªããªã£ãã¨ã®ãã¨ãªã®ã§ãã¢ããã°ã©ãã³ã°ã«ç§»è¡ã
+13:30 å転ã使ããªãç½®ãæ¹ã«ã¤ãã¦ã¯å ¨åæãã§ããããã«ãªããããã§Aæ°ã¯å転ã®å®è£ ãç¶ããç§ã¯ãã¼ã ãµã¼ãã®å®è£ ã«åããããã
+15:30 ãã¼ã ãµã¼ãã®å®è£ ãçµãã(ãã ããã°ã£ã¦ãã¦è²ªæ¬²æ³ã®å£åçã«ãªã£ã¦ãã)ã解ãåºåã§ããããã«ãªããããããåºåãè¦ã¦ãä½ããã£ã¦ãããåãããªãã®ã§ã¹ãããå®è¡ã®ã§ããã·ãã¥ã¬ã¼ã¿ãæ¸ãã
+16:30 ã«ã¼ã«é¨åã®ãã°ãæ½°ãã¤ã¤ã·ãã¥ã¬ã¼ã¿ãæ¸ãçµããã
+18:00 è©ä¾¡é¢æ°ã¨ãã¦ãç¾å¨ã®ã¹ã³ã¢ããç½®ãããã¼ã¹ããªãã¹ãä¸ã«ç½®ããã¨ã好ããã®äºã¤ãå®è£ ãããããã«ãããåé¡0ãæ»ãªãã«æå¾ã¾ã§è§£ããAIãå®æããããããé常ã«é ãã®ã§æéãåã£ã¦æé©åãããã¨ã«ãªã£ãã
+19:30 ããã¤ãããã«ããã¯ãæ½°ããã¨ã«æåããããã¼ã ãµã¼ãã®å®è£ ãå£ãã¦ãããã¨ã«æ°ä»ãã¦ç´ããã¾ã ã³ã¼ããé ãã®ã§ãé«éåã®æ¹æ³ãèããçµæãç¤é¢ã®è¡¨ç¾ããçãªæ°¸ç¶ãããéåã§ããIntSetããå¯ãªããããããã«å¤æ´ãããã¨ã«æ±ºããããã®éãAæ°ã¯æå½ã次第ã«è©ä¾¡é¢æ°ç¨ã®ç¹å¾´éãå®è£ ãããã¨ã«ãªã£ãã
+23:00 Aæ°ãç©´ã®æ°ãæ°ããç¹å¾´éãå®è£ ãããç§ã®ã»ãã¯ããããããã®å®è£ ã§ãã°ãéç£ãã¦ä¸åã«å®è£ ãé²ã¾ãªãã®ã§ãããããã¦Lightning Divisionç¨ã®è§£ãçæãã¯ãããããã®æç¹ã§ã¯ããã¦åé¡0以å¤ã®è§£ãç®è¦ã§ç¢ºèªãããAIãé ãã®ã§ãåé¡ã«ãã£ã¦ã¯ãã¼ã å¹ ã1ã«çµã£ãããç©´ã®æ°ãæ°ããç¹å¾´éãå¤ãããããã
+24:00 Lightning Divisionçµäºãã©ããããç©´ã®æ°ãã«éããããããã¦ãããã¨ãå¤æãããç©´ããªãã¦ãããããã¯ã®ç©ã¿æ¹ãå ¥ãçµãã å½¢ã«ãªãã¨ã©ããããããªããªãã±ã¼ã¹ã確èªãããå°±å¯ã
+31:00 gitã®ã³ããããã°ã«ããã¨ããã®ããAæ°ãã表é¢ç©ãã空ããã¹ã®ä¸ã«ãããããã¯ã®æ°ããä¸ç«¯ããå§ãã¦ãä¸éã¨å·¦å³ç§»åã ãã§å°éã§ãããã¹ã®æ°ãã®ä¸ã¤ã®ç¹å¾´éãå®è£ ãããããã
+33:00 å¼ãç¶ãè¦ãã¿ãªãããããããããå®è£ ãããç¤é¢ãå¶æ°æ®µã¨å¥æ°æ®µã«åå²ãããã¨ãããããã8x8ã®å°ãããã¯ã«åå²ããåãããã¯ãä¸åã®64ãããæ´æ°ã§è¡¨ç¾ããã¨ããæ¹éã ã£ãããå®è£ ãã²ãããè¦ããã£ãã1次å ã®å¯å¤é·ããããã¯ãã«ãä»ãã¦å®è£ ããæ¹ãè¯ãã£ãã®ã ãããã
+40:00 ã¤ãã«ããããããã®å®è£ ãçµããã表é¢ç©ããããæ¼ç®ã§è¨ç®ã§ããããã«ãªãããé«éåã¯2åã«ãæºããªãã£ããAæ°ã¯ãã¼ã ãµã¼ããè¦éã£ã¦æ°ããæ¢ç´¢ææ³ãå®æããããéºä¼çæ¢ç´¢ãã¨åä»ãã¦ããããã¼ã ãµã¼ããåä¸ã®è©ä¾¡é¢æ°ã使ãã®ã«å¯¾ãããéºä¼çæ¢ç´¢ãã¯ç¹å¾´éã«å¯¾ãã¦æ°ååã®ç°ãªãéã¿ä»ããæã¡ãããããã®éã¿ã«å¾ã£ã¦è¤æ°ã®æè¯åè£ãé¸ã¶ãã¨ã§è§£ã®å¤æ§æ§ã確ä¿ããã¨ããã¢ã¤ãã£ã¢ããããæ¢ç´¢çµäºå¾ã«ã¯éºä¼çã¢ã«ã´ãªãºã ã«åºãã¦æ°ããéã¿ä»ãã®éåãææ¡ãããã説æãèãã¦ãåä¿¡åçã ã£ããããã¼ã ãµã¼ããããçµæãè¯ããããªã®ã§ä»¥éããã使ããã¨ã«ããã
+42:30 ãã¼ã¹ã®ç½®ãæ¹ãä¸é¨éè¤ãã¦çæãã¦ããåé¡ãä¿®æ£ããã¨ãããAIã2åæ©ããªãã
+44:00 表é¢ç©ã®è¨ç®ãã¾ã éãã®ã§ãç¤é¢æ´æ°ã«ãããã¦å·®åãè¨ç®ã§ããããã«ããã
+46:00 AIã®åããè¦ãã¨ãå¿ è¦ããªãã®ã«ç©´ãå¡ãã±ã¼ã¹ãå¤ãããã ã£ããç©´ã®æ°ãæ°ããç¹å¾´éãããã°é²ãããã ããè¨ç®ããã¾ãã«éãã®ã§ç¡å¹ã«ãªã£ã¦ãããä½ãæ¹æ³ã¯ãªããé¦ãã²ãã£ã¦ããã¨ãAæ°ãçªç¶ããªã¤ã©ã¼æ¨æ°ã使ããªããã¨è¨ãã ããèãã¦ã¿ãã¨ã
- é£çµãªå¹³é¢ã°ã©ãã®ãªã¤ã©ã¼æ¨æ°(é ç¹æ°-辺æ°+é¢æ°)ã¯2ã§ãã
- ãªã®ã§ãç¤é¢ã®ãã¡ç©ºç½ã®é ç¹ã¨ããããã®é£æ¥é¢ä¿ãããªãã°ã©ãã®ãªã¤ã©ã¼æ¨æ°ãæ°ããã°é£çµæåã®æ°ãåãã
- é ç¹æ°ã¨è¾ºæ°ã¯ãããæ¼ç®ã§æ°ãããã(å·®åè¨ç®ãã§ãã)ãé¢æ°ã®ãã¡åä½ä¸è§å½¢ã®æ°ã¯ãã¯ããããæ¼ç®ãå·®åè¨ç®ã§æ°ãããããåä½ä¸è§å½¢ã§ãªããã®ã®æ°ã¯ãå¤ç«ãããããã¯ã®éå(島ã¨å¼ã¶)ã®æ°ã«çãã
- 島ã¯æ°¸ç¶Union-findã§ç®¡çããã°å·®åè¨ç®ã§æ°ãæ±ã¾ãï¼
ã¨ããã¢ã¤ãã£ã¢ã ã£ããçºæ³ã«é©åãã¤ã¤æ©éå®è£ ã«ã¨ãããã
+49:00 ã²ã¨ã¨ããå®è£ ãããã®ã®Union-findã®ãã°ãã¨ããªããAæ°ã¯éºä¼çã¢ã«ã´ãªãºã ãèªååãã¤ã¤éã¿è¡åã®æ´æ°ãç¶ãã¦ãããå¾ç¹ãããªãåä¸ãã¦ãããæ示çã«æãã¦ããªãã«ããããããAIãè¤æ°è¡ã®åææ¶ããè¡ãªããããã«ãªã£ãã®ã«é©ããå°±å¯ã
+57:00 ã¤ãã«ãªã¤ã©ã¼æ¨æ°ã使ã£ãç©´ã®æ°ã®è¨ç®ãåããã®ã§ãæºãæãã¦phrases of powerãåãè¾¼ãã³ã¼ããæ¸ãå§ãããæ¹éã¨ãã¦ã¯ãéºä¼çæ¢ç´¢ã§çºè¦ãããã¼ã¹ã®ç½®ãå ´æã¯å¤ããªããã¨ã«ããåãã¼ã¹ãç½®ãæé ãæé©åãããã¨ã«ãããå段ã§å³ãå·¦ã®å¤ãã¨ãä¸æ¹ã«ããåããªããã¨ããå¶ç´ãå ¥ããã¨ãphrases of powerã(å ´åã«ãã£ã¦ã¯è¤æ°ä¸¦åã§)èªèãã¦å¾ç¹ãåºåããæéç¶æ æ©æ¢°ãèãããã¨ã§ãåçè¨ç»æ³ã«ãã£ã¦æé©æé ãè¨ç®ã§ããã®ã§ããããå®è£ ãããã¨ã«ããããã®æ¹æ³ã ã¨phrase of powerãä¸ç¨®é¡ä½¿ããã³ã«ãããã追å ç¹ãæé©åã§ããªãããããããã¾ãæ±ãã®ã¯å¾ã¾ããã«ãããã¨ã«ãããããã¯çµå±æå¾ã¾ã§å®è£ ãããã¨ã¯ãªãã£ãã
+69:00 ã»ã¨ãã©ä¸¸ä¸æ¥ããããåçè¨ç»æ³ã®å®è£ ãçµãããä¾ã«ãã£ã¦é ãã³ã¼ãã§ã"ei!"ã¨ããä¸æåã®phrase of powerã ããèªèããç¶æ ã§ãåé¡0ã«å¯¾ãã¦æ°ç§å¿ è¦ã ã£ããé«éåã試ã¿ããã大ãããã¨ã¯ã§ããªãã£ãã
+70:00 æé管çãå®è£ ãããAIã®ãã©ã¡ã¿1ããå§ãã¦åã ã«ããæéãåããæç¹ã§æåã®ãã®ãåºåããæ¹æ³ãå®è£ ãããå ·ä½çã«ã¯ãéºä¼çæ¢ç´¢ã§ä½¿ãéã¿ä»ãã®æ°ã¨ãåçè¨ç»æ³ã§èæ ®ããphrases of powerã®é·ãã®åè¨ããã©ã¡ã¿ã§å¶å¾¡ã§ããããã«ããããã®éAæ°ã¯phrases of powerãæ¢ãã¦ããããäºé¸åé¡ã®ãããã«åãè¾¼ã¾ãã¦ããä¸ã¤ã¨ãé·å¤§ããã¦è¨ç®ã³ã¹ãã®éã51æåã®ãã®ä»¥å¤ã¯çºè¦ã§ããã«ããã
+71:00 Aæ°ãæåºç¨ã®è§£ãçæãã¦ããéãphrases of powerãæ±ãã¦ã©ã´ã¯ã©ããã®å¼ç¨éãWikipediaã®ã¯ãã¥ã«ãé¢ä¿ã®ãã¼ã¸ãThe H.P. Lovecraft Wikiããã¾ãã£ããçµå±çºè¦ã§ããphraseã¯ä¸åã ãã ã£ãã
+72:00 çµäºãæåºãéã«åããªãã£ãåé¡ãããã¤ããããäºé¸é ä½ã¯66ä½ã ã£ããåé¡17ã¨åé¡19ã§ã¯ä¸ä½ã ã£ãããããã«ã¤ãã¦ã¯ç¹å¥ãªä½ããå®è£ ããããã§ã¯ãªãã®ã§ãéãè¯ãã£ãã ããªã®ã§ã¯ãªããã¨æãã
ææ³
éãã³ã¼ãããã°ãããã«æ¸ããããã«ãªãã¹ãã ã¨æã£ãã