Skip to content

TicTacToe winning confition fix & ShowBoard function readability improvement#25

Open
ubiieta wants to merge 1 commit intoMJeremy2017:masterfrom
ubiieta:tictactoe-fix
Open

TicTacToe winning confition fix & ShowBoard function readability improvement#25
ubiieta wants to merge 1 commit intoMJeremy2017:masterfrom
ubiieta:tictactoe-fix

Conversation

@ubiieta
Copy link
Copy Markdown

@ubiieta ubiieta commented Jun 30, 2025

This pull request includes two main improvements to the TicTacToe reinforcement learning implementation:

  1. Fix to winner() function:

    • Corrects a bug where diagonal wins (both directions) were not properly detected for the human player.
    • Now the agent correctly announces a win when the human player completes a diagonal line.
  2. Update to showBoard() function:

    • Board cells now display a unique number (1–9) instead of requiring both row and column input.
    • Simplifies gameplay: users now input a single number to choose a move.

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

Successfully merging this pull request may close these issues.

1 participant