Are there some statistical values for the worth of castling? Are there some numbers, for example in centipawn that can represent the value of castling?
The answer is a round no (sadly, this answer is highly subjective).
The reason for this, however, it is not because castling is dependent on the position. The argument that castling cannot have a value because it can lead to getting mated or because it can lose you the game is essentially flawed since for this same logic a queen cannot have a value because saving a queen can also lead to get mated or lose you the game. My reasoning for this lies on the following statistic of utilization of squares by chess Grandmasters. It is quite obvious that using both white and black, Grandmasters tend to castle in almost every game:
g1 as white and
g8 as black have almost always a value greater than
1, meaning that the king is usually tucked in the corner for safety. Thus I would say that castling is, in average, a borderline indispensable tool that ensures the king safety.
Protecting one's king and checkmating the opponent's is the objective of the game, meaning that there is no need to assign a numerical value to the king because losing it means that the game is lost. Similarly, taking away one's option to castle severely hinders the safety of the king and, as seen above, is used virtually in every game. Hence castling cannot have a numerical value assigned since virtually every strategy to defend one's king uses it.
Yes there are some numbers that can (sort of) represent the value of castling.
If you let Stockfish or any other strong engine analyze the starting position, it will generally come to the conclusion that White has roughly a +0.50 advantage. But if you use an opening book (1. Nf3 Nf6 2. Rg1 Ng8 3. Rh1 Nf6 4. Ng1 Ng8 5. Nc3 Nf6 6. Rb1 Ng8 7. Ra1 Nf6 8. Nb1 Ng8) which lets Black castle but not White, the advantage actually flips around, and the starting position advantages Black.
Check these games out:
- Stockfish-Xiphos. The starting position, except White can't castle while Black can. Stockfish's starting eval at depth 31/48 is -0.20. (Yes Stockfish wins anyway, but it is Stockfish, the strongest conventional engine in the world, playing)
- Xiphos-Stockfish. The reverse game. Xiphos plays 1. Nc3 evaluating the position as 0.00, while Stockfish is -0.84 at depth 36/52.
- AllieStein-Stockfish. Played from the opening position with both sides able to castle. AllieStein gave 0.43 advantage to White at depth 18/57.
- Stockfish-Alliestein. The reverse game, Stockfish gave White a 0.47 advantage in the opening position at depth 38/59.
Chess has one particular tactic or theme which cannot be ignored and that is King Safety .
Since the rule is that if the King is foregone or checkmated the Game is lost so the value of King is the most essential . I do not say that Castling is the only answer to a safe King since there are many noteworthy games which have been won without castling, but Castling is a standard procedure in many openings and middle games since the King goes inside the high walls protected by its own soldiers and get the Rooks connected .
The value of Castling increases because beside the King the Queen and the minor pieces are developed somewhere else in the Game . What I mean is playing with White the King's Bishop is developed on b5,c4,e2 or g2 mostly . The Knight is developed frequently on f3,e2 or a3 sometimes and we put our e and d pawns on e4 and d4 in most cases . The Queen leaves the stand from d1 and gets developed to some other Square .Now when it happens if the King remains in Centre it becomes exposed and susceptible to attack . No minor pieces are there to protect it .
When the King remains in the Castle then the Knight on f3 , the Pawns on f2,g2 and h2 serve as a barrier and the Rook stays besides as if the King is riding on a high elephant . Sometimes with the g pawn on g3 the Bishop stays on g2 . The King is protected and then the Forces can be coordinated on a particular area of the board for an attack . So Castling makes just too much sense .
I would check this by trying some experiments with a chess program to see how it evaluates positions. For example you could put in a position where one side is not castled and then the same position, if it is possible given the position, with the same side castled and compare the evaluations. You could do a similar test with the original position where the one side is not castled, but is able to castle, versus the same position but where the one side is not able to castle - because the king or rook already moved. Of course the evaluations would depend on the initial positions. If the positions are closed and not much is going on, you'd probably get a more stable value for castling from the experiments.
The rule is you have to castle in the first 10 moves, otherwise you will leave your king unprotected.
Most amateur players launch an aggressive attack and leave the king sitting there without any protection. If you study games from professional players, you will notice that they castle early in the opening.