ghostmkg / programming-language

You write code in any programming language you want. And push the code.
33 stars 79 forks source link

hexGame - AI #89

Closed Dipu2552003 closed 17 hours ago

Dipu2552003 commented 1 day ago

Hex is a two-player strategy game played on a hexagonal grid, where players take turns placing pieces on the board. The objective is to connect opposite sides of the board with a continuous path of one's pieces. In this implementation, one player is a human, while the other player is controlled by a simple AI.

Game Mechanics: Game Board:

The game is played on an N x N hexagonal board (commonly 11x11). Each cell can be empty, occupied by player 1's pieces ('X'), or occupied by player 2's pieces ('O'). Players:

Player 1 (Human): The human player selects a cell to place their piece. Player 2 (AI): The AI player uses a basic strategy to select a valid move. Initially, the AI may choose random valid cells to place its pieces.