Update
This commit is contained in:
parent
95e6641b63
commit
6babe76b2a
24 changed files with 1893 additions and 1873 deletions
6
chess.md
6
chess.md
|
@ -56,7 +56,7 @@ Currently the best player in the world -- and probably best player of all time -
|
|||
|
||||
During [covid](covid.md) chess has experienced a small boom among normies and [YouTube](youtube.md) chess channels have gained considerable popularity. This gave rise to [memes](meme.md) such as the bong cloud opening popularized by a top player and streamer Hikaru Nakamura; the bong cloud is an intentionally shitty opening that's supposed to taunt the opponent (it's been even played in serious tournaments lol).
|
||||
|
||||
**White is generally seen as having a slight advantage over black** (just like in [real life](irl.md) lol). It is because he always has the first move -- statistics also seems to support this as white on average wins a little more often. This doesn't play such as big role in beginner and intermediate games but starts to become apparent in master games. How big the advantages is is a matter of ongoing debate, most people are of the opinion there exists a slight advantage for the white (with imperfect play, i.e. that white plays easier, tolerates slightly less accurate play), though most experts think chess is a draw with perfect play (pro players can usually quite safely play for a draw and secure it if they don't intend to win; world championships mostly consist of drawn games as really one player has to make a mistake to allow the other one to win). Minority of experts think white has theoretical forced win. Probably only very tiny minority of people think white doesn't have any advantage. Some people argue black has some advantages over white, as it's true that sometimes the obligation to make a move may be a disadvantage. Probably no one thinks black has a forced win, though that's not disproved yet so maybe someone actually believes it.
|
||||
**White is generally seen as having a slight advantage over black** (just like in [real life](irl.md) lol). It is because he always has the first move -- statistics confirm this as white on average wins a little more often (even in the world of computers where psychology plays no role). The advantage is very small, estimated by engines to be around a very small fraction of a pawn, and this slight imbalance doesn't play such as big role in beginner and intermediate games but starts to become apparent in master games where the play can be very equal. How big the advantages is exactly is a matter of ongoing debate, most people are of the opinion there exists a small advantage for the white (with imperfect, human play, i.e. that white plays easier, has more choices, tolerates slightly less accurate play), though most experts think chess is a draw with perfect play (pro players can usually quite safely play for a draw and secure it if they don't intend to win; world championships mostly consist of drawn games as really one player has to make a mistake to allow the other one to win). Minority of experts think white has theoretical forced win. Probably only very tiny minority of people think white doesn't have any advantage or even that black is in a better overall position. Some argue that even if black doesn't have an overall advantage, he still has a number of smaller advantages over white, as it's true that sometimes the obligation to make a move may be a disadvantage (this is called [zugzwang](zugzwang.md)). It's for example true that the theoretical fastest possible checkmate is delivered by black, not white. Probably no one thinks black has a forced win though, but as that's not disproved yet so maybe someone actually believes it.
|
||||
|
||||
**Blindfold play**: it's quite impressive that very good players can play completely blindfold, without any actual chessboard, and some can even play many games simultaneously this way. This is indeed not easy to do and playing blindfold naturally decreases one's strength a bit (it seems this is more of a case on lower level of play though). It is however not the case that only an exceptional genius could play this way, probably anyone can learn it, it's just a matter of training (it's a matter of developing an efficient mental representation of the board rather than actually exactly remembering the whole board -- in psychology called *chunking*). Probably all masters (above FIDE ELO 2000) can play blindfold. They say the ability comes naturally just by playing countless games. How to learn playing blindfold then? Just play a lot of chess, it will come naturally -- this is the advice probably most often given. However if you specifically wish to learn blindfold play, you may focus on it, e.g. by training blindfold against very weak computer. Some software chess boards offer a mode in which one can see the position and color of all men but not which type they are -- this may perhaps be a good start. It may possibly also be done very gradually -- for example start by covering just part of the board and every week cover yet more squares; eventually you'll have them all covered.
|
||||
|
||||
|
@ -92,7 +92,7 @@ Programming chess is a [fun](fun.md) and enriching experience and is therefore r
|
|||
|
||||
The core of chess programming is writing the [AI](ai.md). Everything else, i.e. implementing the rules, communication protocols etc., is usually pretty straightforward (but still a good programming exercise). Nevertheless, as the chess programming wiki stresses, one has to pay a great attention to eliminating as many [bugs](bug.md) as possible; really, the importance of writing automatic tests can't be stressed enough as debugging the AI will be hard enough and can become unmanageable with small bugs creeping in. However to make the AI good it's important to [optimize](optimization.md) the functions that work with the board, i.e. it's important to be able to generate moves quickly, quickly detect checks/mates and so on (because the AI will be checking billions of positions, any optimization will allow to search many more positions). Thought has to go into choosing right [data structures](data_structure.md) so as to allow nice [optimizations](optimization.md), for example board representation plays an important role -- main approaches here are for example having a 8x8 2D array holding each square's man, keeping a list of men (each explicitly recording its coordinates) or bitboards (8x8 times bit arrays, one for each piece type, recording where each man is placed).
|
||||
|
||||
The AI itself works traditionally on the following principle: firstly we implement so called static **evaluation function** -- a function that takes a chess position and outputs its evaluation number which says how good the position is for white vs black (positive number favoring white, negative black, zero meaning equal, units usually being in pawns, i.e. for example -3.5 means black has an advantage equivalent to having extra 3 and a half pawns; to avoid fractions we sometimes use centipawns, i.e. rather -350). This function considers a number of factors such as total material of both players, pawn structure, king safety, men mobility and so on. Traditionally this function has been hand-written (also called HCE, hand crafted evaluation), nowadays it is being replaced by a learned [neural network](neural_network.md) ([NNUE](nnue.md)) which showed to give superior results (e.g. Stockfish still offers both options, however the neural net seems to save about half of the computation time); for starters you probably want to write a simple evaluation function manually.
|
||||
The AI itself works traditionally on the following principle: firstly we implement so called static **evaluation function** -- a function that takes a chess position and outputs its evaluation number which says how good the position is for white vs black (positive number favoring white, negative black, zero meaning equal, units usually being in pawns, i.e. for example -3.5 means black has an advantage equivalent to having extra 3 and a half pawns; to avoid fractions we sometimes use centipawns, i.e. rather -350). This function considers a number of factors such as total material of both players, pawn structure, king safety, men mobility and so on. Traditionally this function has been hand-written (also called HCE, hand crafted evaluation), nowadays it is being replaced by a learned [neural network](neural_network.md) ([NNUE](nnue.md)) which showed to give superior results (e.g. Stockfish still offers both options, however the neural net seems to save about half of the computation time); for starters you probably want to write a simple evaluation function manually. However even a manually crafted evaluation function may later on be fine tuned by some kind of machine learning -- the algorithm stays the same but the parameters, such as exact values of chessmen or bonus points for certain patterns on the board (connected rooks, good pawn structure etc.), may be determined e.g. by brute force trial and error or with smarter techniques like evolutionary programming, to maximize the playing strength of the engine.
|
||||
|
||||
Note: if you could make a perfect evaluation function that would completely accurately state given position's true evaluation (considering all possible combinations of moves until the end of game), you'd basically be done right there as your AI could just always make a move that would take it to the position which your evaluation function rated best, which would lead to perfect play by searching just to depth 1. Though neural networks got a lot closer to this ideal than we once were, as far as we can foresee ANY evaluation function will always be just an [approximation](approximation.md), an estimation, [heuristic](heuristic.md), many times far from perfect evaluation, so we cannot stop at this. We have to program yet something more. However some more relaxed engines that don't aim to be among the best can already work in the lazy way and be pretty good opponents -- see for example the Maia engine.
|
||||
|
||||
|
@ -136,7 +136,7 @@ Similarly the **number of possibly reachable positions** (position for which so
|
|||
|
||||
**Shortest possible checkmate** is by black on ply number 4 (so called *fool's mate*); in fact there are 8 different games that can end like this. As of 2022 the **longest known forced checkmate** is in 549 moves -- it has been discovered when computing the Lomonosov Tablebases. EDIT: now it seems there is one in 584 moves. Please note this: there most likely exist much longer forced mates, these are just the KNOWN ones. Consider e.g. that if black blunders a queen in the opening, the game is very likely a theoretical win for white since then, i.e. a forced mate, and with perfect play black can probably resist for very long. However such situations are too complex to explore fully.
|
||||
|
||||
Average game of chess lasts 40 (full) moves (80 plies). **Average [branching factor](branching_factor.md)** (number of possible moves at a time) is around 33. **Maximum number of possible moves in a position** seems to be 218 (FEN: `R6R/3Q4/1Q4Q1/4Q3/2Q4Q/Q4Q2/pp1Q4/kBNN1KB1 w - - 0 1`).
|
||||
Average game of chess lasts 40 (full) moves (80 plies). **Average [branching factor](branching_factor.md)** (number of possible moves at a time) is around 33. **Maximum number of possible moves in a position** seems to be 218 (FEN: `R6R/3Q4/1Q4Q1/4Q3/2Q4Q/Q4Q2/pp1Q4/kBNN1KB1 w - - 0 1`). As for **total number of legal moves**, if we consider only *squareFrom-squareTo* notation (such as *e3e5*, without recording chessmen, promotions etc.), there are 1792 different moves that can ever legally be performed.
|
||||
|
||||
White wins about 38% of games, black wins about 34%, the remaining 28% are draws (38.7%, 31.1%, 30.3% respectively on Computer Chess Rating Lists).
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue