junxiaosong / AlphaZero_Gomoku

An implementation of the AlphaZero algorithm for Gomoku (also called Gobang or Five in a Row)
MIT License
3.25k stars 965 forks source link

tensorflow #76

Open PegasusLjj opened 5 years ago

PegasusLjj commented 5 years ago

用tensorflow训练模型后如何与之进行对弈呢?我是机器学习初学者,非常希望您能赐教一下,非常感谢

junxiaosong commented 5 years ago

可以用human_play.py加载模型进行对弈,用tensorflow的话需要注释和反注释几行,可以看下文件中的注释

PegasusLjj commented 5 years ago

非常感谢!!!

PegasusLjj commented 5 years ago

可不可以再请问一下怎样使训练出来的AI自对弈呢?

junxiaosong commented 5 years ago

两个AI对弈也可以用human_play.py里的代码,只是需要创建两个MCTSPlayer分别加载两个AI模型,然后调用game.start_play即可;如果是要一个AI自己和自己打的话则只需要创建一个MCTSPlayer,然后调用game.start_self_play函数即可

PegasusLjj commented 5 years ago

多谢解答