Skip to content
/ gobang Public

A Gobang game algorithm using min-max alpha-beta pruning

Notifications You must be signed in to change notification settings

eqiihuu/gobang

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gobang: A Tiny Game with AI


Author


Introduction

  • This is a small game called Gobang. You can play this game with the computer (a 'clever' agent with very basic AI).
  • The rule of the game is as follow: you and the computer will put a piece of chess in turns on any reasonable(empty) position. Whoever get a line of five pieces of chess first will win the game.

Algorithm

Maximal-Minimal Algorithm with Alpha-Beta Pruning


Usage

  • Run the main.cpp file in the command line, and there will be an simple UI (No graphical UI, just command line).
  • Then just follow the instructions and have fun!

Files

  1. head.h: Head File to define some important variables
  2. main.cpp: The main function. To call the sub-function for the game.
  3. subfunction.cpp: Implement the algorithm for the game, including game status checking and computer AI (Max-Min algorithm with Alpha-Beta pruning)

About

A Gobang game algorithm using min-max alpha-beta pruning

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages