Skip to main content

All Questions

3 votes
2 answers
232 views

Tic-tac-toe OOP Minimax Algorithm

I wrote a module that I intend to use in my next tic-tac-toe project. All it is is a class that stores the boardstate along with some methods/properties. The biggest thing is the minimax alg. As shown ...
flakpm's user avatar
  • 97
4 votes
2 answers
144 views

Beginner's attempt at TicTacToe

This is my attempt at making a basic TicTacToe game to play against another human player or a computer controlled opponent. The project was a lot harder for me than I initially thought it would be! I ...
Reslashd's user avatar
2 votes
1 answer
268 views

Minimax method for Tic Tac Toe

I have this program for minimax tic tac toe ...
Abdulahad Ghuman's user avatar
1 vote
2 answers
168 views

Hash game in C optimization

I developed this hash game in C for my college, but i need to optimize this code, can you help me? it works well, but I need it to be a little more organized and faster, the rand function is the only ...
Kant da Silva's user avatar
2 votes
1 answer
276 views

Avoiding nested loops in a TicTacToe algorithm JavaScript

I wrote a quick algorithm that detects a win in a TicTacToe Game. fn game() loops through a simulated ticTacToe board, finds all ...
Ben_Sven_Ten's user avatar
4 votes
4 answers
6k views

Tic Tac Toe in C++ with classes

My first language is Python and I learned considerably a good amount of it. So now I started learning C++. I know the basics of C++ and about classes and inheritance. This is my first serious project ...
Random_Pythoneer59's user avatar
2 votes
1 answer
190 views

How to increase the success rate of my Tic Tac Toe AI that uses the Minimax Algorithm?

this is my first post here! I am working on a Tic Tac Toe AI in Python that uses the Minimax Algorithm to beat either a computer or a normal player. As of now, It has approximately 70% chance of ...
Bubbly's user avatar
  • 121
11 votes
3 answers
2k views

Tic Tac Toe Game using Python

I'm brand-new (just joined today) to code review and I am super excited to share my tic tac toe game code with all of you! Please let me know what I could fix up in my program to make it more ...
fast_and_curious's user avatar
1 vote
1 answer
103 views

A Tic-Tac-Toe AI based on two rules

I made a tic tac toe bot with the following rules (it's not unbeatable): If bot is about to win, it will find the winning move. If bot is about to lose, it will find a move that prevents the other ...
user avatar
5 votes
1 answer
5k views

Minimax algorithm for tic tac toe in Python

I am using minimax algorithm (for now without alpha beta pruning) for AI in tic tac toe game in Python and Numpy. It's working, but very slow, so I would like to optimize it. A few rules for current ...
Michal's user avatar
  • 203
2 votes
0 answers
126 views

Tic Tac Toe game becomes more inefficient as time goes on

I designed a tic tac toe using 4 classes. The game class being the main class, the board class being the board, the player class being the decision making, and the AI class keeping the previous game ...
XTImpossible's user avatar
8 votes
2 answers
2k views

Tic-Tac-Toe Recursive Solver

I am attempting to create a Tic-Tac-Toe game that uses a recursively checks every possible game board, and finds which boards result in a victory for X. (I ultimately plan to turn this into an AI ...
quixotrykd's user avatar
4 votes
1 answer
479 views

C++ Tic Tac Toe Game

I have reached a mini-capstone where I am asked to create a tic tac toe program. I have successfully created the program. What I'd like feedback on is two things: 1. How do I number my columns like I ...
Ryan Hallberg's user avatar
1 vote
1 answer
109 views

Tic Tac Toe Algorithm revisited

I had previously submitted a tic tac toe code. I followed some of the changes suggested. This is my new code. ...
leoOrion's user avatar
  • 387
2 votes
1 answer
618 views

Algorithm for Tic Tac Toe

Currently, I am using an algorithm that finds the best move based on the existing states of the board. Is there a better way to do it? Is there a data structure that I can use? I have also considered ...
leoOrion's user avatar
  • 387

15 30 50 per page