user24788: 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.

user24787: it depends
they may be worth more if they open a file for a rook in a somewhat closed position

user19861: 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?

user18809: 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.

user15223: 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 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.


24788: <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>
 24787: <p>it depends</p>
<p>they may be worth more if they open a file for a rook in a somewhat closed position</p>
 19861: <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>
 18809: <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>
 15223: <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>
