maxpumperla / deep_learning_and_the_game_of_go

Code and other material for the book "Deep Learning and the Game of Go"
https://www.manning.com/books/deep-learning-and-the-game-of-go
987 stars 390 forks source link

chapter 12 how to play the ac-agent #64

Closed activate-an closed 4 years ago

activate-an commented 4 years ago

When I get ac-agent through reinforcing learning, how can i play it, i see a web-demo in chapter-8,but what i can add in the behind "http://127.0.0.1:5000/" . for example, i can add "static/play_predict_19.html" in the behind "http://127.0.0.1:5000/" to play with the predict-agent.

maxpumperla commented 4 years ago

you can add a bot in static, as you already figured out, e.g.:

https://github.com/maxpumperla/deep_learning_and_the_game_of_go/blob/master/code/dlgo/httpfrontend/static/play_pg_99.html#L214

in this example the bot name is pg. you register this map by putting the key pg in the bot map, like here:

https://github.com/maxpumperla/deep_learning_and_the_game_of_go/blob/0797b3eef3c74f6be0a0ed39c719767978ef9f55/code/web_demo.py#L24

you can do this with your own bots in the same way

activate-an commented 4 years ago

I know ,You mean I need to add a bot in static by myself @maxpumperla Is that right?

maxpumperla commented 4 years ago

yes, exactly! if it helps, try to remove one of the existing once and then put them back in to get a feeling for how it works.