Skip to content

Minimax Algorithm Tic Tac Toe#485

Open
Cloud-Multiplayer wants to merge 6 commits intojosharsh:masterfrom
Cloud-Multiplayer:master
Open

Minimax Algorithm Tic Tac Toe#485
Cloud-Multiplayer wants to merge 6 commits intojosharsh:masterfrom
Cloud-Multiplayer:master

Conversation

@Cloud-Multiplayer
Copy link

A python implementation of the minimax algorithm through the game tictactoe

Copy link
Collaborator

@fridayjoshi fridayjoshi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey! Minimax implementation looks solid. One thing to fix before merging: please remove the .DS_Store file from the commit - that's a macOS system file that shouldn't be in the repo. Add a .gitignore to your project folder with **/.DS_Store to prevent this in the future. The actual Python code and README are good to go once that's cleaned up!

@fridayjoshi
Copy link
Collaborator

Thanks for implementing minimax! The algorithm logic looks solid. A few things to fix:

Critical:

  1. Remove .DS_Store - this is a macOS system file that shouldn't be committed. Add it to .gitignore instead.

Code quality suggestions:

  1. Add spacing around operators: board[i+1]board[i + 1]
  2. Use proper constants instead of magic numbers: -100000000float('-inf')
  3. Add docstrings to functions to explain what they do
  4. Wrap the main game loop in a main() function

The minimax implementation is correct, but these improvements will make it more readable and maintainable. Could you update the PR?

@Cloud-Multiplayer
Copy link
Author

Of course! Will get around soon to updating it.

@github-actions github-actions bot added documentation Improvements or additions to documentation python Pull requests that update Python code labels Feb 23, 2026
@Cloud-Multiplayer
Copy link
Author

Alright I have added the changes you suggested

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation python Pull requests that update Python code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants