puyoai
æå¿ã§ãã£ã¦ããã·ã AI ä½ã£ãããã¦éã¶ã³ã¼ãã github ã«èµ·ãã¾ããã TODO ãããããã¨ãããããããããã¾ãããããªããªãã®ã§ãã¾ãã¨ããããç½®ãã¦ãããã¨ããâ¦
https://github.com/puyoai/puyoai
人é¡æå¼·ãå®éã®ã²ã¼ã æ©ä¸ã§åããã¨ãç®æ¨ã¨ãã¦ä½ããã¦ã¾ãããèéã¨ãã¦è²ããªã³ã¼ãããã¡ããã¡ãå ¥ã£ã¦ãã¾ãã Linux 㨠Mac ã§åä½ãããã®ãå¤ãã§ãã
duel/duel
ãããã¬ãã«ã§ make ãã¦ãã¾ãããã¨ã§ãã duel/duel 㯠AI vs AI ãã·ãã¥ã¬ã¼ã¿ä¸ã§æ¦ããããã¨ãã§ãã¾ããä¾ãã°
$ ./duel/duel cpu/hamaji/lps.sh cpu/shinyak/run.sh
ãªã©ã¨ã㦠AI å士ã§æ¦ããããã¨ãã§ãã¾ãã
$ PUYO_REALTIME=1 ./duel/duel cpu/hamaji/lps.sh cpu/shinyak/run.sh
ãªã©ã¨ããã¨å¸¸èçãªé度ã§å¯¾æ¦ããããã¨ãã§ãã
$ PUYO_SEED=1 ./duel/duel cpu/hamaji/lps-fast.sh cpu/ichikawa/run.sh
ãªã©ã¨ãã㨠seed ãåºå®ãããã¨ãã§ãã¾ããä»ã®ãªãã·ã§ã³ã¨ãã¦ã¯ãé ã·ããåºå®ãã PUYO_SEQ ããå®æ©åæ§ãã¯ãã¯ãé ãã㦠AI ã«éã PUYO_DELAY_DOUBLE_NEXT (ãããããã©ã«ãã®æåã«ããäºå®)ãªã©ãããã¾ããä»ã®ãªãã·ã§ã³ã¯
$ grep PUYO_ duel/*.cc
ãªã©ã¨ããã¨è¦ã¤ããããããã¾ããã
cpu/*/*.sh
CPU ã¯æ¬ä½ã¨ã¯ç¬ç«ãã¦å®è¡ããã¾ãã CPU ã¯æ¨æºå ¥åºåãéã㦠AI ãèµ°ãããããã°ã©ã (duel/duel ãå¾è¿°ã® capture/connect) ã¨éä¿¡ãã¾ãããããã³ã«ã®ä»æ§ã¯
https://docs.google.com/document/d/1cTIJgRHCBhmxXVtBb45Jm3yAQVaogfVN3oayi-FrA74/edit
ã«ãããéã«æ¸ãã¦ããã¾ããããã®ããã¥ã¡ã³ãããã§ã¯ããããªãä»æ§ããä¸æ£ç¢ºãªé¨åãæ®å¿µãªããå¤ãã§ãã
æå¿ã«ãããããªãã«æ¦ã AI ããä½ãããã§ä½ããããããããã AI ãªã©ãåãã£ã¬ã¯ããªã«æ£ããã£ã¦ãã¾ããæ®å¿µãªããç¾ç¶ã ã¨ãå¼·ããã®ã§ãããããç§ã¨äºè§ã¨ããã®ãããã®å¼·ãããç¡ãæãã§ãããããã³ã«çã«ã¯è¨èªã¯ä½ã§æ¸ãã¦ã大ä¸å¤«ãªã¯ãã§ããã core/ ãã£ã¬ã¯ããªã«ããå®æ°ãã©ã¤ãã©ãªã§ä½¿ãããã®ãããããã C++ ã§æ¸ãã®ãç¡é£ã§ãç¾ç¶ã§ã¯ C++ ã® AI ããããã¾ããã
capture/*
å®éã®ã·ãã·ãã®ã²ã¼ã ã¨æ¥ç¶ããããã®ããããããã¡ãã£ã¨å ¥ã£ã¦ãã¾ãã Wii ã® VCA ä¸ã§ã®ã·ãã·ãã¨æ¥ç¶ãã¦ãã¦ããã®é¨åã®ã³ã¼ã㯠video4linux2 ã«ä¾åãã¦ããä»ã ffmpeg ãã SDL ãããå¿ è¦ã§ãã詳ãã㯠capture/README ãåç §ãã ããã
capture/parse_bmp ã¯åä¸ã®ç»åãèªã¿ã¾ãããããã°ç¨ã
capture/parse_imgs ã¯è¤æ°ã®ç»åãåç»ã¨ãã¦èªã¿ã¾ããç¢å°ã®å·¦å³ã§ã·ã¼ã¯ãã§ããããã«ãªã£ã¦ãã¾ãã
capture/parse_movie 㯠mpg ãªã©ã®åç»ã ffmpeg ã§èªã¿ã¾ãã
capture/parse_viddev 㯠Linux ä¸ã§ãã£ããã£ãã¼ãããåã£ã¦ããçµµãè¦ã¾ããããã使ãã¨äººéå士ã§æ¦ã£ã¦ããæãå¾è¿°ã® capture/commentator ã«ãã£ã¦å®¢è¦³çãªæ å ±ãç¥ããã¨ãã§ãã¾ãã
ãããã¯ãå®æ©ã§äººéã¨å¯¾æ¦ããæ以å¤ã«ããå®ç³ä½ããæ師ãã¼ã¿ãªã©ã«ã使ããã¨èãã¦ãã¾ããä¾ãã°ã ã·ãè DB ã cpu/hamaji ã®è©ä¾¡é¢æ°ãã©ã¡ã¼ã¿èª¿æ´ã¯ããã®ã³ã¼ãã®å身 (cpu/hamaji/parse_movie.cc) ã使ããã¦ãã¾ãã
ã¡ãªã¿ã« windows ã®ã·ãã·ãã¨æ¥ç¶ããæã®(ç§ä»¥å¤ãæ¸ãã)ã³ã¼ããããã«ã¯ããã®ã§ããã®ã¸ããå ¥ãããã¨ããã§ãâ¦
capture/connect
Wii ä¸ã® VCA 㧠AI ã¨äººéã§å¯¾æ¦ããããã®ãã¤ããªã§ãã
$ cd capture $ ./connect /dev/video0 ../cpu/hamaji/lps-fast.sh - | hidmon-mod/puyo
ãªã©ã¨ãã¦å®è¡ãããã¨ãæ³å®ããã¦ã¾ããã Wii ã³ã³ããã¼ã©ã¨æ¥ç¶ãããã¼ãã¦ã§ã¢ãå¿ è¦ãªãããå®éã«å®è¡ããã®ã¯æ¥µãã¦å°é£ã ã¨æãã¾ããä½è«ã§ããããã®ãã¼ãã¦ã§ã¢ã¯ãããéææ¥ã«ãã¼ãã¦ã§ã¢ãå¾æãªäººã«ãã®è©±ããããããããã§ããã¼ãã¨ãè¨ããªãã Wii ã«ã¤ãªã GCA ã³ã³ããã¼ã©ãçºãã¦ãã¦ãææã«ã¯ã³ã³ããã¼ã©ãæã£ã¦å¸°ããã¨ããªãå®æãã¦ãã¦ãè¦ç©ãããé¡ããããç´åããã¦ãã¨ããæãã§ãã«ãã³ãã¼ã¨æãã¾ããã
ä¸å¿ã
$ cd capture $ ./connect test.mp4 ../cpu/hamaji/lps-fast.sh -
ãªã©ã¨ãã¦ãåç»ã®ç¶æ³ã 㨠AI ã¯ã©ãããã®ãâ¦ã¨ããçºãããã¨ã¯ã§ããªãã¯ãªãã§ããããã¾ãæå³ã¯ãªããã¨æãã¾ãã
capture/commentator
capture/parse_* ã capture/connect ã§è¡¨ç¤ºãããç¾ç¶ã®ã·ã対æ¦ç¶æ³ã«å®¢è¦³çãªã³ã¡ã³ãã追å ããããã®ã³ã¼ãã§ãã VCA ã¨æ¥ç¶ããå ´åã¯ããªãæ£ç¢ºã«ç¶æ³ãä¼ãã¦ããã¾ãããåç»ãã½ã¼ã¹ã«ããå ´åãçºç«ã®æ¤ç¥ããã¾ãã§ããªããã¨ãå¤ãã®ã§ãè²ã ã¨ããããªæãã«ãªãã¾ããé ç®ã®æå³ã¯
- æ¬ç·
- 4åã¾ã§ã·ããè£ã£ã¦çºç«ãããé£éã§ãã ãããæå¼·ã®ãã®(é£éæ°ã®å¢ããªãåææ¶ãã®å¢å ã¯èæ ®ããªã)ãã®ã表示ããã¦ã¾ãã赤1ç·1ãªã©ã¯çºç«ã«å¿ è¦ãªã·ãã®ç¨®é¡ã示ãã¦ãã¾ããã·ãã«ãªã¼ãã¼ã¬ã¤ããã¦è¡¨ç¤ºãããæ°åã¯ãé£éçºç«ä¸ã§ãªãæã¯ãã®é£éã®çµè·¯ã示ãã¦ãã¾ãã VCA æ¥ç¶æãåç»åçæãæ£ç¢ºãªã¯ããã§ãã
- çºç«å¯è½æ大é£é
- ãã¯ãã¯ã¾ã§ä½¿ã£ã¦çºç«ã§ããæå¼·ã®é£éã§ããç½®ãã¹ãã¨ããã«âã表示ããã¾ããã大å¤ãããã«ããã§ãã
- çºç«å¯è½æ½°ã
- ãã¯ãã¯ã¾ã§ä½¿ã£ã¦çºç«ã§ããæ½°ãã£ã½ãé£éã§ãããæ½°ãã£ã½ããã®å®ç¾©ã¯é©å½ã§ããç½®ãã¹ãã¨ããã«â³ã表示ããã¾ãããç¥ã
- çºç«ä¸/æçµçºç«
- ä»çºç«ãã¦ããããæå¾ã«çºç«ããé£éã®å¨åã§ããåç»ãã½ã¼ã¹ã«ãã¦ããå ´åã¯ããããã§ãã
- ç©ã¿è¾¼ã¿é度
- PPS 㯠Puyopairs Per Second ã®ç¥ã§ FPP 㯠Frames Per Puyopair ã®ç¥ã§ããé£éãçºç«ãã¦ããæä¸ãã«ã¦ã³ãããã¡ãã£ã¦ããã®ã§ãç¾ç¶ã§ã¯åºç¤ã®ç©ã¿è¾¼ã¿é度ããªãã¨ãªã測ããããã«ãããªã£ã¦ãã¾ããã
- AIã«ããã³ã¡ã³ã
- AI ã MSG= ã使ã£ã¦ã¡ãã»ã¼ã¸ãéã£ãå ´åã表示ããã¾ãã
- ä¸ã®5å
- æ¬ç·ãå¢ããæã¯ä¸ã«è¨é²ããã¦è¡ãã¾ããã¾ããé£éãçºç«ããæã«ãè¨é²ããã¦ããã¾ãã
ããããã¯ãã£ããã«åããã¦èªå解説ã¨ãã§ããã¨ãããªã¼ã¨æã£ã¦ã¾ããããã以åã«è²ã ãããã«ããã®ã¨ãåç»ãã½ã¼ã¹ã¨ããå ´åã«è²ã ããããã§ãâ¦
ã¨ããããæåã®ãã¢ã¨ãã¦ã 2011å¹´Sç´ã®åç»ã«é©ç¨ããæã®ãã®ã Youtube ã«ã¢ãããã¼ããã¦ããã¾ããããã³åã«ãç½®ããã¨æã£ããã©è²ããªå¶éã§ã§ããªãã£ãã®ã§ã¾ãä»åº¦â¦
å±æ
ãããããã¨ã¯ç¡æ°ã«ãã£ã¦å¤¢ãã£ã±ããªæããªãã§ãããã¨ãããã
- duel/duel ã«å¿ è¦ãªä¿®æ£ããã
- AI ãå¼·ããã
- ã·ãè DB ã« 2012 å¹´ S ç´ã®è©¦åãå ¥ãã
- 俺ã AI ä½ã£ã¦ã¿ããã¼ã¨ãã人ãããã°ããã¥ã¡ã³ããæ´åãã
ããããä»ã®ç§ã®ãã¤ãã©ã¤ãªãªãã£ã¿ã¹ã¯ã§ãã俺ã AI ä½ã£ã¦ã¿ããã¼ã¨ãã人ã¯ãªãããã®æ段ã§ç§ã« github ã®ã¢ã«ã¦ã³ãåãæãã¦ãããã°è¶³ãã¾ãã®ã§ããã²éãã§ã¿ã¦ãã ããã
夢ãã£ã±ãã®å 容ã¨ãã¦ã¯
- ã·ã1ã«ã¼ã«ãå®è£ ãã¦ã B ã·ãã«ã¤ãªãã§éã¶
- ãããã¯ã¼ã¯è¶ãã«å¯¾æ¦ã§ãããµã¼ãã¨ãä½ã
- HMD ã¨ã«ã¡ã©ã§ãã·ãã¹ã«ã¦ã¿ã¼ãä½ã£ã¦ãããã£ãã®5é£éããã´ãããã¨ãè¨ã
ãªã©ãä¾ã¨ãã¦ããã¾ãã