Skip to content

Knowledge-based backtracking algorithm to win the game of connect 4. This work is based on the master thesis "A Knowledge-based Approach of Connect-Four" from Victor Allis back in 1988.

Notifications You must be signed in to change notification settings

dsanmart/connect4

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A Knowledge-based Approach of Connect-Four

Note that current implementation is using only 4 fundamental rules out of the 9 defined in rules.py. This is still a WIP...

Since not all solutions are found by the algorithm with only 4 rules, a rudimentary approach is done by combining minimax and victor in play.py.

Instructions to run the AI against the server:

Run game.py

python game.py

Rules defined

  • Claimeven
  • Basinverse
  • Vertical
  • Afterven
  • Lowinverse
  • Highinverse
  • Baseclaim
  • Before
  • SpecialBefore

Rules implemented

  • Claimeven
  • Basinverse
  • Vertical
  • Before

About

Knowledge-based backtracking algorithm to win the game of connect 4. This work is based on the master thesis "A Knowledge-based Approach of Connect-Four" from Victor Allis back in 1988.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages