Changes

Jump to: navigation, search

BBC

6,656 bytes added, 12:37, 26 September 2020
no edit summary
a didactic bitboard chess engine by [[Maksim Korzh]] alias Code Monkey King, written in [[C]]. BBC is subject of a [https://en.wikipedia.org/wiki/YouTube YouTube] [https://en.wikipedia.org/wiki/Tutorial video tutorial] started in summer 2020 <ref>[https://youtu.be/QUNP-UjujBM Bitboard CHESS ENGINE in C: intro]</ref>, actually work in progress.
The [[:Category:Open Source|open source engine]] is further published on [https://en.wikipedia.org/wiki/GitHub GitHub] <ref>[https://github.com/maksimKorzh/bbc GitHub - maksimKorzh/bbc: Bit Board Chess (BBC) - The easiest to understand bitboard chess engine by Code Monkey King]</ref>, and will be compliant to the [[UCI]] protocol.
While the series offers a nice introduction in interactive chess engine programming and [[Bitboards|bitboard]] techniques,
the advanced approach of [[Magic Bitboards]] to determine [[Sliding Piece Attacks|sliding piece attacks]] with all its lengthy initialization topics might be hard to understand and deterrent for the intended novice target group.
The linewise approaches of [[First Rank Attacks]] to introduce occupancy lookups, followed by [[Kindergarten Bitboards]] - as intermediate step towards magics bitboards - seem didactically more appropriate. Anyway, a valuable video series covering various aspects of computer chess programming. '''BBC 1.0''' was finally released on September 24, 2020 <ref>[http://www.talkchess.com/forum3/viewtopic.php?f=2&t=75199 BBC 1.0 release - UCI chess engine by CMK] by [[Maksim Korzh]], [[CCC]], September 24, 2020</ref>.
=See also=
* [http://www.talkchess.com/forum3/viewtopic.php?f=2&t=74917 Comparing 4 move generators: 0x88 vs 10x12 vs 10x12 + bitboards HYBRID vs Pure MAGIC BITBOARDS] by [[Maksim Korzh]], [[CCC]], August 28, 2020
* [http://www.talkchess.com/forum3/viewtopic.php?f=2&t=75017 Bitboard CHESS ENGINE in C: YouTube series by Code Monkey King] by [[Maksim Korzh]], [[CCC]], September 06, 2020
* [http://www.talkchess.com/forum3/viewtopic.php?f=2&t=75155 Zobrist hashing tutorials on YouTube] by [[Maksim Korzh]], [[CCC]], September 19, 2020
* [http://www.talkchess.com/forum3/viewtopic.php?f=2&t=75199 BBC 1.0 release - UCI chess engine by CMK] by [[Maksim Korzh]], [[CCC]], September 24, 2020
=External Links=
# [https://youtu.be/gaXLyW-yMvg Generating relevant OCCUPANCY BIT COUNT lookup tables for sliding pieces]
# [https://youtu.be/JjFYmkUhLN4 Implementing pseudo RANDOM NUMBER generator using XORSHIFT32 algorithm] » [[Pseudorandom Number Generator]]
# [https://youtu.be/KqWeOVyOoyU Generating MAGIC NUMBER candidates] » [[Looking for Magics]]
# [https://youtu.be/UnEu5GOiSEs Generating MAGIC NUMBERS via brute force trial and error method]
# [https://youtu.be/1lAM8ffBg0A Initializing SLIDER PIECES attack tables using PLAIN MAGIC BITBOARDS]»[[Magic Bitboards#Plain|Plain Magic Bitboards]]# [https://youtu.be/ZBBju42pKvw Defining BITBOARDS, OCCUPANCIES and helper variables] » [[Bitboard Board-Definition]]# [https://youtu.be/iJ0VpXq90zY Printing CHESS BOARD position and game state variables] » [[Chess Position]]# [https://youtu.be/IdFHFRiQtj8 Parsing FEN string to initialize BITBOARDS, OCUUPANCIES & board state] » [[Forsyth-Edwards Notation]]
# [https://youtu.be/KSs4KRQPOKE Getting QUEEN ATTACKS by looking up bishop & rook attack tables]
# [https://youtu.be/v9CEqjliv3E Implementing routine to find out whether SQUARE IS ATTACKED] » [[Square Attacked By]]# [https://youtu.be/eRvCLaa-3Rk Writing GENERATE MOVES function skeleton] » [[Move Generation]]# [https://youtu.be/62Hy1JEehqI Generating QUIET PAWN moves] » [[Pawn Pushes (Bitboards)]]# [https://youtu.be/cezEoX8WpWs Generating PAWN CAPTURE moves] » [[Pawn Attacks (Bitboards)#PawnCaptures|Pawn Captures]]# [https://youtu.be/TXvV2jVl7co Generating CASTLING MOVES] » [[Castling]]
# [https://youtu.be/clNvT1W93o4 Generating SLIDER & LEAPER piece MOVES by attack tables lookup]
# [https://youtu.be/ubX5lyIQoSs Binary formatting of MOVE ITEMS] » [[Encoding Moves]]# [https://youtu.be/gyf3mr1LI7A Encoding & decoding MOVE ITEMS]# [https://youtu.be/AINYYiV-83I Implementing MOVE LIST + ADD MOVE, PRINT MOVE, PRINT MOVE LIST functions] » [[Move List]]# [https://youtu.be/944aTQQnWAA Populating MOVE LIST with newly GENERATED MOVES] # [https://youtu.be/CsUelozl0a8 Preserving & restoring BOARD STATE aka COPY/MAKE approach] » [[Copy-Make]]# [https://youtu.be/coVPpTJN9iU Implementing MAKE MOVE function (moving pieces)] » [[Make Move]]# [https://youtu.be/nkRrQnhRo80 Implementing MAKE MOVE function (handling captures)] » [[Captures]]# [https://youtu.be/gnDyJImkfVo Implementing MAKE MOVE function (handling pawn promotions)] » [[Promotions]]# [https://youtu.be/5h5Z3bx0EKc Implementing MAKE MOVE function (handling enpassant moves)] » [[En passant]]# [https://youtu.be/J-k2p1g6VTQ Implementing MAKE MOVE function (handling double pawn pushes)] » [[Pawn Push#DoublePush|Double Pawn Push]]# [https://youtu.be/pHohRpH30a0 Implementing MAKE MOVE function (handling castling moves)] » [[Castling]]# [https://youtu.be/zOWPZ4fuLGg Implementing MAKE MOVE function (updating castling rights)] » [[Castling Rights]]# [https://youtu.be/ZBotXGrgbdg Implementing MAKE MOVE function (updating occupancy bitboards)] » [[Occupancy]]# [https://youtu.be/sg4AMsXYuk4 Implementing MAKE MOVE function (checking whether the king is in check)] » [[Check]]# [https://youtu.be/bK_dg_gMW6s Writing a cross-platform function for GETTING TIME IN MILLISECONDS]# [https://youtu.be/o0xCJDhbSUM Writing PERFT DRIVER function] » [[Perft]]# [https://youtu.be/p2VuC0xTPoc Writing PERFT TEST function]# [https://youtu.be/1gOYB9HelXk Connecting to the GUI (parse move string)] » [[GUI]], [[UCI]]# [https://youtu.be/giSqiH6aa_o Connecting to the GUI (parse "position" command)]# [https://youtu.be/lb46nX6gSBw Connecting to the GUI (parse "go" command)]# [https://youtu.be/rW2jzTA4kW4 Connecting to the GUI (main loop) + BONUS (TSCP vs BBC blitz game)] » [[TSCP]]# [https://youtu.be/CMshozGbBdw Implementing RUDIMENTARY EVALUATION (material score)] » [[Evaluation]], [[Material]]# [https://youtu.be/E2JzRNI1ODI Implementing RUDIMENTARY EVALUATION (positional piece scores)] # [https://youtu.be/b8OcJM3VeaU Writing NEGAMAX ALPHA BETA skeleton] » [[Negamax]], [[Alpha-Beta]]# [https://youtu.be/lAAdjCkWd9s Detecting CHECKMATE and STALEMATE] » [[Checkmate]], [[Stalemate]]# [https://youtu.be/WzEhVjdNByg Implementing QUIESCENCE SEARCH] » [[Quiescence Search]]# [https://youtu.be/NMNBWxinpPY Defining MVV LVA (Most Valuable Victim - Least Valuable Attacker) table] » [[MVV-LVA|MVV/LVA]]# [https://youtu.be/VeJnLN7jFm4 Writing SCORE MOVE function] » [[Move Ordering]]# [https://youtu.be/3-9tzzmtQQ0 Writing SORT MOVES function]# [https://youtu.be/DVSp_31iTBU Applying MOVE ORDERING to sort captures] » [[Captures]]# [https://youtu.be/MA6d1hZ1YBE Sorting KILLER & HISTORY moves] » [[Killer Heuristic]], [[History Heuristic]]# [https://youtu.be/LOR-dkAkUyM Collecting PV (Principle Variation) from the search] » [[Principal Variation]]# [https://youtu.be/yVyQSUYts0A Implementing ITERATIVE DEEPENING] » [[Iterative Deepening]]# [https://youtu.be/heJUljl_zNE Sorting PV moves + some BONUS TALK at the end]# [https://youtu.be/Gs4Zk6aihyQ Implementing PVS (Principle Variation Search)] » [[Principal Variation Search]]# [https://youtu.be/OLT0bU0SIeg Applying LMR (Late Move Reduction)] » [[Late Move Reductions]]# [https://youtu.be/n6xAzopULxU Applying NULL MOVE PRUNING] » [[Null Move Pruning]]# [https://youtu.be/1LmdOHshYkI Adjusting ASPIRATION WINDOW during iterative deepening] » [[Aspiration Windows]]# [https://youtu.be/azEmgbdiecc BUG ALERT!!! Fixing PVS duplication bug]# [https://youtu.be/t48NYINOekw Handling TIME CONTROLS (forked from VICE by BluefeverSoftware)] » [[Vice]]# [https://youtu.be/W7dah-dat8Q Zobrist HASHING (initialize random keys)] » [[Zobrist Hashing]]# [https://youtu.be/sV2C7hx-gOE Zobrist HASHING (generate hash key)]# [https://youtu.be/5EMLgIFv5Qg Zobrist HASHING (hash keys incremental updates)] » [[Incremental Updates]]# [https://youtu.be/fEHjpzrcRxk Implementing HASH TABLE aka transposition table (define & initialize)] » [[Transposition Table]] <ref>[http://web.archive.org/web/20070809015843/www.seanet.com/%7Ebrucemo/topics/hashing.htm The Main Transposition Table] from [[Bruce Moreland|Bruce Moreland's]] [http://web.archive.org/web/20070607231311/www.brucemo.com/compchess/programming/index.htm Programming Topics]</ref># [https://youtu.be/NcboP08y_JQ Implementing HASH TABLE aka transposition table (read/write hash entry)]# [https://youtu.be/HNtAt9RMJVs Implementing HASH TABLE aka transposition table (connecting to search)]# [https://youtu.be/4SXKBTGUkjk BUG ALERT! Fixing lack of enpassant & side hashing on null move]# [https://youtu.be/g1b_rT9VqAw More search BUG FIXES &CLEANUPS]# [https://youtu.be/XfeuxubYlT0 Handling MATING SCORES in HASH TABLE aka transposition table] » [[Score#MateScores|Mate Scores]]# [https://youtu.be/WcoOTg7Aq4E Sending MATING SCORES to GUI + some cleanups & adjustments]# [https://youtu.be/QhFtquEeffA Detecting THREE FOLD REPETITIONS] » [[Repetitions]]# [https://youtu.be/F8ueIueVsHI Final (hopefully!) SEARCH BUG FIXES]# [https://youtu.be/Yqpm6Ad4scI Improving EVALUATION (setting file & rank masks)] » [[Evaluation]], [[Pawn Pattern and Properties]]# [https://youtu.be/iwBkAEC4KSs Improving EVALUATION (initializing isolated & passed pawn masks)] » [[Isolated Pawns (Bitboards)]], [[Passed Pawns (Bitboards)]]# [https://youtu.be/CgvZMsJImJg Improving EVALUATION (double & isolated penalties, passed pawns bonus)]# [https://youtu.be/Bp4F_321j4I Improving EVALUATION (open & semi open file scoring)] » [[Pawns and Files (Bitboards)]], [[Open File]]# [https://youtu.be/iq2lxyjWZvA Improving EVALUATION (mobility and king safety)] » [[Mobility]], [[King Safety]]# [https://youtu.be/1SgnTKzWuss BBC 1.0 - RELEASE]
=References=

Navigation menu