DragonWarrior15 / othello-rl

0 stars 1 forks source link

Board representation method #4

Closed guitarremote closed 4 years ago

guitarremote commented 4 years ago

Added board representation method in Game Env and corrected transition list

guitarremote commented 4 years ago

Run the rough work part

On Wed, Mar 18, 2020 at 1:29 PM Vaibhav Ojha notifications@github.com wrote:

@DragonWarrior15 commented on this pull request.

In game_env.py https://github.com/DragonWarrior15/othello-rl/pull/4#discussion_r394161317 :

  • s2_nd = self._converter.convert(s[1], input_format='bitboard_single', output_format='ndarray')
  • legal_moves_nd = self._converter.convert(legal_moves, input_format='bitboard_single',\
  • output_format='ndarray')
  • a_nd = self._converter.convert(a, input_format='bitboard_single', output_format='ndarray')
  • next_s1_nd = self._converter.convert(next_s[0], input_format='bitboard_single',\
  • output_format='ndarray')
  • next_s2_nd = self._converter.convert(next_s[1], input_format='bitboard_single',\
  • output_format='ndarray')
  • next_legal_moves_nd = self._converter.convert(next_legal_moves, input_format='bitboard_single',\
  • output_format='ndarray')
  • nd_list = [s1_nd, s2_nd, legal_moves_nd, a_nd, next_s1_nd, next_s2_nd, next_legal_moves_nd]
  • transition_dict = {}
  • transition_dict['normal_bottom'] = transition_list
  • self._nd_trans_fn = {'normal_left': lambda x: np.rot90(x, 1),

Also add diagonal and anti diagonal filps here, after all the transitions, we also need to see which of this modifications are resulting in the same board, we might be able to avoid some operations this way

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/DragonWarrior15/othello-rl/pull/4#discussion_r394161317, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFNNEKMZ53NKIYYOA6ZKFZTRIB5MJANCNFSM4LMQ6OAA .