Skip to content

2025F-COMP3106/project-group-4

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 

Repository files navigation

By: Dory Z, Karan C

Connect 4 SPIN Game Bot

Connect Four is a classic two-player connection game where players place colored discs into a vertical grid, attempting to connect four pieces in a line. Connect 4 SPIN introduces a new element to the game: each column can be flipped vertically, and players must spin the column after each piece placement. Pieces are fixed in position so they don't fall when a column spins. This creates a dynamic game where a piece at the bottom can randomly move to the top when its column is flipped, making a winning strategy less predictable. We will explore how AI agents handle uncertainty in strategic games, comparing expectimax algorithms with traditional minimax approaches and investigating how randomness affects optimal play.

How to Play

Terminal (Testing)

Mac/Linux:

cd backend
python3 main.py

Windows:

cd backend
python main.py

With Frontend

Step 1: Install Dependencies

Mac/Linux:

cd backend
pip install -r requirements.txt

Windows:

cd backend
pip install --user -r requirements.txt

Note: On Windows, use --user flag to avoid permission issues.

Step 2: Start the Backend API Server

Mac/Linux:

cd backend
python3 api.py

Windows:

cd backend
python api.py

The API server will start on http://localhost:5000

Step 3: Open the Frontend

Mac:

cd frontend
open index.html

Or double-click index.html in Finder.

Windows:

cd frontend
start index.html

Or double-click index.html in File Explorer.

Linux:

cd frontend
xdg-open index.html

Or double-click index.html in your file manager.

The frontend will open in your default web browser and connect to the backend API.

About

project-group-4 created by GitHub Classroom

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors