Skip to content

Comments

refactor(examples): add type hints to tic_tac_toe_qlearner#1411

Merged
lanctot merged 2 commits intogoogle-deepmind:masterfrom
SH20RAJ:refactor/tic-tac-toe-types
Jan 13, 2026
Merged

refactor(examples): add type hints to tic_tac_toe_qlearner#1411
lanctot merged 2 commits intogoogle-deepmind:masterfrom
SH20RAJ:refactor/tic-tac-toe-types

Conversation

@SH20RAJ
Copy link
Contributor

@SH20RAJ SH20RAJ commented Dec 18, 2025

refactor(examples): add type hints to tic_tac_toe_qlearner

Added type hints to the following functions:

  • pretty_board
  • command_line_action
  • eval_against_random_bots
  • main

Cleaned up imports and improved docstrings.
Verified by running the script locally.

@lanctot
Copy link
Collaborator

lanctot commented Dec 18, 2025

Thanks! (for all the PRs).

On type hints: we didn't have them for a long time because the minimum Python version we supported dated back to before type hints were common. Very happy to add them so long as the minimum version that we supports them (we're currently >= 3.10).

I remember there was a switch for some things like dict vs. typing.Dict and list vs. typing.List but I think we're past that now with >= 3.10.

@lanctot lanctot added imported This PR has been imported and awaiting internal review. Please avoid any more local changes, thanks! merged internally The code is now submitted to our internal repo and will be merged in the next github sync. labels Jan 13, 2026
@lanctot lanctot merged commit 3b2ac80 into google-deepmind:master Jan 13, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

imported This PR has been imported and awaiting internal review. Please avoid any more local changes, thanks! merged internally The code is now submitted to our internal repo and will be merged in the next github sync.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants