ããæ°å¹´ãã£ã¼ãã©ã¼ãã³ã°ã®åºç¾ããã£ããã«AIãåã³çãä¸ãã£ã¦ããã®ã§ãããããLispã®å¾©æ¨©ããããã¨æãããããªãã®ã§ï¼æ³£ï¼ãå¤å°ãªãã¨ãLispã«èå³ãæã£ã¦ããããããã«ãLispã¨AIã®é¢ä¿ã«ã¤ãã¦ç§è¦ãè¿°ã¹ã¦ãããã¨æããLispã¨ãã£ã¦ãè²ã ãããããã®è¨äºã§ã¯ä¸»ã«Common Lispã®è©±ã«ãªãã
Lispã¨ããã¨ã©ããã¦ãéå»ã®è¨å·å¦ççAIã¨çµã³ã¤ãããã¦ãã¾ããæ©æ¢°å¦ç¿ãé§ä½¿ãããããªç¾ä»£ã®AIã§ã¯å½¹ã«ç«ããªãããã«æãããã¡ãªã®ã ããããã¯å¤§ä½èª¤è§£ã§ãããå°ãªãã¨ãCommon Lispã¯ç¾ä»£çãªAIéçºã«é©ããç¹å¾´ãåãã¦ãããã¾ããAIå®è£ ã®ããã®ããã°ã©ãã³ã°è¨èªã«å¿ è¦ã¨ãããç¹å¾´ã¯ä½ãªã®ããæããã«ããããã«ãAIã®æ´å²ããèãã¦ã¿ããã
AIã®æ´å²
åæã®è¨å·å¦ççAI(以éã¯è¨å·AIã¨å¼ã¶)ã§ã¯LispãPrologãå®è£
è¨èªã¨ãã¦åºãæ¡ç¨ããã¦ããæ´å²ããããè¨å·å¦çã¨ã¯ãã®åã®éãè¨å·ãæä½å¯¾è±¡ã¨ããå¦çã®ãã¨ã§ãå
·ä½çã«ã¯ãã¨ãã¹ãã¼ãã·ã¹ãã ãæ°å¼å¦çãããã°ã©ãã³ã°è¨èªã®ã³ã³ãã¤ã©ãªã©ãè«ççãªæ¨è«ãæ§é ã®å¤æãä¼´ããã®ãå¤ãããããã®è¨å·ãã¼ã¹ã®ãã¼ã¿æ§é ã¯ãªã¹ãã§è¡¨ç¾ããããã¨ãå¤ãã£ãã®ã§ããªã¹ãã®åãæ±ããå¾æã¨ããLispãæ¡ç¨ããã¦ããããã ã*1 è¨å·AIã¯ä¸å®ã®æåãããããããç¾å®ä¸çã®è¤éãªåé¡ã«é©ç¨ãããã¨ããã¨ãã¬ã¼ã åé¡ãè¨å·æ¥å°åé¡ã®å£ã«ã¶ã¡å½ãã£ããçµå±ãå¤å
¸çãªè¨å·AIã§ã¯äºç©ã®ç¹å¾´ãã©ã®ããã«åãåºããæ½è±¡åããé¢é£ä»ããã°ããã®ãããããã©ãã¾ã§ãã£ããããã®ãã¨ãã£ããã¨ã解決ã§ããªãã£ãã®ã ã
ç¾å®ä¸çã§ãé©ç¨å¯è½ãªå¦¥å½ãªã«ã¼ã«ãã¼ã¹ãä½ããããã¨ãé£ãããã¨ãåãã£ã¦ããã®ã§ããã®å¾ã¯å¤§éã®ãã¼ã¿ããããã ã¢ããçã«å¦ç¿ãã¦èªåçã«ç¥è表ç¾ãç²å¾ãã¦ãããã¨ããæµãã«ãªãããã¥ã¼ã©ã«ããããªã©ã®æ©æ¢°å¦ç¿ææ³ãçºéãããæè¿ã®ãã£ã¼ãã©ã¼ãã³ã°ãªã©ã¯ãã®å»¶é·ç·ä¸ã«ããã
æ©æ¢°å¦ç¿ã¯æ°å¤è¨ç®
ã»ã¨ãã©ã®æ©æ¢°å¦ç¿ã®ã¢ã«ã´ãªãºã ã¯ä½ããã®ç®çé¢æ°ãæé©åãããã¨ã«ãã£ã¦å¦ç¿ãå®ç¾ãã¦ãããä¾ãã°ãã¥ã¼ã©ã«ãããã®å¦ç¿ã§ããã°ãã¢ãã«ããã®äºæ¸¬å¤ã¨å®æ¸¬å¤ã®èª¤å·®ãç®çé¢æ°ã¨ãã¦ããã®å¾é (å¾®å)ãåãã誤差ãæå°åãããæ¹åã«ã¢ãã«ãã©ã¡ã¼ã¿ãå°ãåãããã¨ãç¹°ãè¿ãããã®ãã¨ãããåããããã«ãè¨å·AIã®ããã°ã©ãã³ã°ã¯ãªã¹ãå¦çãä¸å¿ã ã£ãã®ã«å¯¾ãã¦ãæ©æ¢°å¦ç¿AIã®ããã°ã©ãã³ã°ã¯æ°å¤è¨ç®ãä¸å¿ã¨ãªããå¾ã£ã¦ãè¤éãªæ°å¤è¨ç®ãããã«ç°¡æ½ã«è¨è¿°ã§ããããã«å¹ççã«è¨ç®ã§ãããããã¢ã«ãªãã
ããé«æ°´æºã«ãããä½æ°´æºã«ã
ã³ã³ãã¥ã¼ã¿ã®æ§è½åä¸ã«ã¨ããªããæçµçãªå®è¡é度ãããéçºå¹çãéè¦ããã¨ãããã¬ã³ããçã¾ãããç 究è
ã¯çæéã§ã¢ã«ã´ãªãºã ãå®è£
ãã¦å®é¨ããå¿
è¦ããããèªç¶ã¨AIåéã§ã¯RãMATLABãPythonãªã©ã®åçã§é«æ°´æºãªè¨èªã«äººæ°ãéã¾ã£ãããããã¯åºæ¬çã«ã¯é次å®è¡ã®ã¹ã¯ãªããè¨èªã§ãããå®è¡é度ã¯é
ãã
ããã«å¯¾ããæ¦ç¥ã¨ãã¦ããããã®è¨èªã§ã¯å¤é¨ã®æ°å¤è¨ç®ã©ã¤ãã©ãªãå¼ã³åºãä½ããã®æ¹æ³ãæã£ã¦ãããå
·ä½çã«ã¯ãè¨ç®å¦çãããç¨åº¦ã¾ã¨ã¾ã£ãåä½ã«ã¾ã¨ãã¦ãCãªã©ã®ä½æ°´æºè¨èªã§æ¸ãããæ°å¤è¨ç®ã©ã¤ãã©ãªã«ã¾ããã¨éãåºããä¾ãã°ãã«ã¼ãã§ãããããªå¦çããã¯ãã«ã«å¯¾ãããããæä½ã¨ãã¦è¨è¿°ããã¨ãããã¯ãã«ã®è¨ç®ãªãã°ãå°åä½ã®ãããå¦çã«ã¾ã¨ãã¦è¡åã®æ¼ç®ã«ç½®ãæãã¦ããå¤é¨ã©ã¤ãã©ãªã«æ¸¡ããªã©ã®ãã¯ããã¯ãç¨ãããã¨ã«ãªãã
ããããã¤ã§ããããã§ããã¨ã¯éããªããä¾ãã°ãªã¢ã«ã¿ã¤ã ã®ãªã³ã©ã¤ã³å¦çã«ã¯åããªãããããããé次å¦çãå¿
è¦ã¨ããå¦ç¿ã¢ã«ã´ãªãºã ã§ã¯ä½¿ããªããããããå ´åã¯çµå±Cãªã©ã§æ¸ãã¦ã³ã³ãã¤ã«ãããã®ãå¼ã³åºãå¿
è¦ãããã*2 ãããªã£ã¦ããã¨ãå®è¡é度ãåºãããã«ã¢ã«ã´ãªãºã ã®é¸æãããã°ã©ãã³ã°ã¹ã¿ã¤ã«ã«å¶ç´ãããããã¨ã«ãªããæ¬æ«è»¢åã¨ãããã¨ã«ãªããããªãã
å®ã¯Common Lispã¯æ°å¤è¨ç®ã«åãã¦ãã
ãã¨ãã¨Lispã®ç¹å¾´ã¨ãã¦ãæè»ã§å¼·åãªæ½è±¡åæ©æ§ãæã¡ãæã¨ãã¦ããã°ã©ãèªèº«ãæ§æããèªç±ã«æ¡å¼µã§ããé«æ°´æºè¨èªã ã¨ãããã¨ããã£ããããã«å ãã¦Common Lispã«ã¯SBCLãªã©ã®ãªã¼ãã³ã½ã¼ã¹ã®é«å質ãªãã¤ãã£ãã³ã³ãã¤ã©ããããCã§æ¸ãããã©ã¤ãã©ãªã«ç°¡åã«ã¢ã¯ã»ã¹ã§ããä»çµã¿CFFIããããããã«æè¿ã§ã¯ã¤ã³ã¿ã¼ãããããã©ã¤ãã©ãªããã¦ã³ãã¼ããã¤ã³ã¹ãã¼ã«ããã¼ãã¾ã§ãä¸è²«ãã¦ããªãã©ã¤ãã©ãªç®¡çã·ã¹ãã Quicklispããå¦çç³»ã®ãã¼ã¸ã§ã³ã管çããããããã¤ãè¡ãªãããã¼ã«Roswellãªã©ãåºã¦ãã¦ããããã便å©ã«ãªãã¤ã¤ããã
ä¸é¨ã§ã¯Lispã¯ã¹ã¯ãªããè¨èªã§é
ãã¦æ°å¤è¨ç®ã«ã¯åããªãã¨ããã¤ã¡ã¼ã¸ãããããã ããSBCLãªã©ã¯JITï¼AOTã§ããï¼ã³ã³ãã¤ã©ã§ããããç¾å¨ã§ã¯ã³ã³ãã¤ã«åè¨èªã®ä¸ã§ããããéãé¨é¡ã«å
¥ãããã®è©±é¡ã®æ¦è¦ã¨ãã¦ã¯ãGaucheä½è
ã®shiroããã®ã¨ã³ããªãã¨ã¦ãåãããããã£ãã
éãã³ã¼ããæ¸ãããã®å ·ä½çãªæ¹æ³è«ã¨ãã¦åèã«ãªãæ å ±æºãããã¤ãæãã¦ããã¨ã
- Cより高速なCommon Lispコードを書く - 八発白中
- 最適化 - Common LISP users jp
- æ¸ç±ã§ããã°PAIPãã¨実用Common Lispã®9〜10ç«
Common Lispãéãã®ã¯ãåçè¨èªã«ãé¢ããããæé©å宣è¨ã¨å宣è¨ããªãã·ã§ã³ã¨ãã¦ä»ãããã¨ãã§ããããã ãåçè¨èªãé ãã¨è¨ãããã®ã¯ã主ã«ãªãã¸ã§ã¯ãã®åæ å ±ãå®è¡æã«å¤å®ããå¿ è¦ãããããã§ã極端ãªè©±ãå ¨ã¦ã®å¤æ°ã«å宣è¨ãä»ãã¦ãæé©å宣è¨ã§å®è¡æã®åãã§ãã¯ãåãã°ãCommon Lispã³ã³ãã¤ã©ã¯Cã¨ã»ã¼åçã®ãã¤ãã£ãã³ã¼ããåãåºããããã«ããããã®å®£è¨ã¯ããããã¬ãã«ã§ä»ãããã¨ãã§ããã®ã§ãé¢æ°åä½ããããã¯åä½ã§ãæ¬å½ã«å¿ è¦ãªé¨åã«ã®ã¿éä¸ãã¦æé©åãããã¨ãã§ããã
ããã¦ãå¾ã ã«ãã¦ãã®ãããªããã«ããã¯ã¯ããã°ã©ã å ¨ä½ã®ããä¸é¨ã«ãããªãã大æµã®Common Lispå¦çç³»ã«ã¯ããããã¡ã¤ã©ã¨ãããããã°ã©ã ã®ã©ãã®é¨åã«è¨ç®æéãå²ããã¦ãããã調ã¹ããã¼ã«ãä»ãã¦ãããããã«ããã¯ãæ¢ãã®ã«å½¹ã«ç«ã¤ãã¾ããã³ã³ãã¤ã«ããé¢æ°ãåå¥ã«ãã£ã¹ã¢ã»ã³ãã«ãããã¨ãã§ãããã¢ã»ã³ããªã³ã¼ããè¦ããã¨ã«ãã£ã¦ãå®è¡æã®åå¤æãã©ãã§èµ·ãã£ã¦ãããããã¡ã¢ãªã¢ãã±ã¼ã·ã§ã³ãã©ãã§çºçãã¦ããããªã©ãåããã®ã§ãããããã¥ã¼ãã³ã°ã®ææããã«ãªãã*3
以ä¸ãã¾ã¨ããã¨ãCommon Lispã®éçºãµã¤ã¯ã«ã¯ä»¥ä¸ã®ããã«ãªãã
- åçã§é«æ°´æºãªè¨èªæ©è½ã使ã£ã¦è¿ éã«ãããã¿ã¤ãã³ã°ãã
- ãããã¡ã¤ãªã³ã°ã§ããã«ããã¯ãæ¢ã
- æé©å宣è¨ãå宣è¨ãä»ãã¦ã³ã³ãã¤ã«
- ãã£ã¹ã¢ã»ã³ãã«ãã¦ãã¤ãã£ãã³ã¼ããè¦ãªããæé©å
ãããå ¨ã¦ãéçºç°å¢ã®ä¸ããåºããã¨ãªãã対話çã«è¡ããã¨ãã§ãããããã«ããéçºãµã¤ã¯ã«ãçãã試è¡é¯èª¤ã§ããåæ°ãå¤ããªããçµæã¨ãã¦æé©ãªã¢ã«ã´ãªãºã ãè¦ã¤ãåºããã£ã³ã¹ãå¢ãããå¾ã ã«ãã¦ãCommon Lispã§Cãããéãã³ã¼ããæ¸ãããã¨ããã®ã¯ãæé«é度ã®ãã¨ã¨ããããã¯ããã®éçºãµã¤ã¯ã«èªä½ã®å¹çæ§ãé«ããã¨ã示ãã¦ããã
å¿ è¦ãªãå¤é¨ã®æ°å¤è¨ç®ã©ã¤ãã©ãªã«ãã¢ã¯ã»ã¹ã§ãã
Common Lispã¯ããèªä½ã§éãã¨ã¯ããã巨大ãªè¡åå士ã®æãç®ã®ããã«ããã«ãã³ã¢CPUãGPUã®æ§è½ã極éã¾ã§å¼ãåºãããã¨ãã«ã¯å¤é¨ã©ã¤ãã©ãªã«é ¼ããã¨ã«ãªããCFFIçµç±ã§æ¯è¼çç°¡åã«Cã®å ±æã©ã¤ãã©ãªããé¢æ°ãå¼ã¶ãã¨ãã§ãããã主ãªæ°å¤è¨ç®ã©ã¤ãã©ãªã«ã¯ã©ããã¼ã©ã¤ãã©ãªãåå¨ãããIntel MKLãOpenBLASã®ã©ããã¼ã©ã¤ãã©ãªã¨ãã¦ã¯LLAããããCUDAã«ããè¡åè¨ç®ã®ã©ããã¼ã©ã¤ãã©ãªã¨ãã¦ã¯MGL-MATãããã
- Common Lispで行列演算: LLA(Lisp Linear Algebra)を使う - 翡翠はコンピュータに卵を生むか
- Common Lispで行列演算(2): MGL-MATを使う - 翡翠はコンピュータに卵を生むか
æ°å¤è¨ç®ã©ã¤ãã©ãªã«æããå¾ã®å¦çã¯Pythonã®Numpyãªã©ã¨åããªã®ã§ããã§ã®é度差ã¯ãã¾ããªãããFFIã®é¨åã§Common Lispã®æ¹ãè¥å¹²éããªãã
ç´ ã®Common Lispã®éããããã°ãæ©æ¢°å¦ç¿ã§æãè¨ç®è½åãå¿ è¦ã¨ããå¦ç¿æã«ã¯å¤é¨ã®æ°å¤è¨ç®ã©ã¤ãã©ãªã使ããäºæ¸¬æã«ã¯ãã¥ã¢Common Lispã®ã¿ã使ãã¨ããé¸æè¢ãåããããã«ãªãããããããã¨ã§ã¢ããªã±ã¼ã·ã§ã³ã¨ãã¦é å¸ããã¨ãã®å¤é¨ã®ä¾åã©ã¤ãã©ãªãæ¸ãã移æ¤æ§ãå¢ããã¨ãã§ããã
Common Lispã®æ©æ¢°å¦ç¿ã©ã¤ãã©ãª
Common Lispã®æ©æ¢°å¦ç¿ã©ã¤ãã©ãªã¯æ°ã¯ãã¾ãç¡ããã®ã®ãéè¦ãªã¨ããã¯æãã¦ãããããªæ°ããããã¨ã¯ããã¾ã ã¾ã å°ãªãã®ã§æ°è¦åå ¥è æ±ãï¼
- CLML https://github.com/mmaul/clml
- ãã¨ãã¨æ°çã·ã¹ãã ã§éçºããã¦ããæ©æ¢°å¦ç¿ã¢ã«ã´ãªãºã ã®ã³ã¬ã¯ã·ã§ã³ã ããä»ã¯å¥ã®æ¹ã«ãã£ã¦ã¡ã³ããã³ã¹ããã¦ãããã·ã¹ãã å®ç¾©ãASDFã«ç´ãããã¤ã³ã¹ãã¼ã«ãç°¡åã«ãªã£ãã
- 主ãªå®è£
ã¢ã«ã´ãªãºã
- PCA(主æååæ)ãNMF(éè² å¤è¡åå åå)ã決å®æ¨ãã©ã³ãã ãã©ã¬ã¹ããSVMãkNNãªã©
- clml-svm https://github.com/masatoi/clml-svm
- CLMLããSVMã ãæãããã®ã解説è¨äº clml-svmの紹介 - 翡翠はコンピュータに卵を生むか
- MGL https://github.com/melisgl/mgl
- 2014å¹´ã®Kaggleã®æ©æ¢°å¦ç¿ã³ã³ãåªåè ã«ãããã£ã¼ãã©ã¼ãã³ã°ã®å®è£ ã§CUDAã«å¯¾å¿ãã¦ããã
- å®è£ ã¢ãã«
- å®è£
ã¢ã«ã´ãªãºã
- ã¢ã¼ã¡ã³ã¿ã SGDãADAMãDropoutãMaxoutãªã©
- 解説è¨äº Common Lispによる深層学習ライブラリMGL - 翡翠はコンピュータに卵を生むか
- cl-online-learning https://github.com/masatoi/cl-online-learning
- èªä½ã®ç·å½¢åé¡å¨ã®ã³ã¬ã¯ã·ã§ã³ãAROW++ãLIBLINEARããéãã精度ãåºãã®ã§ãªã¹ã¹ã¡ã
- å®è£
ã¢ã«ã´ãªãºã
- ãã¼ã»ãããã³ããã¸ã¹ãã£ãã¯å帰+ADAMãAROWãSCWãªã©ãäºå¤åé¡ããã«ãã¯ã©ã¹åé¡(1vs1ã1vsRest)
- ãã¼ã¿ã¯å¯ãã¯ãã«ãçãã¯ãã«ä¸¡å¯¾å¿ã
- 解説è¨äº Common Lispによる線形分類器ライブラリcl-online-learningを書いた - 翡翠はコンピュータに卵を生むか
- cl-random-forest https://github.com/masatoi/cl-random-forest
- èªä½ã®ã©ã³ãã ãã©ã¬ã¹ãã®å®è£ ãã©ã³ãã ãã©ã¬ã¹ãå¦ç¿å¾ã«ç·å½¢åé¡å¨ã«ããåå¦ç¿ããããã¨ã§ããæ§è½ã伸ã°ãææ³ãå®è£ ãã¦ããã
- 解説è¨äº cl-random-forest: Common Lispで高性能なランダムフォレストを実装した
ã¾ã¨ã
- æ©æ¢°å¦ç¿AIã«æ±ãããã¦ããã®ã¯è¿ éã«éçºã§ãã¦ããªããã¤å®è¡é度ãéããã¨
- Common Lispã¯åºæ¬çã«ã¯é«æ°´æºè¨èªã ããããã«ããã¯ã«ãªã£ã¦ããã¨ãããéä¸çã«æé©åãããã¨ãã§ããã®ã§ãä½æ°´æºè¨èªã¨ããå´é¢ãæã¤
- ã¢ã«ã´ãªãºã é¸æã®èªç±åº¦ãé«ããã»ã¨ãã©ã®å¦çãCommon Lispå ã§å®çµã§ããã®ã§ãå®è¡é度ã¨éçºå¹çã®ãã©ã³ã¹ãåãããã
- æ¬å½ã«éãå¦çã¯å¤é¨ã©ã¤ãã©ãªã«æãããã¨ãã§ãã
- æ©æ¢°å¦ç¿ã©ã¤ãã©ãªãä¸å¿æã£ã¦ã
- æ°è¦åå ¥ãããï¼
*1:Lispã®ç±æ¥ã¯ãªã¹ãå¦ç(LISt Processing)ããæ¥ã¦ããã¨ãã話ããã
*2:ä¸å¿ãPythonã§ããã°Cythonãªã©ã®ãã¤ãã£ãã³ã¼ãã«ã³ã³ãã¤ã«ããä»çµã¿ãããã
*3:ä¾ãã°ãæ°ãã«ãªãã¸ã§ã¯ããçæãã¦è¿ããããªã³ã¼ãã¯ãçµæååãç¨ã®å¤æ°ãå¼æ°ã¨ãã¦ä¸ãã¦ããã«ä»£å ¥ãããã°ã¡ã¢ãªã¢ãã±ã¼ã·ã§ã³ã¯çºçãããã¬ãã¼ã¸ã³ã¬ã¯ã·ã§ã³ã®æéãåæ¸ã§ããã