This repository features a compact Chess AI implemented in a single C# file, MyBot.cs, originally designed for Sebastian Lague’s Chess Challenge
- Single-file, 500-token limit: The bot is written in under 500 tokens (as noted in the code comments), adhering to challenge constraints.
- Implements
IEvaluator: Uses theChessChallenge.APIinterface to evaluate board positions for each move. - Bitboard Techniques: Relies on bitwise operations for efficient board and piece handling.
- Custom Evaluation: Weighs piece values, checks for bishop pairs, counts doubled pawns, identifies open rook files, and evaluates passed pawns.
- Token-Efficient Code: Strictly optimized to remain within the 500-token limit while still providing comprehensive chess heuristics.
- Strategic Heuristics: Considers mobility and positional advantages such as phalanx formations and passers.
- Language: C#
- API/Framework: ChessChallenge.API
- Code Constraints: 500-token limit, single file (
MyBot.cs) - Evaluation Logic: Combines piece-square tables, bitboard checks, and specialized heuristics for positional play.
- Design & Planning: Determined which heuristics to include given the token constraint
- Implementation: Wrote
MyBot.csto implementIEvaluator, carefully managing code size - Testing: Verified correctness and performance using the Chess Challenge framework.
- The bot runs within the ChessChallenge environment, adhering to the 500-token rule.
- Work continues on refining heuristics and improving efficiency within the code limit.
- Challenge Reference: Sebastian Lague’s Chess Challenge