This project is a React-based implementation of Tic-Tac-Toe, developed as part of my learning journey in frontend development and the CS4006 Intelligent Systems module. It's designed to showcase concepts related to the min-max algorithm used in game theory and AI. One of variable is intensionaly incorrect, since i tried to play around with some stuff, I will fix it, later... :)
- Classic Tic-Tac-Toe gameplay for two players
- React-based user interface
- Display of game state and move history
- Calculation and display of metrics used in min-max algorithm:
- Number of winning ways for each player
- Difference in covered positions between players
- Open positions count
App.js
: Main game logic and React componentsSquare
: Individual game board squareBoard
: Game board and state displayGame
: Overall game management and history
index.js
: Entry point for the React application
calculateWinner
: Determines if there's a winnercountWinningWays
: Calculates potential winning moves for a playercountOpen
: Counts open positions on the board
This project helped me understand React state management, component interaction, and basic game theory concepts used in AI. It served as a practical application of the theoretical knowledge gained in the CS4006 Intelligent Systems module.
I achieved a grade of B1 in the CS4006 Intelligent Systems module.
This is a learning project and not intended for production use. It demonstrates basic concepts and may not include advanced features or optimizations.