bdelanghe / matchbox-tic-tac-toe

A CLI game with a progressively learning AI based on the MENACE algorithm, providing an evolving gameplay experience ๐ŸŽฒ๐Ÿค–

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

๐ŸŽฒ Matchbox TicTacToe ๐ŸŽฒ

๐Ÿง About

Welcome to Matchbox TicTacToe, a command-line interface (CLI) based game that adds a smart twist to the classic TicTacToe! The AI opponent in this game is trained using the MENACE (Matchbox Educable Naughts and Crosses Engine) algorithm, a pioneering machine learning algorithm invented by Donald Michie in the 1960s. Learn more about MENACE here.

๐ŸŒŸ Key Features

  • Interactive CLI: Intuitive and user-friendly command-line interface.
  • MENACE Inspired AI: The AI opponent gradually learns and improves its game strategy based on the MENACE algorithm.
  • Easy to Install and Play: Straightforward installation and simple game mechanics for all players.

๐Ÿ”ง Installation

To install Matchbox TicTacToe, follow the steps below:

  1. Clone this repository.
  2. Navigate to the project's directory in your terminal.

๐ŸŽฎ How to Play

To play Matchbox TicTacToe:

  1. Run the game script in your terminal.
  2. The game will guide you through the process.

๐Ÿ—๏ธ Code Structure

The main game logic is divided into two Python files:

  1. tictactoe_cli.py: This script handles the CLI using the argparse and cmd libraries, providing an interactive command-line interface for the game.

  2. tictactoe_game.py: This script takes care of the actual game logic, the visual rendering using the curses library, and the MENACE inspired AI logic.

The AI opponent's performance is based on the MENACE algorithm and "learns" over time. The more games it plays, the more challenging it will become.

๐Ÿค Contributing

Contributions to improve this project are always welcome. Please feel free to create an issue or pull request.

Note: As the AI learns over time, the challenge level increases with each game. Good luck, and may the best player win! ๐Ÿ†

About

A CLI game with a progressively learning AI based on the MENACE algorithm, providing an evolving gameplay experience ๐ŸŽฒ๐Ÿค–


Languages

Language:Python 100.0%