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

Question about symmetries #32

Closed
smart-fr opened this issue Jan 22, 2021 · 2 comments
Closed

Question about symmetries #32

smart-fr opened this issue Jan 22, 2021 · 2 comments

Comments

@smart-fr
Copy link

smart-fr commented Jan 22, 2021

Hello!
Not an issue but a question regarding GameInterface.symmetries (cf the documentation):

symmetries(::Type{G}, state) where {G <: AbstractGame}
Return the vector of all pairs (s, σ) where:

  • s is the image of state by a nonidentical symmetry
  • σ is the associated actions permutation, as an integer vector of size num_actions(Game).

When applying to the game g with state state1 and actions mask actions_mask1 the symmetry corresponding to a given (state2, σ) pair, I suppose AlphaZero.jl affects state2 as the new state of g and determines the updated actions mask actions_mask2 according to one of the following propositions, but which one?

  1. actions_mask2[action_index] == actions_mask1[σ(action_index)]
  2. actions_mask2[σ(action_index)] == actions_mask1[action_index]

In other words, how is the permutation supposed to be used?
(Does it really matters in the end? ;-)

@jonathan-laurent
Copy link
Owner

Very good question! I should disambiguate in the documentation indeed.
The answer is 1.

@smart-fr
Copy link
Author

Thank you!

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