Skip to content

A simple engine and end-tables for board games like chess, checkers and general tic-tac-toe (m,n,k-game) including connect 4. Heavy use of new C++ features like generator and concepts. Easy to add new engine and new game.

License

Notifications You must be signed in to change notification settings

oggy22/BoardGames

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

84 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BoardGames

An extensible framework for programming search algorithms (minimax with cutting, killer moves, transposition tables, etc) and end-tables for board games such as two-player, full info board games such as chess, MNK (generalized TicTacToe), Connect4, checkers etc. Heavy use of teamplates and newer C++ features such as variadic templates, constexpr, consteval, concepts, std::experimental::generator and heavy use of C macros around chess moves.

To get local enlistment:

  1. git clone https://github.com/oggy22/BoardGames
  2. Open BoardGames.sln

Minmax algorithm

The main algorithm for finding best moves, regardless of the game played, is the minmax algorithm. It is implemented in a highly templatized manner where you can provide any game as long as it satisfies the requirements specified by the C++ concept BoardPosition. The following heuristics are implemented:

  1. Alhpa-beta prunning
  2. Killer move
  3. Transposition tables

Endgame tables

Unlike the minimax algorithm, which recursively evaluates positions to determine the best move during play, endgame tables (or tablebases) are precomputed databases that store the best move for every possible position within a specific endgame configuration in advance. Endgames are currently in development for chess.

About

A simple engine and end-tables for board games like chess, checkers and general tic-tac-toe (m,n,k-game) including connect 4. Heavy use of new C++ features like generator and concepts. Easy to add new engine and new game.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages