Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What is the purpose of getSymmetries? #258

Open
pavolkacej opened this issue Nov 21, 2021 · 3 comments
Open

What is the purpose of getSymmetries? #258

pavolkacej opened this issue Nov 21, 2021 · 3 comments

Comments

@pavolkacej
Copy link
Contributor

pavolkacej commented Nov 21, 2021

I have read the commentary

symmForms: a list of [(board,pi)] where each tuple is a symmetrical
form of the board and the corresponding pi vector. This
is used when training the neural network from examples.

But how to implement that function? If my Chess game has 2d board, is just horizontal symmetry enough, or should I always return 8 tuples, each for one symmetry? I have observed this from implemented games, but is it a general rule?

In which order should be these symmetries coming? I am lacking these information.
Do I understand it correctly, that vector pi incoming to the function has non-zero values at positions, that are "legal" moves?

@TheMessik
Copy link

@pavolkacej did you manage to figure this out?

@pavolkacej
Copy link
Contributor Author

pavolkacej commented Dec 14, 2021

Hi @TheMessik I took a look how did Othello implement this. And implemented it the same way. Maybe you can try to run current code from repository, and put breakpoint into the getSymmetries method. Do some debugging (Pycharm can do it). Take a look into inputs and outputs of the method.
I guess getSymmetries is used to rotate existing board and pi, so you will have more training data to be provided to model.

I believe you can train without adding these symmetries to training data. Just use your original dataset if you want to avoid this.
It just provides more samples for training. Good luck!

@TheMessik
Copy link

@pavolkacej
I've seen in another thread that for chess I can just return the board passed as an argument. It seems to be working, but I haven't been able to write a network without spitting errors. I am basing my code on your fork.

Would you maybe like to hop on call or just have a look at my code to see where it might go wrong? This is my first experience with RL en NN in general, so I don't exactly know what precisely I'm doing atm...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants