Skip to content

An implementation of connect four that includes minimax (with optional alpha-beta pruning).

Notifications You must be signed in to change notification settings

IncorrectInclude/Connect-4-Rust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Connect 4 with an implementation of Minimax + Alpha-Beta Pruning

  • Occasionally functioning version of connect 4
  • Has an implementation of minimax
  • Has implementation of alpha-beta-pruning with minimax

Flaws

Cannot really see far enough ahead, in a reasonable amount of time. Pit the minimax algorithm against itself to see it fall into the same trap every time.

To Do

  • If the algorithm believes that it is going to lose then it should try to delay the loss (in progress)
  • Definitely needs some usability improvements.
  • Code needs to be DRY-ied (especially minimax and alpha-beta methods which are nearly identical, but with a small difference. They need to streamlined into methods)
  • The methods for get bounds of the evaluation function can theoretically be eliminated (primitive types have their own bounds). This was required due to an sub-optimal implementation of the minimax algorithm.

Run on Repl.it

About

An implementation of connect four that includes minimax (with optional alpha-beta pruning).

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages