Skip to content

ThomasLeMontagner/Connect4Game_RL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Connect4Game with Reinforcement Learning

Connect Four is a two-player strategy game in which players take turns dropping colored discs from the top into a grid. The goal is to get four of your discs in a row (horizontally, vertically, or diagonally) before your opponent does.
image
source image: https://www.101computing.net/connect4-challenge/

This README.md file provides a brief description of the Connect4 game, as well as instructions for installing the required packages, running the game from the command line, playing against an AI opponent, and starting the web API.

Requirements

  • Python 3.6 or later

Installation

To install the required packages, run:

pip install -r requirements.txt

Usage

To start a game run game.py

python game.py

You will be able to choose different modes:

  • '0' for computer against computer
  • '1' for 1 human player against computer
  • '2' for 2 humans against each other

Then the board is displayed in the terminal.

Computer Agents

Minimax

A computer agent using the minimax algorithm to choose the best action.

Q-learning

A computer agent using q-learning apporach to choose the best action.

About

A Connect4 game with Reinforcement Learning

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages