Kotlin / kotlindl

High-level Deep Learning Framework written in Kotlin and inspired by Keras
Apache License 2.0
1.43k stars 102 forks source link

Dual head network like AlphaZero #560

Open b0n541 opened 1 year ago

b0n541 commented 1 year ago

I would like to use KotlinDL to create a AlphaZero like dual head network for my game.

Unfortunately I haven't found any hint on how to accomplish that.

Is this already possible or would it be a new feature to be implemented?

zaleslaw commented 1 year ago

Hi @b0n541 if you want to create an AlphaZero, could you please share some notes about Keras/PyTorch implementation for that model?

Probably after that I could say more about is it possible or not

b0n541 commented 1 year ago

I have found the following information:

https://medium.com/applied-data-science/alphago-zero-explained-in-one-diagram-365f5abf67e0 https://github.com/deepmind/open_spiel/blob/master/docs/alpha_zero.md#model https://github.com/deepmind/open_spiel/blob/master/open_spiel/python/algorithms/alpha_zero/model.py

What we would need is a way to split the network after the first couple of layers into two stacks of following layers with dedicated outputs for the game value prediction and the move prediction.

EgoLLC commented 1 month ago

Do you mean reinforcement learning?

Can I implement reinforcement learning in Kotlin DL to play chess or any other 1v1 board game where the model will play against itself?