-
大小: 35.29MB文件類型: .zip金幣: 1下載: 0 次發布日期: 2023-08-08
- 語言: Python
- 標簽:
資源簡介
Tensorflow仿AlphaGo框架實現的AI圍棋程序
代碼片段和文件信息
#include?
#include?
#include?
#include?“util.hpp“
static?Pyobject*?get_liberty(Pyobject*?self?Pyobject*?args)
{
????const?char?*str;
????int?board_mtx[19][19];
????if?(!PyArg_ParseTuple(args?“s“?&str))
????????return?NULL;
????str2mtx(str?(int*)board_mtx);
????int?liberty_feature[16][19][19];
????memset(liberty_feature?0?16*19*19*sizeof(int));
????
????get_liberty_feature(board_mtx?liberty_feature);
????//?for?(int?i?=?0;?i8;?i++)
????//?{
????//?????std::cout<“white?liberty?“?<????//?????print_mtx((int*)(liberty_feature+8+i));
????//?}
????char?ret_str[16*361*2+1];
????mtx2str(ret_str?(int*)liberty_feature?16*19*19);
????return?Py_BuildValue(“s“?ret_str);
}
static?PyMethodDef?GofeatMethods[]?=?{
????{“get_liberty“??get_liberty?METH_VARARGS
?????“Test?by?random?function“}
????{NULL?NULL?0?NULL}???
};
static?struct?PyModuleDef?gofeatmodule?=?{
????PyModuleDef_HEAD_INIT
????“gofeat“???/*?name?of?module?*/
????NULL?/*?module?documentation?may?be?NULL?*/
????-1???????/*?size?of?per-interpreter?state?of?the?module
?????????????????or?-1?if?the?module?keeps?state?in?global?variables.?*/
????GofeatMethods
};
PyMODINIT_FUNC
PyInit_gofeat(void)
{
????return?PyModule_Create(&gofeatmodule);
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2019-03-18?03:39??JoshieGo-master\
?????文件????????1281??2019-03-18?03:39??JoshieGo-master\.gitignore
?????文件????????1562??2019-03-18?03:39??JoshieGo-master\README.md
?????目錄???????????0??2019-03-18?03:39??JoshieGo-master\clib\
?????文件????????1343??2019-03-18?03:39??JoshieGo-master\clib\gofeat.cpp
?????文件?????????347??2019-03-18?03:39??JoshieGo-master\clib\setup.py
?????文件????????2312??2019-03-18?03:39??JoshieGo-master\clib\test.py
?????文件????????2945??2019-03-18?03:39??JoshieGo-master\clib\util.hpp
?????目錄???????????0??2019-03-18?03:39??JoshieGo-master\src\
?????文件????????7089??2019-03-18?03:39??JoshieGo-master\src\MCTS.py
?????文件????????4514??2019-03-18?03:39??JoshieGo-master\src\SGFparser.py
?????文件????????9805??2019-03-18?03:39??JoshieGo-master\src\game.py
?????文件????????2233??2019-03-18?03:39??JoshieGo-master\src\input.py
?????文件????????3765??2019-03-18?03:39??JoshieGo-master\src\play.py
?????文件???????11598??2019-03-18?03:39??JoshieGo-master\src\policy_net.py
?????文件???????11804??2019-03-18?03:39??JoshieGo-master\src\value_net.py
?????目錄???????????0??2019-03-18?03:39??JoshieGo-master\trained_models\
?????文件????19835924??2019-03-18?03:39??JoshieGo-master\trained_models\policy.data-00000-of-00001
?????文件????????6965??2019-03-18?03:39??JoshieGo-master\trained_models\policy.index
?????文件?????1402082??2019-03-18?03:39??JoshieGo-master\trained_models\policy.me
?????文件????19828012??2019-03-18?03:39??JoshieGo-master\trained_models\value.data-00000-of-00001
?????文件????????7410??2019-03-18?03:39??JoshieGo-master\trained_models\value.index
?????文件?????1585110??2019-03-18?03:39??JoshieGo-master\trained_models\value.me
評論
共有 條評論