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

Investigate bug in MainBoard #8

Closed
VictorDarvariu opened this issue May 29, 2017 · 1 comment
Closed

Investigate bug in MainBoard #8

VictorDarvariu opened this issue May 29, 2017 · 1 comment

Comments

@VictorDarvariu
Copy link
Member

MainBoard erroneously reports opponent's move being on an invalid board, even though the sequence of moves is valid:

[jerky@neptun ultimate-ttt-py]$ uabc --host localhost:3141 -t bar --verbose -f "python3 samples/random_player_wrapper.py"
+----------------------------------+
| Ultimate Algorithm Battle |
+----------------------------------+

Waiting for server...

Connected!
[00:40:17 server] init
[00:40:17 server] waiting
[00:40:17 server] opponent 2,2;2,1
[00:40:17 player] 2,1;1,1

[00:40:17 server] opponent 1,1;1,2
Error: Traceback (most recent call last):
File "samples/random_player_wrapper.py", line 12, in
main()
File "samples/random_player_wrapper.py", line 7, in main
random_player.process_input(line.strip())
File "/usr/local/lib/python3.4/dist-packages/ultimate_ttt_player/ultimate_ttt_player.py", line 67, in process_input
self.add_opponent_move(board_coords, opponent_move)
File "/usr/local/lib/python3.4/dist-packages/ultimate_ttt_player/random_player.py", line 22, in add_opponent_move
self.game = self.game.add_opponent_move(board, opponent_move)
File "/usr/local/lib/python3.4/dist-packages/ultimate_ttt/main_board.py", line 95, in add_opponent_move
return self._add_move(board_coords, PlayerMove(Player.OPPONENT, move))
File "/usr/local/lib/python3.4/dist-packages/ultimate_ttt/main_board.py", line 178, in _add_move
raise MoveNotOnNextBoardError(board_coords, self._next_board_coords)
ultimate_ttt.errors.MoveNotOnNextBoardError
client> child process exited with code 1
Connection lost!

This indicates a problem either with the MainBoard or the player itself.

@VictorDarvariu
Copy link
Member Author

Fixed - issue was with how the player itself tracked state.
Addressed in f/randomplayerimprovements branch.

Can be closed after branch is merged.

reddyalready added a commit that referenced this issue May 30, 2017
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

1 participant