user26542: [FEN "r1bqk1nr/p1ppbppp/1p6/n2P4/8/2N5/PPP1QPPP/R1B1KBNR w KQkq - 3 7"]

1. g4

With White to move, the Lichess engine suggests g4 in this position. Can someone explain why it's a good move?

user7297: Black would like to continue their development with Nf6 and castling short. g4 discourages Nf6; after g5, the knight is forced back. It also prepares Bg2, which protects d5 without giving up the pin on the e-file. The weakening of the kingside apparently isn't too much of a problem; Black isn't developed enough to take advantage of this, and White can always castle queenside.

26542: <pre><code>[FEN &quot;r1bqk1nr/p1ppbppp/1p6/n2P4/8/2N5/PPP1QPPP/R1B1KBNR w KQkq - 3 7&quot;]

1. g4
</code></pre>
<p>With White to move, the Lichess engine suggests g4 in this position. Can someone explain why it's a good move?</p>
 7297: <p>Black would like to continue their development with Nf6 and castling short. g4 discourages Nf6; after g5, the knight is forced back. It also prepares Bg2, which protects d5 without giving up the pin on the e-file. The weakening of the kingside apparently isn't too much of a problem; Black isn't developed enough to take advantage of this, and White can always castle queenside.</p>
