Skip to content
markub3327Public

About

A multi-agent Tic-Tac-Toe environment built with PettingZoo for AI experimentation.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

45 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tic-Tac-Toe

Preview

Tic-Tac-Toe is a simple turn-based strategy game for two players, X and O. Players take turns marking empty spaces on a 3×3 grid, aiming to create a line of three of their symbols.

A player wins by placing three identical marks in a row, either horizontally, vertically, or diagonally. If all spaces on the board are filled and neither player has formed a winning line, the game ends in a draw.

Features

  • Two-player gameplay
  • 3×3 game board
  • Win detection for rows, columns, and diagonals
  • Draw detection
  • Reward-based outcome system

Rewards

The game uses the following reward scheme:

Outcome Reward
Winner +1
Loser -1
Draw 0 for both players

Illegal Moves

Taking an illegal move immediately ends the game. In this case:

  • The player who made the illegal move receives a reward of -1.
  • All other players receive a reward of 0.

How to Play

  1. Player X starts the game.
  2. Players alternate turns placing their mark on an empty cell.
  3. The first player to align three marks in a row, column, or diagonal wins.
  4. If the board fills up without a winner, the game ends in a draw.
  5. Making an illegal move immediately ends the game with the corresponding penalty.

Status

Status Meaning
0 Running
1 Started
2 Win
3 Lose
4 Draw
  • 0 (Running): The process is currently active and in progress.
  • 1 (Started): The process has been initiated and is preparing to run.
  • 2 (Win): The process completed successfully with a winning outcome.
  • 3 (Lose): The process completed with a losing or unsuccessful outcome.
  • 4 (Draw): The process completed without a winner or loser, resulting in a tie.

About

A multi-agent Tic-Tac-Toe environment built with PettingZoo for AI experimentation.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Used by

Contributors

Languages