Skip to content

Liamth99/ChessBot.cs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Very early WIP

Inspired by Sebastian Lague's Videos

My personal goal is to learn more about new types of programming and thought I'd start with a C# Chess bot as I'm familiar with the language and then write another bot in C, C++ or Rust. With the hope that more Chess programming experience and the "performance advantage" of the lower languages, I can beat the C# one.

And then maybe in the future ill make one in a functional language or use a Neural network or some other dumb idea.

Few Self Imposed Rules

  • No stealing other peoples code or using AI. The whole point is to learn (I will commit the crime of using AI for unit testing however)
  • WHen it comes to evaluation techniques, I want to try learning from older articles/papers and will try to remember to reference them on the readme.
  • Test Driven Development:
    • Going to rely on tests to make sure everything is working as expected using real positions.
    • Also, it will help when I get to the optimization stages of development
  • I want to try and keep records of benchmark results for each version of the bot to keep track of improvements and test bots against each-other

The plan

Phase One: Get Something That Works

  • Get Basic Chess Engine Working With All The Rules Working
    • Calculate Basic Legal Moves For All Pieces
    • Pawn Shenanigans
      • Pawn Promotion
      • Diagonal Attacks
      • En Passant
    • Castling
    • Check And Checkmate
    • Illegal Moves
    • Game Draws
      • Stalemate
      • Threefold Repetition
      • Fifty-Move Rule
      • Insufficient Material
  • Abstract Input System (Player Input And Random Move Input As a Start)
  • Setup large validation tests to make sure the core engine is definitely bug free.
  • Basic MiniMax Evaluation Player Input

Phase Two: Make It Not Suck

  • Investigate Optimization For Prev Step
  • Iterative Deepening
  • Openings
  • Optimize Core Engine
    • Use Bitboards
    • Revise Legal Move Generation (Assuming The First Iteration Is Bad And Precomputing Them With BitBoards Would Be Better)
  • Probably more
  • Make sure I can't beat it before continuing

Phase Three: Make It Actually Good

  • Determine some performance metric goal, beat it and move on to the next language

About

Far from finished

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Languages