Answers.Body: <p>There's no real rule for how much do doubled pawns (or any other kind of weakness on the pawn structure) worse your position. There's not even a rule for piece value, specially if you'll add bonuses for things like centralized knights or the bishop pair.</p>
  <p>In general, doubled pawns in a minority or balanced side tend to be less important than in a majority (as it'll make it harder to create a passed pawn)</p>
  <p>Doubled pawns can also be a strength. Think for instance of <strong>1.e4 e5 2.Nf3 Nf6 3.Nxe5 d6 4.Nf3 Nxe4 5.Nc3!?</strong> where White gives the possibility for his opponent to double his pawns hoping his king will be safer after castling long thanks to the extra protection it provides (note that White does not have a majority on the queenside)</p>
  <p>Another illustrative example would be <strong>1.e4 e5 2.Nf3 Nc6 3.Bb5 a6 4.Bxc6 dxc6 5.d4 exd4 6.Qxd4</strong> here White gives up the bishop pair to make the &quot;d&quot; pawn move away and get a 4vs3 majority on the kingside that could eventually become a passed pawn. The 4vs3 majority Black has on the queenside is much harder to convert into a passed pawn. If all pieces were removed from the board, White would easily win the pawn endgame.</p>
  <p>In short, there's no way to tell without knowing how your engine will evaluate other potentially related factors in the position. The main advantage you have is that you don't need to get it right the first time. You can create different versions of your engine with different values for certain parameters and test them against one another.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-09-22T20:46:51.200Z
Answers.LastActivityDate: 2020-09-23T20:43:13.423Z
Answers.LastEditDate: 2020-09-23T20:43:13.423Z
Answers.UserDisplayName: David
Answers.Body: <p>Doubled pawns aren't necessarily bad. They typically mean an open file and often can improve control of the center.</p>
  <p>There's really no way to answer unless I know how you value the mobility of the pieces. Are the piece values you give fixed or baseline numbers that can be modified based on the position?</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-09-23T02:10:16.470Z
Answers.LastActivityDate: 2020-09-23T10:03:09.183Z
Answers.LastEditDate: 2020-09-23T10:03:09.183Z
Answers.UserDisplayName: Savage47
Answers.Body: <p>it depends</p>
  <p>they may be worth more if they open a file for a rook in a somewhat closed position</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-09-23T00:20:06.940Z
Answers.LastActivityDate: 2020-09-23T00:20:06.940Z
Answers.UserDisplayName: foo yuk
Answers.Body: <p><strong>Start with whatever and tune it.</strong></p>
  <p>That's how chess engine programming works - you start with some number, and then tune it. For example you start with -5, then create another version with -10. You get the two engines to play against each other, and the one that wins more often is the &quot;correct&quot; version that you keep.</p>
  <p>Of course as pointed out by other answers, doubled pawns aren't necessarily bad, so the next step is to start incorporating more features that can mitigate the doubled pawn penalty. For example you could say that if you have a pawn on an adjacent file that is defending the more advanced doubled pawn (e.g., a pawn on f3 given doubled pawns on e4 and e3), then remove the doubled pawn penalty. And then the testing process would start again, you take this patch and create a new fork, then get the two versions to play each other and retain the stronger version. And then you could tune, e.g. maybe &quot;remove the doubled pawn penalty&quot; is too strong, perhaps it should be &quot;take only half the doubled pawn penalty&quot;, etc.</p>
  <p>On another note, there is no &quot;standard answer&quot; to how large the doubled pawn penalty should be. Different engines will prefer different values - it depends on the rest of your evaluation function &amp; search function. See <a href="https://www.chess.com/blog/the_real_greco/chess-from-code-how-do-engines-evaluate-positions" rel="nofollow noreferrer">this article</a> which contains a paragraph about adding tripled pawn penalties to Ethereal:</p>
  <blockquote>
  <p>You might ask- why can't someone just write a better evaluation function? The answer is that people are trying, but it's difficult. Andrew Grant told me that he tried to add a penalty for tripled pawns (because they're obviously terrible!), but for whatever reason the engine became weaker with that penalty. Code for positional subtleties is extremely unlikely to add strength.</p>
  </blockquote>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-09-24T04:38:10.383Z
Answers.Text: It is possible (although I lack the experience to say whether it is *probable*) that checking for tripled pawns simply consumes too much computation on positions that are already known to be terrible anyway, preventing the engine from searching as deeply. Regardless of the specifics, engines are very complicated beasts, and the only way to know whether a change is good or bad is to test it empirically, as you say.
Answers.UserDisplayName: Kevin
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-09-23T05:11:03.870Z
Answers.LastActivityDate: 2020-09-23T23:20:16.413Z
Answers.LastEditDate: 2020-09-23T23:20:16.413Z
Answers.UserDisplayName: Allure
Body: <p>I am creating a chess engine and I am creating a heuristic to change the board evaluation if there are doubled pawns. Now, I have no experience in creating engines, so I figured I would ask this site on how much to change it. The values of my pieces are as such:</p>
  <p>King - 10,000</p>
  <p>Queen - 100</p>
  <p>Rook - 50</p>
  <p>Bishop - 30</p>
  <p>Knight - 30</p>
  <p>Pawn - 10</p>
  <p>I am thinking that doubled pawns should be -5 points, tripled -10 points, quadrupled -20 points and so on.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-09-23T09:05:24.737Z
Comments.Text: As this is a heuristic and not a full-grown position evaluation, a penalty of 5 feels ok, a double pawn (= 2 pawns) having the worth of 1,5 „normal“ pawns. -10 for tripled pawns makes a tripled pawn equal to 2 normal pawns, which also feels ok. Quadrupled pawns are worse than 2 normal pawns in my opinion, so the penalty should be higher.
  
  You could give some extra points for bishop pair, connected pawns, passed pawns, but again, you seem to look for a heuristic, and heuristics should be fast and simple.
Comments.UserDisplayName: Christian H. Kuhn
Tags: <engines><pawns><point-value><doubled-pawn>
Title: What should be the value change if pawns are doubled?
ThreadText: # What should be the value change if pawns are doubled?
  
  (Asked by: username_0 on 2020-09-22)
  
  I am creating a chess engine and I am creating a heuristic to change the board evaluation if there are doubled pawns. Now, I have no experience in creating engines, so I figured I would ask this site on how much to change it. The values of my pieces are as such:
  
  King - 10,000
  
  Queen - 100
  
  Rook - 50
  
  Bishop - 30
  
  Knight - 30
  
  Pawn - 10
  
  I am thinking that doubled pawns should be -5 points, tripled -10 points, quadrupled -20 points and so on.
  
  **Tags:** engines, pawns, point-value, doubled-pawn
  
  > **Comments:**
  > **username_1**: As this is a heuristic and not a full-grown position evaluation, a penalty of 5 feels ok, a double pawn (= 2 pawns) having the worth of 1,5 „normal“ pawns. -10 for tripled pawns makes a tripled pawn equal to 2 normal pawns, which also feels ok. Quadrupled pawns are worse than 2 normal pawns in my opinion, so the penalty should be higher.  You could give some extra points for bishop pair, connected pawns, passed pawns, but again, you seem to look for a heuristic, and heuristics should be fast and simple.  
  
  ---
  
  ## 4 answers
  
  ### Answer by username_5 on 2020-09-23. Score: 15 | Accepted answer
  
  **Start with whatever and tune it.**
  
  That's how chess engine programming works - you start with some number, and then tune it. For example you start with -5, then create another version with -10. You get the two engines to play against each other, and the one that wins more often is the "correct" version that you keep.
  
  Of course as pointed out by other answers, doubled pawns aren't necessarily bad, so the next step is to start incorporating more features that can mitigate the doubled pawn penalty. For example you could say that if you have a pawn on an adjacent file that is defending the more advanced doubled pawn (e.g., a pawn on f3 given doubled pawns on e4 and e3), then remove the doubled pawn penalty. And then the testing process would start again, you take this patch and create a new fork, then get the two versions to play each other and retain the stronger version. And then you could tune, e.g. maybe "remove the doubled pawn penalty" is too strong, perhaps it should be "take only half the doubled pawn penalty", etc.
  
  On another note, there is no "standard answer" to how large the doubled pawn penalty should be. Different engines will prefer different values - it depends on the rest of your evaluation function & search function. See [this article](https://www.chess.com/blog/the_real_greco/chess-from-code-how-do-engines-evaluate-positions) which contains a paragraph about adding tripled pawn penalties to Ethereal:
  
  > You might ask- why can't someone just write a better evaluation function? The answer is that people are trying, but it's difficult. Andrew Grant told me that he tried to add a penalty for tripled pawns (because they're obviously terrible!), but for whatever reason the engine became weaker with that penalty. Code for positional subtleties is extremely unlikely to add strength.
  
  > **Comments:**
  > **username_6**: It is possible (although I lack the experience to say whether it is *probable*) that checking for tripled pawns simply consumes too much computation on positions that are already known to be terrible anyway, preventing the engine from searching as deeply. Regardless of the specifics, engines are very complicated beasts, and the only way to know whether a change is good or bad is to test it empirically, as you say.  
  
  ---
  
  ### Answer by username_2 on 2020-09-22. Score: 7
  
  There's no real rule for how much do doubled pawns (or any other kind of weakness on the pawn structure) worse your position. There's not even a rule for piece value, specially if you'll add bonuses for things like centralized knights or the bishop pair.
  
  In general, doubled pawns in a minority or balanced side tend to be less important than in a majority (as it'll make it harder to create a passed pawn)
  
  Doubled pawns can also be a strength. Think for instance of **1.e4 e5 2.Nf3 Nf6 3.Nxe5 d6 4.Nf3 Nxe4 5.Nc3!?** where White gives the possibility for his opponent to double his pawns hoping his king will be safer after castling long thanks to the extra protection it provides (note that White does not have a majority on the queenside)
  
  Another illustrative example would be **1.e4 e5 2.Nf3 Nc6 3.Bb5 a6 4.Bxc6 dxc6 5.d4 exd4 6.Qxd4** here White gives up the bishop pair to make the "d" pawn move away and get a 4vs3 majority on the kingside that could eventually become a passed pawn. The 4vs3 majority Black has on the queenside is much harder to convert into a passed pawn. If all pieces were removed from the board, White would easily win the pawn endgame.
  
  In short, there's no way to tell without knowing how your engine will evaluate other potentially related factors in the position. The main advantage you have is that you don't need to get it right the first time. You can create different versions of your engine with different values for certain parameters and test them against one another.
  
  
  ---
  
  ### Answer by username_3 on 2020-09-23. Score: 5
  
  Doubled pawns aren't necessarily bad. They typically mean an open file and often can improve control of the center.
  
  There's really no way to answer unless I know how you value the mobility of the pieces. Are the piece values you give fixed or baseline numbers that can be modified based on the position?
  
  
  ---
  
  ### Answer by username_4 on 2020-09-23. Score: 1
  
  it depends
  
  they may be worth more if they open a file for a rook in a somewhat closed position
  
  
  ---
  
  